More screenshots
Works with the AI Agents you already use
Agent Flight Recorder
A JSONL telemetry logger and query toolset for agent self-monitoring, cost tracking, and tool error diagnosis.
$7
Agent Flight Recorder
Example session with this skill installed
My agent has been running for a while and I blew through yesterday's budget twice. Use the agent-flight-recorder skill: generate a realistic sample telemetry/events.jsonl with 30 cycles (two models, some cached tokens, a few tool errors on a 'web_search' tool, one failed action) and then show me exactly what get_execution_metrics(last_cycles=10) and the error query return, the way the agent would see them.
- Read your context and instructions
- Compiled the agent flight recorder
Done. The sample log (270 events, 30 cycles, one run id) was written through the skill's own TelemetryLogger, and demo_recorder.py dispatches the two tools exactly as a harness would. Per-million rates in it are illustrative placeholders, not list prices.
What the agent sees from get_execution_metrics(last_cycles=10) (per-cycle rows compacted to one line each):
{"cycles": {"from": 21, "to": 30, "count": 10},
"per_cycle": [
{"cycle": 21, "model": "claude-sonnet-5-5", "action": "WAIT", "input_tokens": 267420, "output_tokens": 4033, "cached_tokens": 180428, "llm_calls": 4, "est_cost_usd": 0.3586, "tool_calls": 3, "tool_errors": 1, "duration_s": 41, "failures": 0},
{"cycle": 22, "model": "claude-sonnet-5-5", "action": "WAIT", "input_tokens": 261557, "output_tokens": 4330, "cached_tokens": 174327, "llm_calls": 4, "est_cost_usd": 0.3612, "tool_calls": 1, "tool_errors": 0, "duration_s": 47, "failures": 0},
{"cycle": 23, "model": "claude-sonnet-5-5", "action": "POST", "input_tokens": 360693, "output_tokens": 5360, "cached_tokens": 253420, "llm_calls": 5, "est_cost_usd": 0.4586, "tool_calls": 3, "tool_errors": 0, "duration_s": 49, "failures": 1},
{"cycle": 24, "model": "claude-sonnet-5-5", "action": "COMMENT", "input_tokens": 190394, "output_tokens": 3220, "cached_tokens": 148904, "llm_calls": 3, "est_cost_usd": 0.1991, "tool_calls": 3, "tool_errors": 0, "duration_s": 24, "failures": 0},
{"cycle": 25, "model": "claude-haiku-5-5", "action": "WAIT", "input_tokens": 99191, "output_tokens": 2212, "cached_tokens": 70113, "llm_calls": 2, "est_cost_usd": 0.0471, "tool_calls": 1, "tool_errors": 0, "duration_s": 18, "failures": 0},
{"cycle": 26, "model": "claude-sonnet-5-5", "action": "RESEARCH", "input_tokens": 509318, "output_tokens": 7296, "cached_tokens": 20044, "llm_calls": 5, "est_cost_usd": 1.5653, "tool_calls": 1, "tool_errors": 0, "duration_s": 57, "failures": 0},
{"cycle": 27, "model": "claude-sonnet-5-5", "action": "WAIT", "input_tokens": 384184, "output_tokens": 5870, "cached_tokens": 255861, "llm_calls": 5, "est_cost_usd": 0.5333, "tool_calls": 3, "tool_errors": 0, "duration_s": 63, "failures": 0},
{"cycle": 28, "model": "claude-sonnet-5-5", "action": "WAIT", "input_tokens": 391884, "output_tokens": 6346, "cached_tokens": 303208, "llm_calls": 5, "est_cost_usd": 0.4325, "tool_calls": 3, "tool_errors": 1, "duration_s": 89, "failures": 0},
{"cycle": 29, "model": "claude-sonnet-5-5", "action": "COMMENT", "input_tokens": 208681, "output_tokens": 3055, "cached_tokens": 158197, "llm_calls": 3, "est_cost_usd": 0.2259, "tool_calls": 3, "tool_errors": 0, "duration_s": 25, "failures": 0},
{"cycle": 30, "model": "claude-haiku-5-5", "action": "POST", "input_tokens": 106292, "output_tokens": 2405, "cached_tokens": 78918, "llm_calls": 2, "est_cost_usd": 0.0473, "tool_calls": 2, "tool_errors": 0, "duration_s": 20, "failures": 0}],
"spend": {"total_usd": 4.2289,
"by_model": {"claude-sonnet-5-5": {"usd": 4.0616, "calls": 26}, "claude-haiku-5-5": {"usd": 0.1673, "calls": 12}},
"note": "estimated from logged tokens; the budget ledger is authoritative"},
"tools": {"calls": {"recall": 10, "web_search": 6, "publish": 4, "read_file": 3}, "errors": {"web_search": 2}, "error_rate": 0.087},
"actions": {"WAIT": 5, "POST": 2, "COMMENT": 2, "RESEARCH": 1},
"failures": [{"cycle": 23, "type": "action_failed", "detail": "publish returned 422: duplicate of post published in cycle 20"}]}
That result is about 3,000 characters, well under the 7,000-character cap.
What the agent sees from query_telemetry(event_type="tool_call", errors_only=true, fields="tool,error,duration_ms"):
{"event_type": "tool_call", "returned": 4, "truncated_for_size": false,
"rows": [
{"ts": "2026-10-16T14:51:42", "cycle": 28, "tool": "web_search", "error": "TimeoutError: read timed out after 30s", "duration_ms": 30322},
{"ts": "2026-10-16T14:21:47", "cycle": 21, "tool": "web_search", "error": "HTTP 503 Service Unavailable from upstream search provider", "duration_ms": 720},
{"ts": "2026-10-16T13:47:17", "cycle": 12, "tool": "web_search", "error": "HTTP 429 Too Many Requests: rate limit exceeded, retry-after=18", "duration_ms": 2211},
{"ts": "2026-10-16T13:27:12", "cycle": 7, "tool": "web_search", "error": "TimeoutError: read timed out after 30s", "duration_ms": 30270}]}
Each failure was followed by a successful retry except the 503 in cycle 21.
What the data says about the budget blowup in this sample:
- Cycle 26 cost about four times a typical sonnet cycle. Its cached share dropped to 4 percent while input tokens hit 509k. That is the signature of a context rewrite that cold-started the prompt cache.
- Normal sonnet cycles run 65 to 80 percent cached. Haiku-only cycles cost under a tenth of a sonnet cycle.
- Over all 30 cycles the estimated spend is about 10 USD at the placeholder rates, with sonnet at 95 percent of it.
The first check I'd have the real agent run on its own log is cached_tokens / input_tokens per cycle. If the ratio collapses in the cycles where you blew the budget, the fix is in whatever rewrites the context, not in the model choice.
Connects securely to your tools. The creator never sees your data.
About this skill
Agent prompts often include static status updates provided by the harness, forcing the agent to trust external summaries of its own performance. This skill provides a telemetry loop that allows the agent to interrogate its raw execution data. It enables autonomous agents to monitor their own costs, tool reliability, and cycle performance using verifiable logs.
What it does
- Verifiable Logging appends events for LLM calls, tool usage, and cycle metadata to a JSONL file.
- Cost Analysis aggregates input, output, and cached tokens to calculate actual spend per cycle.
- Reliability Tracking measures tool error rates and captures failure details for self-diagnosis.
- Fast Telemetry Retrieval reads only the tail of large log files to maintain performance without context flooding.
- Performance Metrics roll up action distributions, duration per cycle, and cache hit ratios.
How it works
- Instrument the Loop using the
TelemetryLoggerto record starts, LLM usage, tool calls, and decisions. - Define Schema by mapping your event names and pricing functions to the
FlightRecorderconfiguration. - Expose Tools to the agent via
get_execution_metricsandquery_telemetryfor self-monitoring. - Agent Interrogation allows the model to query its recent failures or token usage to adjust its own behavior.
Frameworks & tools
Python 3.9+ standard library. The skill includes provider-neutral tool specifications compatible with Anthropic, OpenAI, Gemini, and Ollama.
Why this beats prompting it yourself
Standard prompts only give the agent what you think it needs to know. This skill provides the agent with raw, granular data so it can detect silent tool degradation or budget overruns that a human developer might miss in real-time.
Use cases
- Debugging intermittent tool failures during long autonomous runs.
- Implementing cost-aware planning where the agent scales back model usage based on measured spend.
- Auditing context cache efficiency by monitoring
cached_tokensvsinput_tokens. - Generating self-diagnostic reports when an agent detects a loop or performance regression.
Known limitations
Reads are restricted to the last 24 MB of the log file to prevent context overflow. Requires manual instrumentation of the agent loop to capture events.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install
Requires