Developer Documentation

Agent Development

Learn how to configure agent instructions, attach knowledge bases, define capabilities, and iterate on agent personality.

System prompts

The system prompt is the foundation of every agent. It defines the agent's role, knowledge boundaries, tone, and behavior. Write it as direct instructions to the model.

You are Aria, a customer support agent for Acme Corp.

Your role:
- Answer questions about Acme products and services
- Help users troubleshoot common issues
- Escalate to a human when you cannot confidently resolve an issue

Tone: Friendly, professional, concise. Never use jargon.
Response length: Keep answers under 3 paragraphs unless the user asks for detail.

You do not know: Pricing details, internal roadmaps, individual account data.
When asked about these, say: "I don't have access to that information, but our team at support@acme.com can help."

Model preferences

Choose the model the agent answers with. The picker lists every provider model your organization has enabled (GET /api/models returns the same list) plus four meta models that pick a concrete model for you:

ModelBest forCost
AutoPicks a model per message from what your organization has enabled — most agents start hereVaries
FastHigh-volume, short answersLow
BalancedEveryday reasoning and writingMedium
DeepComplex reasoning, long documents, extended thinkingHigh
Note: Provider models are named by their vendor (for example gpt-4.1-mini or claude-sonnet-4); which ones appear depends on the providers your organization has connected.

Knowledge bases

  1. 1Go to Knowledge → New knowledge base and give it a name.
  2. 2Upload PDFs, Word docs, Markdown files, CSVs, or paste URLs. Akili chunks and embeds them automatically.
  3. 3In the agent settings, attach one or more knowledge bases.
  4. 4During chat, Akili searches the knowledge bases with cosine similarity (RAG) and injects relevant passages into the system prompt before sending to the model.
Note: Embeddings use the embedding model your administrator configured under Admin → Providers. If no embedding provider is configured, documents are stored but not searchable.

Conversation starters

Provide 3–5 conversation starter prompts that appear when a user opens the agent. These help users understand what the agent can do.

  • Keep starters short — one sentence each
  • Cover different use cases (e.g. one about onboarding, one about billing, one about features)
  • Starters are plain text — they pre-fill the user's message box when clicked

Agent capabilities

  • Web search — enables real-time search grounding with the search provider your administrator configured under Admin → Providers
  • Image generation — generates durable images with the image-role model configured in Admin; available in authenticated chat and webchat
  • Code execution — enables the agentic code sandbox for multi-step tool use
  • Canvas — creates and updates private long-form artifacts in authenticated chat; anonymous webchat requires a channel-scoped artifact grant
  • File attachments — allows users to upload files into the chat
Note: Platform administrators control Image Generation and Canvas under Platform Settings → AI Capabilities. Image Generation also requires an enabled model bound to the image role.

Saving and snapshots

  1. 1Saving the builder form is immediate for everyone who can use the agent: there is no separate publish step and no version history in the builder.
  2. 2To keep a snapshot before a risky change, use Export to download the agent as a zip (instructions, model preferences, capability flags and knowledge references).
  3. 3To roll back, import the zip as a new agent, or copy the instructions back into the original.

Deploying agents

Agents can be deployed beyond the Akili web app:

  • Slack — add a bot token and signing secret; the agent responds to @mentions and DMs (events arrive at POST /api/webhooks/slack/:instanceId)
  • Microsoft Teams — configure a Bot Framework App ID and password; deploy to channels (events arrive at POST /api/webhooks/teams/:instanceId)
  • Webchat widget — embed a <script> tag on any website; zero dependencies, about 16 KB gzipped
  • API — call POST /api/chat with the agentId field and an API key to run the agent from your own code; POST /api/agents/:id/chat is the public webchat route and authenticates with a webchat session, not a key