> For the complete documentation index, see [llms.txt](https://docs.otari.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otari.ai/api-reference/agent-telemetry.md).

# Agent telemetry

## Delete Agent Telemetry Rows

> Delete agent\_telemetry rows by explicit ids or by filter.\
> \
> Target either an explicit selection (\`ids\`) or everything matching a filter\
> (\`by\_filter: true\` plus optional \`user\_id\` / \`api\_key\_id\` / \`name\` / date\
> range). A selection matching zero rows succeeds with \`deleted: 0\`.\
> Master-key only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"AgentTelemetryDeleteRequest":{"description":"Selection of agent_telemetry rows to delete.","properties":{"api_key_id":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"title":"Api Key Id"},"by_filter":{"default":false,"title":"By Filter","type":"boolean"},"end_date":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"End Date"},"ids":{"anyOf":[{"items":{"type":"string"},"maxItems":1000,"type":"array"},{"type":"null"}],"title":"Ids"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"start_date":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Start Date"},"user_id":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"title":"User Id"}},"title":"AgentTelemetryDeleteRequest","type":"object"},"AgentTelemetryDeleteResult":{"description":"How many rows the delete removed.","properties":{"deleted":{"default":0,"title":"Deleted","type":"integer"}},"title":"AgentTelemetryDeleteResult","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/agent-telemetry":{"delete":{"description":"Delete agent_telemetry rows by explicit ids or by filter.\n\nTarget either an explicit selection (`ids`) or everything matching a filter\n(`by_filter: true` plus optional `user_id` / `api_key_id` / `name` / date\nrange). A selection matching zero rows succeeds with `deleted: 0`.\nMaster-key only.","operationId":"agent-telemetry-delete_agent_telemetry_rows","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTelemetryDeleteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTelemetryDeleteResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Delete Agent Telemetry Rows","tags":["agent-telemetry"]}}}}
```

## Count Agent Telemetry

> Total agent\_telemetry rows matching the given filters.\
> \
> The filter set mirrors the purge endpoint's, so this sizes exactly what a\
> "delete all N matching" would remove. Behavioral and metric rows are counted\
> together: neither this nor the purge distinguishes them. Master-key only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"AgentTelemetryCount":{"description":"Total number of agent_telemetry rows matching a set of filters.","properties":{"total":{"title":"Total","type":"integer"}},"required":["total"],"title":"AgentTelemetryCount","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/agent-telemetry/count":{"get":{"description":"Total agent_telemetry rows matching the given filters.\n\nThe filter set mirrors the purge endpoint's, so this sizes exactly what a\n\"delete all N matching\" would remove. Behavioral and metric rows are counted\ntogether: neither this nor the purge distinguishes them. Master-key only.","operationId":"agent-telemetry-count_agent_telemetry","parameters":[{"description":"Return rows with timestamp >= start_date (ISO 8601 or Unix epoch seconds)","in":"query","name":"start_date","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Return rows with timestamp >= start_date (ISO 8601 or Unix epoch seconds)","title":"Start Date"}},{"description":"Return rows with timestamp < end_date (ISO 8601 or Unix epoch seconds)","in":"query","name":"end_date","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Return rows with timestamp < end_date (ISO 8601 or Unix epoch seconds)","title":"End Date"}},{"description":"Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.","in":"query","name":"user_id","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"description":"Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.","title":"User Id"}},{"description":"Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.","in":"query","name":"api_key_id","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"description":"Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.","title":"Api Key Id"}},{"description":"Filter to a single event type or metric name (e.g. 'tool_result', 'claude_code.commit.count')","in":"query","name":"name","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to a single event type or metric name (e.g. 'tool_result', 'claude_code.commit.count')","title":"Name"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTelemetryCount"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Count Agent Telemetry","tags":["agent-telemetry"]}}}}
```

## Agent Telemetry Series

> Row volume over time, split by user or API key.\
> \
> Mirrors \`/api/v1/usage/series\`: same window bounds and bucket-grid cap, the top\
> groups as their own series with the remainder folded into a reconciling\
> \`\`other\`\`, and sparse points (populated cells only). Counts rows, not spend,\
> so it charts telemetry volume rather than cost. Master-key only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"AgentTelemetryGroupedSeries":{"description":"A per-group row-volume series, for stacked charting.","properties":{"bucket":{"enum":["hour","day"],"title":"Bucket","type":"string"},"end_date":{"title":"End Date","type":"string"},"group_by":{"enum":["user_id","api_key_id"],"title":"Group By","type":"string"},"groups":{"items":{"$ref":"#/components/schemas/AgentTelemetryGroupRow"},"title":"Groups","type":"array"},"points":{"items":{"$ref":"#/components/schemas/AgentTelemetryGroupedSeriesPoint"},"title":"Points","type":"array"},"start_date":{"title":"Start Date","type":"string"}},"required":["start_date","end_date","bucket","group_by","groups","points"],"title":"AgentTelemetryGroupedSeries","type":"object"},"AgentTelemetryGroupRow":{"description":"One group of a grouped series. ``key`` is null for the ``other`` fold and\nfor a real group whose column is NULL (e.g. a since-deleted user);\n``is_other`` separates the two.","properties":{"is_other":{"default":false,"title":"Is Other","type":"boolean"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"rows":{"title":"Rows","type":"integer"}},"required":["key","rows"],"title":"AgentTelemetryGroupRow","type":"object"},"AgentTelemetryGroupedSeriesPoint":{"description":"One (bucket, group) cell: how many rows that group recorded in that bucket.","properties":{"bucket_start":{"title":"Bucket Start","type":"string"},"is_other":{"default":false,"title":"Is Other","type":"boolean"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"rows":{"title":"Rows","type":"integer"}},"required":["bucket_start","key","rows"],"title":"AgentTelemetryGroupedSeriesPoint","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/agent-telemetry/series":{"get":{"description":"Row volume over time, split by user or API key.\n\nMirrors `/api/v1/usage/series`: same window bounds and bucket-grid cap, the top\ngroups as their own series with the remainder folded into a reconciling\n``other``, and sparse points (populated cells only). Counts rows, not spend,\nso it charts telemetry volume rather than cost. Master-key only.","operationId":"agent-telemetry-agent_telemetry_series","parameters":[{"description":"Dimension to split the series by","in":"query","name":"group_by","required":true,"schema":{"description":"Dimension to split the series by","enum":["user_id","api_key_id"],"title":"Group By","type":"string"}},{"description":"Return rows with timestamp >= start_date (ISO 8601 or Unix epoch seconds)","in":"query","name":"start_date","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Return rows with timestamp >= start_date (ISO 8601 or Unix epoch seconds)","title":"Start Date"}},{"description":"Return rows with timestamp < end_date (ISO 8601 or Unix epoch seconds)","in":"query","name":"end_date","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Return rows with timestamp < end_date (ISO 8601 or Unix epoch seconds)","title":"End Date"}},{"description":"Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.","in":"query","name":"user_id","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"description":"Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.","title":"User Id"}},{"description":"Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.","in":"query","name":"api_key_id","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"description":"Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.","title":"Api Key Id"}},{"description":"Filter to a single event type or metric name (e.g. 'tool_result', 'claude_code.commit.count')","in":"query","name":"name","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to a single event type or metric name (e.g. 'tool_result', 'claude_code.commit.count')","title":"Name"}},{"description":"Time-series granularity: 'hour' or 'day'","in":"query","name":"bucket","required":false,"schema":{"default":"day","description":"Time-series granularity: 'hour' or 'day'","enum":["hour","day"],"title":"Bucket","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTelemetryGroupedSeries"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Agent Telemetry Series","tags":["agent-telemetry"]}}}}
```

## Agent Telemetry Summary

> What the coding agent produced in a window, and what it cost.\
> \
> Range-bounded like \`/api/v1/usage/summary\` (default last 30 days, hard-capped),\
> so the aggregates stay served by the timestamp index. Returns the outcome\
> totals (commits, pull requests, lines changed, active time), the behavioral\
> counts already captured from the logs signal (tool calls and their mix, tool\
> accept/reject, turns, API errors), the recorded spend over the same scope,\
> and the derived per-unit measures: cost per commit / pull request / line,\
> spend per active hour, acceptance rate, turns per session, and error rate.\
> Each measure is null rather than an error when its denominator is zero.\
> Filterable by user, API key, and \`session\_label\`, so cost per outcome can be\
> read for one agent session as well as for a whole window.\
> \
> The spend side is every usage row in scope, not only the agent's: unfiltered,\
> that includes traffic from clients that never reported telemetry, so a\
> per-outcome measure read over a whole deployment answers "what did this\
> deployment spend per commit", not "what did the agent spend per commit".\
> Filter by user, API key, or session to divide only the matching spend.\
> \
> Outcome metrics are stored exactly as the agent reported them, so a\
> cumulative counter is converted to a window increment here, at read time,\
> diffed per series generation: a re-exported total adds nothing, and a counter\
> reset never reads as negative work. Master-key only.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"AgentTelemetrySummary":{"description":"Agent outcomes and behavior for the window, joined against recorded spend.","properties":{"behavior":{"$ref":"#/components/schemas/AgentTelemetryBehavior"},"bucket":{"enum":["hour","day"],"title":"Bucket","type":"string"},"end_date":{"title":"End Date","type":"string"},"measures":{"$ref":"#/components/schemas/AgentTelemetryMeasures"},"outcomes":{"$ref":"#/components/schemas/AgentTelemetryOutcomes"},"series":{"items":{"$ref":"#/components/schemas/AgentTelemetrySeriesPoint"},"title":"Series","type":"array"},"start_date":{"title":"Start Date","type":"string"},"usage":{"$ref":"#/components/schemas/AgentTelemetryUsage"}},"required":["start_date","end_date","bucket","usage","outcomes","behavior","measures","series"],"title":"AgentTelemetrySummary","type":"object"},"AgentTelemetryBehavior":{"description":"Counts from the behavioral events already captured on the logs signal.","properties":{"api_errors":{"default":0,"title":"Api Errors","type":"integer"},"by_tool":{"default":[],"items":{"$ref":"#/components/schemas/AgentTelemetryToolRow"},"title":"By Tool","type":"array"},"sessions":{"default":0,"title":"Sessions","type":"integer"},"tool_accepts":{"default":0,"title":"Tool Accepts","type":"integer"},"tool_calls":{"default":0,"title":"Tool Calls","type":"integer"},"tool_rejects":{"default":0,"title":"Tool Rejects","type":"integer"},"turns":{"default":0,"title":"Turns","type":"integer"}},"title":"AgentTelemetryBehavior","type":"object"},"AgentTelemetryToolRow":{"description":"Tool call volume for one tool. ``tool`` is null for a call with no name.","properties":{"calls":{"title":"Calls","type":"integer"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},"required":["tool","calls"],"title":"AgentTelemetryToolRow","type":"object"},"AgentTelemetryMeasures":{"description":"Cost and quality per unit of work. Each is null when its denominator is zero.\n\n``edit_acceptance_rate`` and ``tool_acceptance_rate`` are the same quantity\ntoday, both derived from the ``tool_decision`` event: the agent's own\n``code_edit_tool.decision`` metric is deliberately never stored, since\n``tool_decision`` already carries that accept/reject signal. Both names are\nreported so a caller reading either vocabulary gets the right number.","properties":{"cost_per_commit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Commit"},"cost_per_line":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Line"},"cost_per_pull_request":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Pull Request"},"edit_acceptance_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Edit Acceptance Rate"},"error_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Error Rate"},"spend_per_active_hour":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend Per Active Hour"},"tool_acceptance_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tool Acceptance Rate"},"turns_per_session":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Turns Per Session"}},"title":"AgentTelemetryMeasures","type":"object"},"AgentTelemetryOutcomes":{"description":"How much work the agent produced inside the window.\n\nEach value is the read-time increment for its metric: a delta series is\nsummed, a cumulative one is diffed per series generation, so a counter that\nis re-reported in full on every export is never counted twice.\n``lines_of_code`` sums the added and removed series, which are stored\nseparately. ``active_time`` is in seconds, as the agent reports it.","properties":{"active_time":{"default":0,"title":"Active Time","type":"number"},"commits":{"default":0,"title":"Commits","type":"number"},"lines_of_code":{"default":0,"title":"Lines Of Code","type":"number"},"pull_requests":{"default":0,"title":"Pull Requests","type":"number"}},"title":"AgentTelemetryOutcomes","type":"object"},"AgentTelemetrySeriesPoint":{"description":"One UTC time bucket of outcomes, behavior, and the spend beside them.\n\nA cumulative series' increment is attributed to the bucket of the later point\nof each consecutive pair, so a bucket reports the growth observed inside it.","properties":{"active_time":{"default":0,"title":"Active Time","type":"number"},"api_errors":{"default":0,"title":"Api Errors","type":"integer"},"bucket_start":{"title":"Bucket Start","type":"string"},"commits":{"default":0,"title":"Commits","type":"number"},"cost":{"default":0,"title":"Cost","type":"number"},"lines_of_code":{"default":0,"title":"Lines Of Code","type":"number"},"pull_requests":{"default":0,"title":"Pull Requests","type":"number"},"tool_calls":{"default":0,"title":"Tool Calls","type":"integer"},"turns":{"default":0,"title":"Turns","type":"integer"}},"required":["bucket_start"],"title":"AgentTelemetrySeriesPoint","type":"object"},"AgentTelemetryUsage":{"description":"The recorded spend the measures below divide, reported so they can be checked.","properties":{"cost":{"default":0,"title":"Cost","type":"number"},"requests":{"default":0,"title":"Requests","type":"integer"}},"title":"AgentTelemetryUsage","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/agent-telemetry/summary":{"get":{"description":"What the coding agent produced in a window, and what it cost.\n\nRange-bounded like `/api/v1/usage/summary` (default last 30 days, hard-capped),\nso the aggregates stay served by the timestamp index. Returns the outcome\ntotals (commits, pull requests, lines changed, active time), the behavioral\ncounts already captured from the logs signal (tool calls and their mix, tool\naccept/reject, turns, API errors), the recorded spend over the same scope,\nand the derived per-unit measures: cost per commit / pull request / line,\nspend per active hour, acceptance rate, turns per session, and error rate.\nEach measure is null rather than an error when its denominator is zero.\nFilterable by user, API key, and `session_label`, so cost per outcome can be\nread for one agent session as well as for a whole window.\n\nThe spend side is every usage row in scope, not only the agent's: unfiltered,\nthat includes traffic from clients that never reported telemetry, so a\nper-outcome measure read over a whole deployment answers \"what did this\ndeployment spend per commit\", not \"what did the agent spend per commit\".\nFilter by user, API key, or session to divide only the matching spend.\n\nOutcome metrics are stored exactly as the agent reported them, so a\ncumulative counter is converted to a window increment here, at read time,\ndiffed per series generation: a re-exported total adds nothing, and a counter\nreset never reads as negative work. Master-key only.","operationId":"agent-telemetry-agent_telemetry_summary","parameters":[{"description":"Return rows with timestamp >= start_date (ISO 8601 or Unix epoch seconds)","in":"query","name":"start_date","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Return rows with timestamp >= start_date (ISO 8601 or Unix epoch seconds)","title":"Start Date"}},{"description":"Return rows with timestamp < end_date (ISO 8601 or Unix epoch seconds)","in":"query","name":"end_date","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Return rows with timestamp < end_date (ISO 8601 or Unix epoch seconds)","title":"End Date"}},{"description":"Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.","in":"query","name":"user_id","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"description":"Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.","title":"User Id"}},{"description":"Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.","in":"query","name":"api_key_id","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"description":"Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.","title":"Api Key Id"}},{"description":"Filter to a single agent session. Matches agent_telemetry.session_label and, on the usage side of the join, the usage_logs.source_label that /api/v1/usage/summary filters on","in":"query","name":"session_label","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to a single agent session. Matches agent_telemetry.session_label and, on the usage side of the join, the usage_logs.source_label that /api/v1/usage/summary filters on","title":"Session Label"}},{"description":"Time-series granularity: 'hour' or 'day'","in":"query","name":"bucket","required":false,"schema":{"default":"day","description":"Time-series granularity: 'hour' or 'day'","enum":["hour","day"],"title":"Bucket","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTelemetrySummary"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Agent Telemetry Summary","tags":["agent-telemetry"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otari.ai/api-reference/agent-telemetry.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
