Hierarchical
Agents are organized in a tree-like structure, with higher-level agents (supervisors) coordinating specialist agents.
Overview
Hierarchies shine when you need structured decision flows, explicit quality checks, and clear ownership of each step. Supervisors break work into pieces, delegate to the right specialists, and assemble the final answer.
Demo Scenario: Multi-Level Research System
This runnable example builds a three-layer hierarchy to research a topic:
Coordinator โ orchestrates the workflow and talks to the user
Research agent โ performs web searches using the platform's search tool
Information compiler โ formats raw findings into a polished summary
The coordinator delegates research to the specialist, forwards those notes to the compiler, then delivers the final write-up.
Diagram
Implementation Steps
Create the research and information compiler agents
Create the coordinator with sub-agents and workflow instructions
Run the hierarchy on a topic and perform cleanup
How to Run
From the repository root glaip-sdk/python/glaip-sdk:
Ensure your .env contains:
Output
Notes
Add reviewers or domain specialists as additional hierarchy levels for more rigorous validation.
Swap the
web_searchtool for a custom integration if your platform exposes a different search capability.Monitor each delegated run with the CLI
--verboseflag or renderer callbacks to debug coordination steps.
Related Documentation
Agents guide โ Configure nested agents, memory, and runtime overrides.
Tools guide โ Manage catalog tools such as
web_search.Automation & scripting โ Run hierarchical workflows in CI pipelines.
Security & privacy โ Apply tool-output sharing and PII policies across supervisor chains.
Last updated