An agent for your product, live in an afternoon.
Askline is a hosted chat agent you point at your own knowledge base and drop into your website. One snippet in, one conversation out — no chatbot script trees, no canned replies.
data: {"type":"connection.created"}
data: {"text":"Looking into that for you now.", "type":"curate"}
data: {"delta":"Automation projects typically deploy in under two weeks.", "type":"message.delta"}
data: {"text":"Automation projects typically deploy in under two weeks.", "type":"message.done"}
data: {"type":"conversation.completed"}
Quick start
Paste this before the closing </body> tag. That's the whole install.
<script>
window.asklineConfig = {
tenantId: 'your-tenant-id'
};
</script>
<script src="https://askline.code-mavericks.com/askline-sdk.js" async></script>
Configuration options — all optional except tenantId:
| Key | Default | What it does |
|---|---|---|
tenantId | — required | Identifies your site's Askline instance. |
title | "Chat with us" | Panel header text. |
greeting | "Hi! I'm here to help..." | First message shown when a visitor opens the widget. |
placeholder | "Type a message..." | Input field placeholder text. |
autodetectTheme | true | If true, the widget waits for your page to fully load, then matches its own colors to your site (via a theme-color meta tag, common CSS custom properties, or your page's light/dark background) — falls back to Askline's default navy if nothing usable is found. Set false to skip this and show default colors immediately. |
Access & allowlisting
Askline uses a single fixed endpoint for every client - there is no per-partner path. Instead, each site is allowlisted by host during onboarding, and by origin for cross-origin browser calls. Requests from a host or origin that hasn't been configured are rejected before any model call is made.
Ask the agent
Building your own UI instead of using the SDK? Call the endpoint directly. Send the visitor's question with their prior turns; the response is a Server-Sent Events stream that opens instantly and closes when the answer is complete.
tenant_id returns 401.{
"query": "What plans do you offer?",
"history": [
{ "role": "user", "text": "..." },
{ "role": "assistant", "text": "..." }
],
"turnstile_token": ""
}
// leave turnstile_token as an empty string if Turnstile isn't in use for your site - see the Turnstile section below
Event contract
| Event | Payload | Meaning |
|---|---|---|
connection.created | {type} | Stream opened, request accepted. |
curate | {type, text} | Status text while working. Repeatable; each replaces the last. |
message.delta | {type, delta} | Answer chunk. One today, many when token streaming lands. |
message.done | {type, text} | Full final answer, always emitted. |
error | {type, message} | User-safe failure text. Replaces message events. |
conversation.completed | {type} | Always the last event, success or error. |
: are transport keep-alives, sent roughly every 15 seconds. Ignore them; every SSE library already does.Turnstile
Some sites have Cloudflare Turnstile bot protection enabled. If you're using the SDK, this is handled for you automatically. If you're calling the endpoint directly:
GET /askline/loader?tenant_id=your-tenant-id- If the response includes a
turnstile_site_key, render Cloudflare's Turnstile widget with that key (appearance: 'interaction-only'recommended, so it stays invisible unless a visitor is actually challenged) and pass the resulting token asturnstile_token. - If the response is empty, Turnstile isn't enabled for this site — omit or leave
turnstile_tokenempty.
Guardrails & knowledge base
Every answer is grounded in a knowledge base you control - Askline only states facts that appear in the excerpts it retrieves, and says plainly when it doesn't know something rather than guessing. Off-limits topics and escalation rules are configured per site, not left to the model to decide on its own.
Errors
Requests from an unrecognized host or origin receive a 403 before the stream opens. Malformed or oversized queries receive a 400. Once the stream has opened, failures are reported as an error event rather than an HTTP status change, since the connection is already committed to streaming.
Knowledge base sync
Knowledge base content is authored as Markdown and synced in - unchanged sections are skipped, changed or new sections are re-embedded, and removed sections are pruned automatically. Talk to Code Mavericks about getting your content into the pipeline.