Skip to main content
A graph agent breaks a phone conversation into discrete nodes, each with its own purpose, instructions, and transition rules. Instead of one giant prompt that has to handle everything, you define exactly what the agent does at each step and exactly when it moves to the next one.
Graph agent configuration view in the Bolna dashboard, showing the flow canvas and inspector panel

Predictable

Conversations follow explicit paths. Every transition is a rule you defined.

Easy to debug

When something breaks, you know which node failed and why.

Easy to update

Change one node without touching the rest of the flow.

Lower cost

Deterministic edges and static nodes skip the LLM entirely.

When to use a graph agent

Pick a graph agent when the call has discrete stages with different objectives (greet, qualify, collect, confirm, close), or when you need deterministic transitions (time of day, retry count, external events). For a single-objective agent that just answers questions, a regular simple_llm_agent is enough.

Core concepts

Nodes

A node is one step in the conversation. Each node has one clear job.

Edges

Edges define how the conversation moves from one node to the next.
If no edge matches, the agent stays on the current node and re-asks naturally. There are four edge types: LLM (default), expression, unconditional, and event. Full reference on Edges & Routing.

Routing

After every customer message, a routing LLM evaluates the available LLM-typed edges on the current node and picks the best match.
Expression and unconditional edges are evaluated before the routing LLM runs. If a deterministic rule matches, the transition fires instantly with zero latency and zero cost. The routing LLM is only invoked when no deterministic rule matches.

Where graph agent config lives

All graph-agent fields live inside llm_agent, nested under tools_config in your conversation task:

Top-level fields

agent_information is the identity layer

This prompt is applied to every node. Use it for persona, response rules (max sentence count, language switching), pronunciation rules, and hard guardrails.
agent_information is sent with every LLM call. Keep it focused. Save specifics for individual node prompts.

Writing effective node prompts

A well-written prompt includes the node’s purpose, the exact question to ask, validation rules, a fallback, and any voice formatting rules. Weak:
Strong:
One node, one job. A node that collects an order number should only collect the order number. Don’t also ask for the customer’s name or call reason in the same node.

Next steps

Edges & routing

Edge types, expression operators, built-in variables, inline data extraction.

Static nodes

Pre-cached audio messages with auto-replay on user silence.

Router nodes

Silent dispatch nodes that route to the right node in one turn without speaking.

Event injection

Drive transitions and proactive speech from external events via REST.

Tools & RAG

Call transfer, custom API tools, per-node knowledge bases.

Debugging

Routing logs, common scenarios, and how to fix them.

Full example

Complete annotated JSON skeleton showing every feature end-to-end.