Skill
Agent Lens
Track AI agent API calls, analyze token usage, and optimize costs. Use when user wants to monitor LLM spending, debug API calls, track token consumption, or...
When to use Agent Lens
Choose if
You want lightweight, fully-local LLM cost and token-usage tracking for your agents — traces stored in a SQLite database at ~/.agent-lens/traces.db, no cloud service required, no API key plumbing. Reach for this over hosted observability platforms (Langfuse, Helicone, LangSmith) when you can't ship call traces off-box, or when you just want a quick "where is my spend going" report.
Avoid if
You need shared/team observability with dashboards, alerts, traces persisted in a central place, or multi-host aggregation — the SKILL.md says the trace store is local-only and intended for single-developer cost reporting. Also avoid if your traffic is mostly non-OpenAI-compatible response shapes: the README notes token extraction is automatic only for OpenAI-compat responses, other providers need manual token assignment.
Risk Flags
- LOW data_quality README states cost estimates use list prices and "actual costs may differ with discounts"; unknown models track usage but show "—" for cost. Token extraction is automatic only for OpenAI-compatible response format — non-OpenAI providers require manual token assignment.
- LOW scope Local-only telemetry. The README recommends periodic `agent-lens clean` to manage database growth; no built-in retention policy or remote sync.
Cost
Type: Free
Dependencies
Minimum runtime: Python (with tiktoken + SQLite); local-only
Distribution
- ClawHub
agent-lens- License
- MIT-0