ajshedivy/agno-cookbook/agentos-api-traces
Claude Code and agent skill by ajshedivy/agno-cookbook
- community
Checking that the SKILL.md file is still in the repository.
Interact with AgentOS Traces API endpoints using the AgentOSClient SDK. For standard operations (listing traces, getting trace details, viewing stats), use the provided CLI script first. Only write custom Python when the script cannot handle the use case (e.g., debugging workflows that chain agent runs with trace inspection, custom filtering, or integration tests). Trigger when: importing AgentOSClient to work with traces, writing scripts to debug agent runs, creating trace tests, or asking things like "show me the traces from my last agent run" or "how many tokens did my agent use?"
Install
npx vskill@latest install ajshedivy/agno-cookbook/agentos-api-tracesSKILL.md
The same SKILL.md was published earlier as ajshedivy/agno-cookbook/agentos-api-traces.
AgentOS Traces API
Use agno.client.AgentOSClient to list and inspect execution traces on a remote AgentOS instance. Traces provide observability into agent execution flows, model invocations, token usage, tool calls, and errors.
Prerequisites
Start an AgentOS server with tracing enabled:
Default: Use the CLI Script
Always try the provided script first. It covers listing traces, getting trace details, and viewing session statistics — all from the command line with no custom code needed.
The script is at: scripts/view_traces.py
List recent traces
Limit the number of traces shown
Get detailed info for a specific trace
View trace statistics grouped by session
Full CLI reference
When to Write Custom Python
Only write ad-hoc Python when the CLI script cannot handle your use case:
- Debugging workflows that chain agent runs with trace inspection
- Custom filtering by user_id, pagination, or sorting
- Programmatic span inspection (e.g., summing token usage across spans)
- Integration tests that assert on trace content
- Automated monitoring with custom retry or polling logic
API Endpoints
| Method | Path | Description | |
|---|---|---|---|
| GET | /traces | List traces (paginated, filterable) | |
| GET | /traces/{trace_id} | Get trace or span detail | |
| GET | /traces/stats/sessions | Get trace statistics by session |
Custom Python Examples
Using Traces for Debugging
Chain an agent run with trace inspection to debug execution:
Custom Filtering and Pagination
Supports filtering by:
user_id: Filter by userlimit,page: Paginationsort_by,sort_order: Sorting
Programmatic Span Inspection
Sum token usage across all spans in a trace:
Traces provide insight into:
- Agent execution flows — the sequence of steps an agent takes
- Model invocations and token usage — which models were called and how many tokens were used
- Tool calls and their results — which tools were invoked and what they returned
- Errors and performance bottlenecks — where things went wrong or slowed down
Anti-Patterns
- Don't write custom Python for basic operations — use the CLI script
- Don't forget `tracing=True` on AgentOS — tracing must be explicitly enabled
- Don't poll traces in tight loops — use reasonable intervals when monitoring
- Don't ignore token usage — traces are valuable for cost monitoring
- Don't forget pagination — use
limitandpagefor large trace volumes
Further Reading
For advanced tracing patterns, read references/api-patterns.md.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/agno-agentos-api/skills/agentos-api-traces/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ajshedivy/agno-cookbook/agentos-api-traces)