Skip to content

Agents

A agent defines the AI's personality and, optionally, its speaking voice. Think of it as the character your AI assistant plays in a conversation.

Why Agents Matter

The agent's prompt shapes how the AI communicates — its tone, vocabulary, mannerisms, and behavioral rules. A well-crafted agent makes conversations feel natural and consistent.

You might have different agents for different situations:

  • A friendly greeter for initial contact
  • A technical specialist for troubleshooting
  • A formal agent for sensitive topics like billing

Creating a Agent

Go to Design > Agents and click Create Agent.

Name & Description

  • Name — A clear label for your team (e.g., "Friendly Support Agent"). This isn't shown to end users.
  • Description — Optional notes about when and how to use this agent.

Personality Prompt

This is the most important field. It tells the AI how to behave. Write it in plain language:

You speak in a warm, professional tone. You use simple language and
avoid technical jargon. You always confirm you've understood the
customer before moving on. When the user seems frustrated, you
acknowledge their feelings first.

The personality prompt is combined with each stage's prompt — the stage says what to do, and the agent says how to do it.

Keep It Focused

The personality prompt should describe communication style, not tasks. Leave task instructions (what to ask, what information to collect) for stage prompts.

Voice (Optional)

If your project uses voice output (text-to-speech), you can configure the AI's speaking voice here. The available settings depend on which TTS provider you're using:

ProviderKey Settings
ElevenLabsVoice ID, model, stability, similarity boost, style
OpenAIVoice name (alloy, echo, fable, etc.), model, speed
AzureVoice name (e.g., en-US-JennyNeural), output format
DeepgramModel name (e.g., aura-asteria-en)
CartesiaVoice ID, model, language, output format

You'll need to have a TTS provider set up in Administration > Providers before configuring voice settings.

Filler Responses (Experimental)

Experimental Feature

Filler Responses are under active development. Behaviour may change in future releases.

In voice-based conversations there is an unavoidable pause between the user finishing a sentence and the AI beginning to speak — the model needs time to classify intent and generate a full response. Filler Responses close that gap by having a small, fast LLM generate a short neutral sentence that is spoken through TTS immediately at the start of every turn, while the main classification and response generation runs in parallel behind the scenes.

Examples of what a filler sentence might sound like:

  • "Hmm, let me think about that."
  • "Sure, give me just a moment."
  • "Let me look into that for you."

How It Works

  1. The user finishes speaking.
  2. Bonsai sends the filler prompt to the chosen Filler LLM Provider and immediately streams the result to TTS.
  3. In parallel, the full classification and stage response pipeline runs as normal.
  4. The filler audio plays, masking the processing delay from the user.

Configuration

Open Design > Agents, select an agent, and switch to the Filler Responses tab.

FieldDescription
LLM ProviderThe LLM provider used to generate the filler sentence. Leave empty (disabled) to turn the feature off.
LLM SettingsOptional provider-specific model/parameter overrides (e.g. model name, temperature).
Filler PromptThe instruction sent to the LLM. It should ask for a single short neutral sentence.

A typical filler prompt looks like:

Generate only the first short sentence of the response. The rest will be generated later by another call.

Keep It Lightweight

Use a small, fast model for the filler LLM — the whole point is speed. A large model defeats the purpose.

Using Agents in Stages

Every stage references exactly one agent. When the AI generates a response in that stage, it combines:

  1. The stage's system prompt (what to do)
  2. The agent's personality prompt (how to do it)

Multiple stages can share the same agent, which keeps the AI's personality consistent as the conversation moves through different phases.

Best Practices

  • One personality per agent — Don't put task instructions in the personality prompt.
  • Be specific about tone — "Be friendly" is vague. "Use casual language, short sentences, and occasional humor" is better.
  • Include behavioral rules — Describe what the AI should and shouldn't do: "Never make promises about refund timelines" or "Always ask permission before transferring to another department."
  • Test with real scenarios — Have a conversation with your AI and see if the personality feels right. Adjust until it does.

Released under the Apache-2.0 License.