Agent Analytics taxonomy
This feature is in Early Access. During this time, aspects of the functionality may still be developed, and this documentation may not always be up to date. If you have any questions, contact Amplitude Support.
[Agent] event, the properties on the enrichment events, and the default signals. To read these results in the UI, go to Analyze agent results. To emit the events from your code, go to the Agent Analytics SDK.The taxonomy is configurable and still evolving during Open Beta. Treat the lists below as the default shape, and confirm the live set against your own event stream.
Data hierarchy
Agent Analytics models each agent interaction as a hierarchy:
- Session: One job a user hands the agent, from start to finish. Amplitude identifies a session with the
[Agent] Session IDproperty. The agent session differs from Amplitude's standard-analytics session ($session_id), which is the user's app or web visit. - Turn: A single back-and-forth exchange within a session: a user message, the agent's tool calls, and the AI response.
- Span: A sub-turn step, such as a tool call, vector search, rerank, or guardrail.
Every user message, AI response, and tool call lands as an independent Amplitude event, so you can use agent data in funnels, cohorts, and retention charts without decomposing a trace first.
Event inventory
Agent Analytics produces these events. Your SDK instrumentation produces the first seven — either through direct SDK calls or through OTEL spans when enable_otel() / enableOtel() is active (the SDK maps spans to events automatically). The server enrichment pipeline produces the rest after a session closes.
| Event | Producer | SDK method |
|---|---|---|
[Agent] User Message | SDK | track_user_message() |
[Agent] AI Response | SDK | track_ai_message() |
[Agent] Tool Call | SDK | track_tool_call() |
[Agent] Embedding | SDK | track_embedding() |
[Agent] Span | SDK | track_span() |
[Agent] Session End | SDK | track_session_end() |
[Agent] Session Enrichment | SDK | track_session_enrichment() |
[Agent] Session Record | Server enrichment pipeline | Internal |
[Agent] Evaluator Result | Server enrichment pipeline | Internal |
[Agent] Score | SDK, or server for feedback | score() |
SDK events
Your instrumentation produces these events as the agent runs. The [Agent] AI Response event carries the per-response model, provider, token, latency, and cost properties.
[Agent] User Message: a message the user sends to the agent.[Agent] AI Response: the agent's response, with model, provider, tokens, latency, and cost.[Agent] Tool Call: a function or tool the agent invokes.[Agent] Embedding: an embedding or vector-search step.[Agent] Span: any other pipeline step, such as a rerank or guardrail.[Agent] Session End: marks the end of a session.[Agent] Session Enrichment: your own session labels, sent incustomer_enrichedprivacy mode.
All SDK event properties are prefixed with [Agent], except [Amplitude] Session Replay ID. The tables below list the properties the SDK emits, grouped by event. Optional properties are populated when the relevant data is available and the privacy mode permits it.
Common properties
These properties can appear on any SDK event.
| Property | Type | Required | Description |
|---|---|---|---|
[Agent] Session ID | string | Yes | Session identifier. Every event in one agent session shares it. |
[Agent] Component Type | string | Yes | Component that produced the event: user_input, llm, tool, or embedding. |
[Agent] SDK Version | string | Yes | Version of the SDK that produced the event. |
[Agent] Runtime | string | Yes | SDK runtime: node or python. |
[Agent] Trace ID | string | No | Groups events into one turn in the trace viewer. Events without it fall back to the session ID. |
[Agent] Turn ID | number | No | Monotonically increasing counter that orders events within a session. |
[Agent] Agent ID | string | No | Which agent handled the interaction (for example, support-bot). |
[Agent] Parent Agent ID | string | No | In multi-agent delegation, the agent that delegated to this one. |
[Agent] Customer Org ID | string | No | Tenant organization ID for multi-tenant platforms. Enables account-level group analytics. |
[Agent] Agent Version | string | No | Agent code version. Enables version-over-version quality comparison. |
[Agent] Agent Description | string | No | Human-readable description of the agent's purpose. |
[Agent] Context | string | No | Serialized JSON of your segmentation dimensions. Refer to Add segmentation with context. |
[Agent] Env | string | No | Deployment environment: production, staging, or dev. |
[Agent] Message Source | string | No | user for end-user input, or agent for inter-agent delegation. Provider wrappers set it automatically. |
[Agent] Locale | string | No | User locale, such as en-US. |
[Amplitude] Session Replay ID | string | No | Links to Session Replay, in device_id/session_id form. |
Deployment and OTEL metadata
These optional properties can appear on any SDK event when configured.
| Property | Type | Description |
|---|---|---|
[Agent] Git SHA | string | Commit SHA of the deployed build. Use for correlating agent behavior with specific deploys. |
[Agent] Git Ref | string | Branch or tag name (for example, main or v2.1.0). |
[Agent] Git Repo | string | Repository identifier (for example, org/repo). |
[Agent] Tags | string[] | Custom string tags for ad-hoc grouping (for example, ["beta", "internal"]). |
[Agent] Span Kind | string | OTEL span routing hint when OTEL is enabled. Maps the span to an event type (tool, llm, agent, span). |
[Agent] User Message properties
In addition to the common properties.
| Property | Type | Required | Description |
|---|---|---|---|
[Agent] Message ID | string | Yes | Unique ID for this message. Links scores and tool calls back to the message. |
[Agent] Is Regeneration | boolean | No | Whether the user asked the AI to regenerate a previous response. A negative quality signal. |
[Agent] Is Edit | boolean | No | Whether the user edited a previous message and resubmitted. |
[Agent] Edited Message ID | string | No | The Message ID of the original message that was edited. |
[Agent] Has Attachments | boolean | No | Whether the message includes file attachments. |
[Agent] Attachment Types | string[] | No | Distinct attachment types (for example, pdf, image). |
[Agent] Attachment Count | number | No | Number of attachments on the message. |
[Agent] Total Attachment Size Bytes | number | No | Total size of all attachments, in bytes. |
[Agent] Attachments | string | No | Serialized JSON of attachment metadata (type, name, size). Metadata only, never file content. |
[Agent] Message Labels | string | No | Serialized JSON of label objects. Used for routing tags, classifier output, or business context. |
[Agent] Message Source | string | No | user for real end-user input, or agent for a parent agent's instructions to a child. |
[Agent] AI Response properties
In addition to the common properties.
| Property | Type | Required | Description |
|---|---|---|---|
[Agent] Message ID | string | Yes | Unique ID for this response. |
[Agent] Model Name | string | Yes | Model identifier (for example, gpt-4o, claude-sonnet-4-20250514). |
[Agent] Provider | string | Yes | Provider name (for example, openai, anthropic, google, mistral, bedrock). |
[Agent] Latency Ms | number | Yes | Total wall-clock latency for the call, in milliseconds. |
[Agent] Is Error | boolean | Yes | Whether the response represents an error. |
[Agent] Error Message | string | No | Error text when Is Error is true. |
[Agent] Error Type | string | No | Exception class name when Is Error is true. Lets tooling group failures by type. |
[Agent] TTFB Ms | number | No | Time to first token, in milliseconds. Measures perceived responsiveness for streaming. |
[Agent] Input Tokens | number | No | Prompt tokens consumed. Cache-inclusive (refer to Manage cost and tokens). |
[Agent] Output Tokens | number | No | Completion tokens generated. |
[Agent] Total Tokens | number | No | Input plus output tokens. |
[Agent] Reasoning Tokens | number | No | Tokens spent on reasoning or thinking (o1, o3, extended-thinking models). |
[Agent] Cache Read Tokens | number | No | Input tokens served from the provider's prompt cache, at a cheaper rate. |
[Agent] Cache Creation Tokens | number | No | Input tokens that created new prompt-cache entries. |
[Agent] Cost USD | number | No | Estimated cost in USD. Cache-aware when cache token counts are provided. |
[Agent] Finish Reason | string | No | Why the model stopped: stop, end_turn, tool_use, length, content_filter, and so on. |
[Agent] Is Streaming | boolean | No | Whether the response streamed. |
[Agent] Model Tier | string | No | Auto-inferred tier: fast, standard, or reasoning. |
[Agent] Was Cached | boolean | No | Whether the response was served from a semantic or full-response cache. |
[Agent] Was Copied | boolean | No | Whether the user copied the response. An implicit positive quality signal. |
[Agent] Has Reasoning | boolean | No | Whether the response included reasoning content. |
[Agent] Reasoning Content | string | No | The reasoning content, when available and the privacy mode permits. |
[Agent] System Prompt | string | No | The system prompt used, when the privacy mode permits. |
[Agent] System Prompt Length | number | No | Character length of the system prompt. |
[Agent] Tool Calls | string | No | Serialized JSON of tool-call requests the AI made in this response. |
[Agent] Tool Definitions | string | No | Normalized JSON of the tool definitions sent to the LLM, when the privacy mode permits. |
[Agent] Tool Definitions Count | number | No | Number of tool definitions in the request. |
[Agent] Tool Definitions Hash | string | No | Stable hash of the tool definitions. Always present; enables toolset-change detection without exposing schemas. |
[Agent] Temperature | number | No | Temperature parameter used for the call. |
[Agent] Max Output Tokens | number | No | Maximum output tokens configured for the call. |
[Agent] Top P | number | No | Top-p (nucleus sampling) parameter used for the call. |
[Agent] Prompt ID | string | No | Identifier for the prompt template or version used. |
[Agent] Message Labels | string | No | Serialized JSON of label objects attached to the response. |
[Agent] Tool Call properties
In addition to the common properties.
| Property | Type | Required | Description |
|---|---|---|---|
[Agent] Invocation ID | string | Yes | Unique ID for this tool invocation. Links tool calls to parent messages. |
[Agent] Tool Name | string | Yes | Name of the tool that was invoked (for example, search_docs). |
[Agent] Tool Success | boolean | Yes | Whether the tool call completed successfully. |
[Agent] Latency Ms | number | Yes | Total wall-clock latency for the call, in milliseconds. |
[Agent] Is Error | boolean | Yes | Whether the call represents an error. |
[Agent] Tool Type | string | No | Origin of the tool: python (native in-process), mcp (served by a connected MCP server), flow (sub-agent delegation), or unknown. |
[Agent] Tool Owner | string | No | Who owns the tool: amplitude (Amplitude-built or operated) or customer (a server the customer connected). |
[Agent] Tool Input | string | No | Serialized JSON of the tool's input arguments. Sent only in full privacy mode. |
[Agent] Tool Output | string | No | Serialized JSON of the tool's return value. Sent only in full privacy mode. |
[Agent] Parent Message ID | string | No | The Message ID of the user message that triggered the tool call. |
[Agent] Embedding properties
In addition to the common properties.
| Property | Type | Required | Description |
|---|---|---|---|
[Agent] Span ID | string | Yes | Unique ID for the embedding operation. |
[Agent] Model Name | string | Yes | Embedding model identifier. |
[Agent] Provider | string | Yes | Provider name. |
[Agent] Latency Ms | number | Yes | Wall-clock latency for the operation, in milliseconds. |
[Agent] Input Tokens | number | No | Input tokens processed by the embedding model. |
[Agent] Embedding Dimensions | number | No | Dimensionality of the output vector. |
[Agent] Cost USD | number | No | Estimated cost in USD. Auto-calculated from input tokens; pass a value to override. |
[Agent] Span properties
In addition to the common properties.
| Property | Type | Required | Description |
|---|---|---|---|
[Agent] Span ID | string | Yes | Unique ID for the span. |
[Agent] Span Name | string | Yes | Name of the operation (for example, rag_pipeline, vector_search). |
[Agent] Latency Ms | number | Yes | Wall-clock latency for the span, in milliseconds. |
[Agent] Is Error | boolean | Yes | Whether the span represents an error. |
[Agent] Parent Span ID | string | No | Span ID of the parent span, for nested pipeline steps. |
[Agent] Input State | string | No | Serialized JSON of the span's input state. Sent only in full privacy mode. |
[Agent] Output State | string | No | Serialized JSON of the span's output state. Sent only in full privacy mode. |
[Agent] Session End properties
In addition to the common properties.
| Property | Type | Description |
|---|---|---|
[Agent] Abandonment Turn | number | Turn ID of the last user message that got a response before the user left. Low values signal early drop-off. |
[Agent] Session Idle Timeout Minutes | number | The session's idle timeout. Tells the server how long to wait before auto-closing the session. |
[Agent] Enrichments | string | Serialized JSON of any enrichments provided at session close. |
[Agent] Session Enrichment properties
Sent in customer_enriched privacy mode. In addition to the common properties.
| Property | Type | Required | Description |
|---|---|---|---|
[Agent] Enrichments | string | Yes | Serialized JSON of your session enrichments: outcome, quality and sentiment scores, flags, and message labels. |
[Agent] Score properties
[Agent] Score carries explicit user feedback. In addition to the common properties.
| Property | Type | Required | Description |
|---|---|---|---|
[Agent] Score Name | string | Yes | Name of the score (for example, user-feedback). |
[Agent] Score Value | number | Yes | Numeric value: binary (0/1), continuous (0.0–1.0), or a rating scale. |
[Agent] Target ID | string | Yes | The Message ID or Session ID being scored. |
[Agent] Target Type | string | Yes | What is being scored: message or session. |
[Agent] Evaluation Source | string | Yes | Source of the score. For SDK feedback this is user or reviewer. |
[Agent] Comment | string | No | Optional text explanation. Respects the privacy mode. |
Event JSON examples
These examples show what the SDK sends to Amplitude. Property names and the$llm_message content shape are the same whether you use the SDK or send events directly.{
"event_type": "[Agent] AI Response",
"user_id": "user-42",
"event_properties": {
"[Agent] Session ID": "sess-abc123",
"[Agent] Trace ID": "trace-def456",
"[Agent] Turn ID": 2,
"[Agent] Message ID": "msg-789xyz",
"[Agent] Model Name": "gpt-4o",
"[Agent] Provider": "openai",
"[Agent] Model Tier": "standard",
"[Agent] Latency Ms": 1203,
"[Agent] Input Tokens": 150,
"[Agent] Output Tokens": 847,
"[Agent] Total Tokens": 997,
"[Agent] Cost USD": 0.0042,
"[Agent] Is Error": false,
"[Agent] Finish Reason": "stop",
"[Agent] Component Type": "llm",
"[Agent] Agent ID": "support-bot",
"[Agent] Env": "production",
"[Agent] SDK Version": "1.0.0",
"[Agent] Runtime": "node"
}
}
{
"event_type": "[Agent] User Message",
"user_id": "user-42",
"event_properties": {
"[Agent] Session ID": "sess-abc123",
"[Agent] Turn ID": 1,
"[Agent] Message ID": "msg-123abc",
"[Agent] Component Type": "user_input",
"[Agent] Agent ID": "support-bot",
"[Agent] SDK Version": "1.0.0",
"[Agent] Runtime": "node",
"$llm_message": { "text": "How do I reset my password?" }
}
}
{
"event_type": "[Agent] Tool Call",
"user_id": "user-42",
"event_properties": {
"[Agent] Session ID": "sess-abc123",
"[Agent] Turn ID": 3,
"[Agent] Invocation ID": "inv-456def",
"[Agent] Tool Name": "search_knowledge_base",
"[Agent] Tool Success": true,
"[Agent] Is Error": false,
"[Agent] Latency Ms": 340,
"[Agent] Component Type": "tool",
"[Agent] Agent ID": "support-bot",
"[Agent] SDK Version": "1.0.0",
"[Agent] Runtime": "node"
}
}
{
"event_type": "[Agent] Score",
"user_id": "user-42",
"event_properties": {
"[Agent] Score Name": "thumbs-up",
"[Agent] Score Value": 1,
"[Agent] Target ID": "msg-789xyz",
"[Agent] Target Type": "message",
"[Agent] Evaluation Source": "user",
"[Agent] Session ID": "sess-abc123",
"[Agent] Agent ID": "support-bot",
"[Agent] SDK Version": "1.0.0",
"[Agent] Runtime": "node"
}
}
Server enrichment events
After a session closes, the enrichment pipeline assesses it and writes two events back to your event stream.
Session Record
[Agent] Session Record lands once per session. It carries the session rollups, the always-on signal results, and quality flags.
| Property | Type | Description |
|---|---|---|
[Agent] Turn Count | number | Number of turns in the session. |
[Agent] Session Total Tokens | number | Total LLM tokens across all turns. |
[Agent] Session Avg Latency Ms | number | Average AI response latency in milliseconds across the session. |
[Agent] Models Used | string[] | The LLM models used in the session. |
[Agent] Has Negative Feedback | boolean | Whether the user expressed dissatisfaction during the session. |
[Agent] Has Technical Failure | boolean | Whether technical errors occurred, such as tool timeouts or API failures. |
[Agent] Technical Error Count | number | Count of technical errors in the session. |
[Agent] Has Data Quality Issues | boolean | Whether the AI output had data quality problems, such as wrong data or hallucinations. |
[Agent] Root Agent Name | string | The entry-point agent in a multi-agent flow. |
[Agent] Agent Chain Depth | number | Number of agents in the delegation chain. |
Evaluator Result
[Agent] Evaluator Result lands once per evaluator per session. It is the unified event for every server-side evaluation: signal detectors, topic classifiers, and rubric scorers.
| Property | Type | Description |
|---|---|---|
[Agent] Evaluator Name | string | The evaluator that produced this result. For topic classifications, this is the topic model name, such as product_area. |
[Agent] Evaluator Output Type | string | The result shape: binary, classification, or score. |
[Agent] Binary Label | boolean | For binary evaluators, whether the condition was detected. |
[Agent] Primary Label | string | For classification evaluators, the primary label assigned. |
[Agent] Selection Mode | string | Whether the topic model assigns a single label (MECE) or multiple. |
[Agent] Rationale | string | The model's explanation for the result. |
[Agent] Evidence | string | Supporting evidence the model cited. |
[Agent] Evaluator Model | string | The LLM that ran the evaluation. |
[Agent] Evaluation Source | string | Where the evaluation came from: ai, user, or reviewer. |
[Agent] Evaluator Version | string | The evaluator config version that produced this result. |
[Agent] Evaluated At | number | Epoch milliseconds when the result was computed. |
User feedback scores
[Agent] Score records explicit user feedback, such as a thumbs up or down on a response. Scores come from your application through the SDK's score() method, not from the enrichment pipeline. To send scores, go to Send user feedback (scores).Signals
Signals are the default, always-on evaluators that Amplitude runs on every closed session. They land as [Agent] Evaluator Result events. You don't configure them, and Amplitude refines them over time, so treat them as directional.
| Signal | Output | What it measures |
|---|---|---|
| Task completion | binary | Whether the agent completed the user's task. |
| Response quality | score (0.0 to 1.0) | Whether responses were accurate and well-formed. |
| User friction | binary | Whether the user expressed dissatisfaction. |
| User intent | classification | The user's intent for the session. |
| Session safety | classification | Classifies the session as Normal, Off Topic, Prompt Injection, Abuse, Probing, Unsafe Output, or Data Leak. |
| Data quality | code-based check | Flags wrong data or hallucination patterns. Returns a clear result rather than a generated rationale. |
Topics and custom evaluators
Beyond the default signals, you define your own topic models and evaluators. The enrichment taxonomy is fully configurable: topic model names such asquery_intent and product_area, and evaluator names such as task_completion, come from configuration and differ per project. To create and refine your own evaluators, go to Create and refine custom evaluators.Deprecated events
[Agent] Topic Classification is deprecated. Topic classifications now land as [Agent] Evaluator Result events with an output type of classification. Rubric scores also moved off [Agent] Score onto [Agent] Evaluator Result with an output type of score. [Agent] Score now carries user feedback only.
Was this helpful?