Overview
Assistant Graphs enable multi-assistant orchestration, allowing you to route conversations between different specialized assistants based on various conditions. This powerful feature lets you build complex conversational workflows where each assistant handles their area of expertise.Use Cases
Department Routing
Route sales inquiries to sales bots, support requests to support bots, and billing questions to billing specialists.
Escalation Paths
Automatically escalate frustrated customers or complex issues to human agents.
Language-Based Routing
Detect the caller’s language and route to the appropriate language-specific assistant.
Skill-Based Handling
Route technical questions to technical specialists and general queries to generalists.
Benefits Over Single-Assistant Approach
| Feature | Single Assistant | Assistant Graph |
|---|---|---|
| Specialization | One assistant handles everything | Each assistant specializes in their domain |
| System Prompts | Single, complex prompt | Focused prompts per assistant |
| Knowledge Base | Shared across all topics | Targeted knowledge per assistant |
| Voice & Personality | Same throughout | Can vary per assistant |
| Scalability | Limited by prompt complexity | Scales with workflow needs |
Core Concepts
Graphs
A Graph is a container that holds nodes (assistants) and edges (transitions). Each graph belongs to an organization and can be assigned to phone numbers for inbound call handling.Nodes
Nodes represent individual assistants positioned within the graph. Each node wraps an existing assistant and defines its role in the conversation flow.Entry Node
Entry Node
The starting point of every conversation. When a call comes in on a phone number assigned to this graph, the conversation begins at the entry node.
- Only one entry node per graph
- Typically a receptionist or router assistant
- Required for the graph to function
Standard Node
Standard Node
Regular assistant nodes that handle specific topics or departments.
- Can have multiple standard nodes
- Each wraps a specialized assistant
- Connected via edges to other nodes
Exit Node
Exit Node
Marks conversation end points.
- Triggers call termination
- Can have multiple exit nodes for different outcomes
- Optional - calls can also end naturally
Escalation Node
Escalation Node
Triggers human transfer.
- Routes to human agents
- Preserves conversation context for handoff
- Configurable transfer destinations
Node Example
Edges
Edges define transitions between nodes. Each edge has conditions that determine when the transition should occur.Edge Example
Transition Conditions
Edges support multiple condition types to determine when transitions should occur.Intent-Based Conditions
Trigger transitions when specific intents are detected in the user’s message.Intent patterns are comma-separated keywords. If any keyword matches the detected intent, the transition triggers.
Natural Language Conditions
Use LLM evaluation to assess complex conditions described in natural language.Mathematical Conditions
Expression-based conditions that evaluate numerical values.call_duration- Call length in secondsturn_count- Number of conversation turns- Custom state variables
State Variable Conditions
Check conversation state variables for specific values.Building a Graph
Step 1: Create Your Assistants
Before building a graph, create the specialized assistants you’ll use as nodes.Step 2: Create the Graph
Create an empty graph or one with initial structure.Step 3: Use the Visual Graph Builder
The Burki dashboard includes a visual graph builder for creating and editing graphs:- Navigate to Assistants → Graphs in the dashboard
- Click Create New Graph
- Drag assistants from the sidebar onto the canvas
- Connect nodes by clicking and dragging between them
- Click on edges to configure transition conditions
- Save your graph
Step 4: Test the Graph
Use the test endpoint to simulate conversations through your graph.Step 5: Assign to Phone Number
Connect your graph to a phone number to start receiving calls.Handoff Behavior
When a transition occurs, the following happens:- Handoff Sentence: If configured, the current assistant speaks the handoff sentence
- Context Sharing: Conversation context is passed to the new assistant
- History Preservation: The new assistant has access to conversation history
- Seamless Continuation: The user experiences a smooth transition
Phone Number Assignment
Assigning a Graph to a Phone Number
When you assign a phone number to a graph (instead of an individual assistant), incoming calls are routed through the graph’s entry node.Behavior Differences
| Scenario | Individual Assistant | Assistant Graph |
|---|---|---|
| Inbound Call | Routes to single assistant | Routes to graph’s entry node |
| Outbound Call | Uses assigned assistant | Uses entry node assistant |
| Phone Assignment | assistant_id on phone number | assistant_graph_id on phone number |
A phone number can be assigned to either an individual assistant OR a graph, but not both. Assigning to a graph overrides any previous assistant assignment.
Best Practices
Start Simple
Begin with 2-3 assistants and add complexity as needed. A basic receptionist → specialist pattern works well for most use cases.
Use Clear Conditions
Write transition conditions that are unambiguous. Test edge cases to ensure routing works as expected.
Include Handoff Sentences
Always configure handoff sentences for a smooth user experience. Users should understand why they’re being transferred.
Set Priorities
When multiple edges could match, use priorities to ensure deterministic routing. Lower numbers = higher priority.
Test All Paths
Use the test endpoint to verify all conversation paths work correctly before going live.
Example Graphs
Customer Service Router
A typical customer service setup with department routing:- Receptionist → Sales:
intent: "sales,purchase,buy,pricing" - Receptionist → Support:
intent: "help,problem,issue,broken" - Receptionist → Billing:
intent: "bill,payment,invoice,charge" - Support → Escalation:
natural_language: "user is frustrated or issue not resolved" - Billing → Escalation:
mathematical: "call_duration > 600"
Language Router
Route calls based on detected language:- Detector → English:
state_variable: language == "en" - Detector → Spanish:
state_variable: language == "es" - Detector → French:
state_variable: language == "fr"
API Reference
Create Graph
Create a new assistant graph with nodes and edges
List Graphs
List all graphs in your organization
Get Graph
Retrieve a specific graph with full details
Update Graph
Update graph metadata
Update Structure
Update nodes and edges
Delete Graph
Delete a graph and all related data
Sessions
View conversation sessions
Phone Numbers
Manage phone number assignments