What to record about AI agents
A dashboard over many AI agents can only show what each agent records.
The OpenTelemetry project publishes shared names for those records. Its generative AI conventions cover agents, the tools they call and the tokens they use.
If every agent in a system uses the same names, the dashboard, the cost report and an incident review can all read one set of data. The names below were read from the conventions on GitHub on 25 November 2026.
The four operations
The conventions name four operations for agents: create_agent, invoke_agent, invoke_workflow and execute_tool.
The choice between the middle two depends on who steers. The conventions use invoke_agent when a language model drives the flow through tool calls, and invoke_workflow when the application sets the flow itself.
A span for running an agent is named after the operation and the agent, for example invoke_agent followed by the agent's name.
Which agent did it
Three attributes identify the agent: gen_ai.agent.name, gen_ai.agent.id and gen_ai.agent.version.
The name is the human-readable one your team chose. The id is a stable unique identifier, and the version records which release of the agent ran.
To thread a whole conversation together, the conventions provide gen_ai.conversation.id. It holds one identifier for a session or thread, so every message in it can be linked.
Which tool, and with what
A tool call gets its own span, named execute_tool followed by the tool's name. The attribute gen_ai.tool.name is required on it.
gen_ai.tool.call.id carries the identifier the model or provider gave the call, when one was supplied.
The arguments and the result have their own attributes, gen_ai.tool.call.arguments and gen_ai.tool.call.result. Both are opt-in, and the conventions warn that each may contain sensitive information.
The same caution applies to the messages sent to a model. The conventions say gen_ai.input.messages "is likely to contain sensitive information including user/PII data", and it is opt-in too.
Time and tokens
gen_ai.invoke_agent.duration measures one agent or workflow run from start to finish. gen_ai.execute_tool.duration measures a single tool call.
A third metric, gen_ai.invoke_agent.tool_calls, counts how many tool calls one run makes.
On an agent span, gen_ai.usage.input_tokens and gen_ai.usage.output_tokens record the tokens that went in and came out.
For totals across many runs, the conventions point to the token metrics instead. Their reason is that those metrics aren't affected by trace sampling.
Keeping an eye on agents in practice
In a blog post on adopting agentic AI with care, the National Cyber Security Centre asks organisations to "maintain ongoing visibility of the system's operation", and to understand how to keep meaningful human oversight and control.
The fields above are one way an engineering team can give the people overseeing a system that view.
Before you build on them
Each of these documents is marked with the status Development. OpenTelemetry says a document's maturity level governs its support guarantees and the changes allowed to it.
So note which version of the conventions your instrumentation follows, and check the repository when you upgrade.
Useful links
- OpenTelemetry GenAI Semantic Conventions (GitHub)
- Agent spans (GitHub)
- Execute tool (GitHub)
- GenAI metrics (GitHub)
- Token metrics (GitHub)
- Definitions of Document Statuses (OpenTelemetry)
- Thinking carefully before adopting agentic AI (NCSC)