> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Agent or harness statistics

> Aggregate run statistics for an Agent or coding harness.

# Query Agent or harness statistics

Use `agent__query_trace_stats` for counts, duration, cost, or error patterns.

* Required inputs: `subject_id` and `query`.
* Optional inputs: `session_id` and Gateway's `rationale`.
* Effect: read only.

Gateway applies the Agent or harness scope. Do not add an Agent, harness, or
workspace dimension to `query`.
