ami_collect_telemetry
Collects telemetry from agent runtime call records, attributing token usage, model, and timings to workflow stages, then stores the results on the run for cost measurement.
Instructions
Measure the workflow run: detects which agent runtime you are in, reads that runtime's own call records (token usage, model, timings reported by the provider), attributes each call to a stage or observed execution phase, and stores the result on the run. Returns the collected inventory fields. Use these numbers verbatim. If your runtime has no adapter, this says so and you should use ami_record_calls instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| run_id | No | Defaults to the active run. | |
| adapter | No | Force a telemetry adapter instead of detecting the runtime. Rarely needed. | |
| session_id | No | ||
| window_end | No | ISO-8601 override. | |
| window_start | No | ISO-8601 override. | |
| transcript_path | No |