What is the Agent Graph System?

The Agent Graph System (AGS) lets you define hierarchical constraints for your AI agents, controlling which operations they can use and in what order.

While agents can see all available operations, they must follow the workflow you define. This balances autonomy with predictable behavior.

Core Concepts

An agent graph consists of three simple components:

  1. Nodes - Individual operations (tools) your agent can use
  2. Connections - Define which operations must happen before others
  3. Hierarchical levels - Group operations by their position in the workflow

Example Agent Workflow that requires AGS

Let’s explore a practical example of an agent that needs to follow a specific workflow:

Users might ask the agent to research a specific topic, and the agent should follow this sequence:

  1. First, search for general information about the topic
  2. Once basic information is found, extract specific details
  3. Finally, analyze or summarize the collected information

Without AGS constraints, the agent might skip steps or perform them in an incorrect order, leading to incomplete or inaccurate results. With AGS we can design a graph that enforces the correct sequence of operations without limiting the agent’s ability to make decisions.

This example shows how AGS enforces the correct sequence of operations, ensuring data is gathered methodically and reliably.

Implementation Methods

You can create agent graphs using either the visual UI or programmatically with the SDK. Both approaches offer the same functionality, with the visual builder being more intuitive for non-developers and the SDK providing more flexibility for programmers.

The xpander.ai UI provides a drag-and-drop interface for creating agent graphs:

1

Access the Graph Builder

Navigate to your agent in the xpander.ai dashboard and select the “Graph” tab

2

Add Operations

Drag operations from the sidebar into your graph workspace

3

Create Connections

Draw lines between operations to establish dependencies

4

Test Your Graph

Use the interface options to test your agent with different invocation methods

5

Deploy

Save changes to deploy your updated graph

The visual builder gives you all the power of AGS without writing code, making it accessible to both developers and non-developers.

Troubleshooting & Best Practices

Next Steps

Now that you understand the Agent Graph System, you might want to explore: