How It Works
The flowchart above shows the topology — who delegates to whom. The sequence diagram below shows the order in which the orchestrator hands off to each sub-agent at runtime, and where each handoff span lands in the trace:Setup
- Auto-detect (OpenAI Agents SDK)
- Explicit registration
The SDK auto-detects sub-agents from handoffs — no extra configuration needed:
When you pass the orchestrator
Agent to install(), the SDK introspects agent.handoffs and registers each handoff target as a subagent component in the manifest. No manual registration needed.What Gets Captured
When the orchestrator runs and delegates to sub-agents, the SDK captures the full trace with per-call agent attribution:| Field | What It Contains | Set By |
|---|---|---|
agent_name on each LLM call | Which sub-agent made the call | Auto from agent spans |
handoff spans | Delegation events (from → to) | Auto from handoff spans |
subagents in manifest | Discovered sub-agent references | Auto from agent.handoffs |
What a multi-agent trace looks like
What a multi-agent trace looks like
A single trace contains LLM calls from all sub-agents, each tagged with
agent_name:Dashboard
Agent Sidebar
The agents page shows the hierarchy — orchestrators are listed with their sub-agents nested below, marked with a → icon:- travel-planner — 150 traces, manifest v3
- → flight_agent — discovered from handoffs
- → hotel_agent — discovered from handoffs
- → itinerary_agent — discovered from handoffs
Topology Graph
The agent detail page shows a topology graph — a visual map of which agents delegate to which, with handoff edges and call counts.
Per-Sub-Agent Datasets
The key benefit: build training datasets for each sub-agent independently. When you selectflight_agent and build a dataset, only flight_agent’s LLM calls are extracted — even though those calls live inside the orchestrator’s trace:
Orchestration-Aware SFT Export
The platform produces two SFT export formats for multi-agent traces:- Flat (Handoff Markers)
- Orchestration (Delegation Markers)
Standard SFT format with Best for: Training individual sub-agents with full conversation context.
[HANDOFF] markers between agent turns and name fields on assistant messages:Version Drift Detection
Each sub-agent has its own version timeline. When a sub-agent changes, only its own data is affected — other sub-agents’ data remains untouched.| What Changed | Impact Scope | Severity |
|---|---|---|
flight_agent minor version bump | Only flight_agent data | REPAIRABLE |
flight_agent major version (tools changed) | Only flight_agent data | INCOMPATIBLE |
hotel_agent updated | No impact on flight_agent | None |
| Orchestrator prompt changed | All traces through orchestrator | Per-policy |
Cross-Sub-Agent Dependencies
If one sub-agent’s output feeds into another (e.g.,itinerary_agent depends on flight_agent’s output), DecimalAI can detect when an upstream change breaks a downstream consumer:
How to declare dependencies
How to declare dependencies
Dependencies are declared in the sub-agent’s schema via When
register_manifest():flight_agent’s output contract changes, itinerary_agent is automatically flagged.Supported Frameworks
| Framework | Auto-Detection | How Sub-Agents Are Found |
|---|---|---|
| OpenAI Agents | ✅ Full | agent.handoffs introspected at install() time + handoff spans at runtime |
| LangChain | Partial | Sub-agent names captured from agent_name field on LLM calls if set |
| OTel / CrewAI | Partial | From span attributes if framework emits agent identity |
| Explicit | ✅ Full | register_manifest(subagents=[...]) |
Best Practices
-
Name your agents clearly. Use descriptive names like
flight_agent, notagent_1. These names appear in the dashboard, datasets, and SFT export. -
Pass the orchestrator to
install(). This gives the SDK the full agent graph upfront, enabling immediate manifest registration with all sub-agents. - Build datasets per sub-agent. Don’t mix all sub-agents into one dataset — each agent has different skills and should be fine-tuned independently.
-
Start with the flat SFT format. The
[HANDOFF]marker format works with standard OpenAI fine-tuning. Use the orchestration format only when specifically training delegation behavior. -
Declare dependencies. If sub-agents consume each other’s output, use
depends_oninregister_manifest()so DecimalAI can alert you to cascade breakage.
Next Steps
Multi-Agent concepts
Orchestrators, sub-agents, delegation vs handoff, drift detection.
Traces API
REST reference for listing traces by agent (used for sub-agent activity).
Manifests
How sub-agent components appear in the manifest diff.
Datasets
Building per-sub-agent training datasets.