Setup
- Python
- TypeScript
Usage
- Python
- TypeScript
What Gets Captured
| Attribute | Description |
|---|---|
| Agent queries | Each query() call as a top-level agent span |
| Subagent invocations | Each subagent delegation via the Agent tool |
| Tool calls | Built-in tools (Read, Write, Bash, Glob, Grep, WebSearch) |
| Token usage | Aggregated input/output tokens per query |
| Cost | Total cost for the full query execution |
| Model name | The model used (e.g., claude-sonnet-4-6, claude-haiku-4-5) |
Run the example
Clone the repo and run a complete agent end-to-end.Python
Run the Python example
TypeScript
Run the TypeScript example