AI Bot
AI Bot (ai-bot) is the substrate you build conversational interfaces on, customer
service bots, internal helpdesk assistants, in-product copilots, WhatsApp concierges.
It is infrastructure, not a product. You declare the bot; the block provides the runtime, the channel plumbing, the conversation state and the escalation machinery. End users talk to your bot. There are no pre-built bot templates and no bot-builder UI here, those are things you build on top.
The idea: cheapest viable resolution
Section titled “The idea: cheapest viable resolution”Most conversational products send every message to an LLM. That is simple, slow, and expensive in a way that scales linearly with success.
AI Bot instead runs each message through an escalating cascade. A message stops at the first stage that can handle it confidently:
inbound message │ ├─▶ 1. rules / regex microseconds, no model cost ├─▶ 2. dynamic model fast, generated from your rules ├─▶ 3. fast classifier milliseconds, tiny cost ├─▶ 4. small language model low cost, handles ambiguity └─▶ 5. LLM terminal — always resolves“What are your opening hours” is a rule match that never touches a model, a paraphrase the regex misses is caught by the dynamic model. Only genuinely novel or complex messages reach stage 5. This is the central cost and latency property of the block: the cascade is why a high-traffic bot does not cost like a high-traffic LLM integration.
Declare a bot
Section titled “Declare a bot”A bot is a versioned, signed, tenant-scoped YAML artifact. Structure is declarative; where declaration is not enough, you drop into scripts at defined hook points.
kind: botmetadata: name: acme-support tenant: acme product: support-portal version: 7spec: channels: - kind: web enabled: true - kind: slack enabled: true workspace_ref: vault:acme/slack-token
persona: prompt_ref: gateway:acme-support-persona-v7 style: professional locale_default: en-US locales: [en-US, es-MX, pt-BR]
nlu: cascade: - stage: rules confidence_threshold: 0.95 rules_ref: rules/intents.yaml - stage: classifier confidence_threshold: 0.85 model_ref: ai-ml:acme-support-classifier-v7 - stage: llm confidence_threshold: 0.0 # terminal model_ref: gateway:acme-support-llm-default
orchestrate: handlers: - intent: business_hours path: canned - intent: order_status path: skill skill_ref: ai-computer:acme-order-lookup-v2Channels
Section titled “Channels”One bot definition serves every channel it declares. Inbound messages are normalised to a single canonical shape before the cascade sees them, so your rules, intents and handlers are written once rather than per-channel.
| Channel | Notes |
|---|---|
| Web API | The foundational channel; also what custom front-ends use |
| Slack | Workspace credentials from the vault |
| Microsoft Teams | App registration from the vault |
| Account plus approved message templates | |
| Custom | Bring your own transport against the same canonical message |
What it composes
Section titled “What it composes”AI Bot orchestrates other blocks rather than reimplementing them:
| Need | Handled by |
|---|---|
| Model calls | AI Gateway |
| Conversation memory | AI Memory |
| Knowledge retrieval | AI Knowledge |
| Multi-step autonomous work | AI Flow |
| Quality measurement | AI Evals |
Every model call, the SLM stage, the LLM stage, the persona prompt, goes through the AI Gateway, which means bot traffic lands in the same budgets, caches and cost accounting as everything else.
- Core Concepts: the cascade, confidence, conversation state and orchestration
- Configuration: the bot definition in full
- Operations: deploying, model generation, analytics and compliance