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.
  • 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

Next steps