# 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](/answers/mast-taxonomy/why-per-agent-grading-misses-multi-agent-failures), 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.

---

Sources:
- OpenTelemetry semantic-conventions-genai PR #270: Add gen_ai.main_agent entity: https://github.com/open-telemetry/semantic-conventions-genai/pull/270 (fetched 2026-09-30)

Source: https://tessary.ai/answers/otel-genai-conventions/does-opentelemetry-identify-the-top-level-agent
More on Otel genai conventions: https://tessary.ai/answers/otel-genai-conventions
From Tessary, agent reliability for AI agents in production: https://tessary.ai
