Conditional Prompts
Conditional Prompts allow you to define instructions that are executed only when specific conditions are met during a conversation.
What Is a Conditional Prompt?
A Conditional Prompt is composed of three elements:
Name — an internal identifier to help you organize your logic
Prompt — the instruction that will be injected into the Agent when the condition is met
Condition — the rule that determines when the prompt should be executed
When multiple Conditional Prompts exist, the condition is what determines which one applies in each situation.
How Conditional Prompts Work
During a conversation, the Agent continuously evaluates the defined conditions.
When a condition matches the current context:
The corresponding Conditional Prompt is activated
Its instructions are applied to the Agent’s reasoning
The Agent responds or acts according to that injected prompt
This allows Agents to adapt behavior dynamically without changing their core Prompt.
Examples of Use
If the user asks to speak with a human → trigger a prompt that uses the Ticket Creation Tool
If the user confirms an action → inject a prompt that executes a Workflow
If a specific keyword appears → change tone, flow, or next steps
If the conversation reaches a certain state → guide the Agent to finalize or escalate
Best Practices
Keep conditions explicit and non-overlapping
Use Conditional Prompts for logic and flow control, not for core identity
Avoid duplicating logic already defined in the main Prompt
Disable unused Conditional Prompts to keep behavior predictable
💡 Tip: Think of Conditional Prompts as contextual instructions that activate only when needed.
Last updated
