This is a comprehensive end-to-end example demonstrating how to use agent-utilities to build a production-ready AI agent.
The reference agent demonstrates:
- Agent Creation: Using the
create_agentfactory with various configurations - Graph Orchestration: Router → Planner → Dispatcher pipeline
- MCP Integration: Loading tools from MCP servers
- Knowledge Graph: Using the unified intelligence graph for context
- Protocol Support: ACP, A2A, and AG-UI protocol adapters
- Memory Management: Knowledge graph-based memory primitives
- Human-in-the-Loop: Tool approval and elicitation
from agent_utilities import create_agent
# Create a simple agent with workspace tools
agent = create_agent(name="SimpleAgent")from agent_utilities import create_agent
# Create a powerful Graph Agent with Universal Skills
agent = create_agent(
name="ProAgent",
skill_types=["universal", "graphs"]
)from agent_utilities import create_agent
# Create an agent that uses MCP tools
agent = create_agent(
name="MCPAgent",
skill_types=["universal"],
mcp_config_path="mcp_config.json"
)cd examples/reference_agent
python basic_agent.pypython graph_agent.pypython mcp_agent.pypython knowledge_graph_agent.pyThe reference agent follows the agent-utilities architecture:
User Query
↓
ACP / AG-UI / SSE (Unified Protocol Layer)
↓
Router (Topology Selection)
↓
Dispatcher (Dynamic Routing)
↓
Discovery Phase (Researcher, Architect, MCP Discovery)
↓
Execution Phase (Programmers, Infrastructure, Specialists)
↓
Verifier (Quality Gate)
↓
Synthesizer (Response Composition)
basic_agent.py- Simple agent creation and executiongraph_agent.py- Graph orchestration with Router/Planner/Dispatchermcp_agent.py- MCP tool integrationknowledge_graph_agent.py- Knowledge graph usageprotocol_agent.py- Protocol adapters (ACP, A2A, AG-UI)memory_agent.py- Memory primitives and knowledge base
Run tests for the reference agent:
cd ../..
pytest tests/test_reference_agent.py -v