Monitor usage and costs for Elastic Agent Builder
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
GA
9.3+
…
Generally available since 9.3
Preview in 9.2
This page covers how to monitor token usage in Elastic Agent Builder and understand how usage translates to costs across different deployment types.
For observability beyond token counts, Elastic Agent Builder can also collect detailed execution traces into your Elasticsearch deployment. To turn on trace collection and explore or alert on the data, refer to Collect agent traces.
When working with Elastic Agent Builder, total token usage typically exceeds the visible conversation text. Because Elastic Agent Builder uses an agentic framework, a single user request often triggers multiple model calls to process reasoning steps, run tools, and interpret results.
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.5 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. To keep this efficient, Elastic Agent Builder automatically routes some of these low-effort operations to a faster, lower-cost model. For details, see Fast model routing.
Token counts include:
- Input tokens: These are tokens sent to the model, which accumulate throughout the session. They include the user's current query, the conversation history from previous rounds, system prompts, and the results returned from any tools used during execution.
- Output tokens: These are tokens generated by the model. These include the final response visible to the user, as well as all internal reasoning steps, tool calls, and intermediate results generated by the model.
Each conversation round includes all previous rounds as context. This means token usage at each step depends on the entire conversation size, not only the current message.
For more information on billing and token costs, refer to Elastic pricing.
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Stack
Preview
9.4
Preview in 9.4
To retrieve per-conversation token usage data for a specific agent across users, use the token consumption API. For quick examples, refer to Token consumption.
This API complements the UI by returning token totals, round counts, LLM call counts, and warning indicators without exposing message content or tool results.
This API provides visibility into token usage but does not support setting token limits or quotas for users or agents.
At the end of each round, the total token usage is displayed after the agent response. Input tokens are represented by , and output tokens by :
To view the raw JSON response which includes detailed token information, click the View JSON button. This opens a modal with the complete, raw response data:
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.5 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Generally available This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. These counts are specific to each Elastic Agent Builder response. To monitor aggregate token usage across all AI features in Kibana, turn on token usage tracking and use the managed dashboard. Refer to Track token usage across AI features.
How Elastic Agent Builder usage is billed depends on your deployment type.
On Elastic Cloud Serverless, Elastic Agent Builder usage is billed based on executions. An execution is measured by each completed interaction with an AI agent (a chat input and output). More complex interactions, measured by the number of input tokens used, are metered for additional executions. Each unit of 50,000 input tokens counts as one additional execution. If the agent encounters an error and does not return a response, no executions are metered.
Every Serverless project includes a free monthly allocation of agent executions, and volume tier discounts apply at higher usage levels. If your usage stays within the free allocation, there is no impact to your bill.
Example: In the following conversation round, the agent used 91,613 input tokens. This results in 2 Elastic Agent Builder executions (1 base execution + 1 additional execution for the second block of 50,000 input tokens).
When an agent triggers a workflow as part of its response, the workflow execution is metered separately. Each Serverless project also includes a free monthly allocation of workflow executions.
For detailed rates, free allocations, and tier breakpoints, refer to the billing dimensions page for your solution:
- Elasticsearch Serverless billing dimensions
- Elastic Observability Serverless billing dimensions
- Elastic Security Serverless billing dimensions
For general pricing information, refer to Elastic pricing.
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Stack
9.5+
Generally available since 9.5
On Elastic Cloud Hosted, Elastic Agent Builder usage is billed based on executions. Each completed interaction with an agent counts as at least one execution. Interactions that use more than 50,000 input tokens count as additional executions in 50,000-token increments. If the agent encounters an error and does not return a response, no executions are metered.
The first 10,000 Elastic Agent Builder executions across the Elastic Cloud Hosted deployments in an Elastic Cloud organization each month are included. Additional executions are billed according to the published amounts.
When an agent invokes a workflow, the workflow execution is metered separately. Refer to the Hosted add-ons pricing table for current billing amounts.
This billing model doesn't apply to Elastic Cloud Hosted FedRAMP authorized Cloud offerings, which remain under promotional pricing.
Elastic Agent Builder and workflows on self-managed deployments are currently under promotional pricing and available at no additional charge. Elastic Agent Builder is included with the Enterprise license tier.