Does OpenTelemetry identify the top-level agent in a multi-agent system?

Yes, as of a convention merged September 30, 2026: gen_ai.main_agent is a resource-level entity, identified by gen_ai.main_agent.id, that names the one persistent, top-level agent running in a process, something with a stable identifier across invocations like a scheduled job, a hosted agent in a cloud console, or an agent declared in an A2A Agent Card.

It’s deliberately narrow. The entity must not be emitted at all if the agent has no stable identifier, a transient in-memory id doesn’t qualify, and it isn’t meant for telling a main agent apart from the subagents it calls inside one run; that distinction already belongs to the gen_ai.agent.* span attributes on each invoke_agent operation. Grading each agent in a multi-agent run separately already misses the failures that only show up between them, and a resource-level id for the outer agent doesn’t change that: it says which deployed agent a trace came from, not how the agents inside that run behaved together. Like the rest of the GenAI spec, it’s marked development stability and can still change.

published

sources

keep reading

More on this.

Try Tessary on Cloud.

free · 10,000 traces a month · 1 GB · 30-day retention · $10 one-time credit for triage and RCA · no credit card