Prompting
Customizing agent behavior with prompts, variables, and dynamic context
You can configure your agent’s behavior through customizable prompts. We support plain-text prompts for straightforward conversations and structured prompting with states and workflows for complex scenarios.
Fixed prompts
These are static prompts that define agent behavior. You can enhance them with template variables and tool references. For example, for an agent handling customer returns, a simple starting prompt may look like:
Template variables
Template variables allow you to dynamically inject context into your prompts at conversation time. In the example above, we use variables like $customer_name
, $customer_location
, and $customer_orders
.
Using variables in prompts:
- In the dashboard prompt editor type
$
to show an autocomplete list of variables - Under the hood, the variables are stored in the markdown custom directive syntax
:variable[customer_name]{name="customer_name"}
Setting up variables:
- Define variables in the Advanced tab of your agent configuration
- Each variable needs a
name
,description
, and optionaldefault_value
(without a default value the variable will be required) - Provide values via the
context
parameter when creating conversations or include them in the data object you return to theconversation.setup
webhook.
Variables matching your definitions will be injected into the prompt. Extra context fields are automatically added to an “Additional Details” section. Required variables (without defaults) will cause conversation creation to fail if not provided.
Intent-routing prompts
Intent-routing prompts are designed for customer support and similar use cases where the first step is identifying why the customer is contacting you, then following the appropriate procedure.
How intent-routing works
Identifies the intent
Talks with the customer to understand their need
Selects appropriate route based on intent
Chooses from your library of defined routes
Focuses on specific instructions
Loads detailed guidance for that route
Dynamically switches if needed
Changes scenarios if the initial choice was incorrect
By hiding scenario details until after triage, agents can focus on smaller, more targeted contexts, leading to better performance in complex support scenarios.
Route management
Your organization maintains a library of common routes that grows and evolves over time:
Example routes for e-commerce support:
- Order status inquiries
- Return and exchange requests
- Payment and billing issues
- Product information questions
- Account access problems
- Shipping and delivery concerns
Each route contains identification criteria that help the agent recognize when this route applies, along with detailed instructions that provide step-by-step procedures specific to this issue type.
When to use intent-routing
- Customer support hotlines: Replace traditional IVR systems with conversational intent-routing when the reason for inbound calls is unknown and you need to route to appropriate handlers
- Large-scale service operations: When you have 10+ distinct scenarios that may have separate owners or evolve at different rates. Different teams can maintain their own scenario procedures while sharing the same agent interface
Intent-routing works best when the reason for contact is not known upfront and you have a large number of known intents (typically 5+).
Choosing the right approach
Fixed prompts
- Best for: Simple, straightforward conversations with clear objectives
- Examples: Appointment scheduling, basic information gathering, simple support requests
Intent-routing prompts
- Best for: Complex support scenarios with multiple possible procedures
- Examples: Customer service hotlines, technical support, account management
Implementation strategy
Start simple
Begin with plain-text prompts and identify patterns where more structure would help:
- Are agents frequently confused about which procedure to follow?
- Do you have many different types of requests that need different approaches?
- Are there compliance requirements that must be consistently followed?
Evolve to structured approaches
Move to scenario triage when you identify common patterns that benefit from specialized handling
Consider workflows when you need guaranteed step-by-step progression through complex processes