Hey @leandrojmp , thank you for response! Indeed, inference appeared after some time
Though, I still cannot find the wait to drilldown this usage per account
So, I want to be able address the question "which account does consume the most of the tokens?" on some graph
I found Kibana API:
POST kbn://api/agent_builder/agents/elastic-ai-agent/consumption
{"size": 25, "sort_field": "updated_at", "sort_order": "desc"}
which returns an account and token usage
However, to make it useful I need to write a little script which will execute this request every N minutes, send it to Elastic and then you this dataset to build visualizations
But maybe I missed something and such data is available somewhere else in Elastic already?
For an account-level view, I would separate the problem into collection and visualization.
First, make sure each inference request has a stable account or tenant identifier, together with a request ID, model name, input/output token counts, timestamp, latency, status, and retry information. I would avoid storing the full prompt or response by default.
Then index those usage events into a dedicated data stream. This makes it easier to build aggregations such as tokens by account, model, day, and error type. It also avoids treating a billing or inference summary endpoint as the long-term source of truth.
Before writing a scheduled collector, I would verify whether the consumption API is documented and supported for the exact Elastic version and deployment type. If it is not a stable public API, exporting the usage events at the gateway or application boundary may be more reliable.
For the dashboard, useful views would include:
input and output tokens by account
estimated cost by model
request count and error rate
retries and fallback usage
daily and monthly trends
This also makes it possible to enforce account-level limits before a request is sent, rather than detecting overuse after the billing data arrives.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.