Build agents
Nodes and edges
Understanding the building blocks of agent graphs
Agent graphs define the agent’s logic using nodes and edges on a canvas. This builds on concepts from the Agent execution flow.
Nodes
Nodes represent distinct steps or actions. When execution reaches a node, it performs its function based on its configuration and the conversation context.
Common node attributes
Most nodes share these configurations:
- Name: A label for the node on the canvas.
- Node-specific prompt: An instruction guiding the agent’s action at this step. Works with the main system prompt and conversation history. Supports variables (
#{variable}
).- Exception:
HandoffNode
doesn’t use a prompt.
- Exception:
- Global node flag: When enabled, this flag makes a node accessible from any other node in the graph. This is particularly useful for creating universal fallback paths, such as a global Handoff node that can be triggered from anywhere in the conversation flow.
Node types
Default Node
General conversation and reasoning
Webhook Node
Make HTTP requests
WhatsApp Template Node
Send approved WhatsApp templates
Knowledge Base Node
Query specific knowledge bases
Handoff Node
Transfer to human operators
Warm End Node
Gracefully end conversations