agent-observability

by rudrendupaul

Not rated
GitHub

About

AI agent observability with deterministic record/replay for debugging agent failures.

Details

Author
rudrendupaul
Categories
Developer Tools

Setup

Install agent-observability in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/rudrendupaul/agent-observability

Follow the installation instructions in the repository README, then restart your MCP client.

agent-trace run -- <command> ](https://github.com/RudrenduPaul/agent-observability/blob/HEAD/src/agent_trace/mcp_server.py)[args...]

Exec a child process with recording pre-enabled process-wide (AGENT_TRACE_AUTO_RECORD=1), so the firstimport agent_traceinside that process, even one owned by a third-party CLI likelanggraph dev, starts recording with zero code changes required in your own agent code. Exits with the child process's own exit code.

A LangGraph run fails after step 8. Your trace in LangSmith or Langfuse showswhatbroke. But to reproduce it you have to re-run the entire agent: 8 more LLM calls, 30 more seconds, another $0.15 in API cost. If the failure was caused by a specific tool response or a transient model output, you can't reproduce it at all. You're debugging against a moving target.

Agent Observability solves this at the HTTP transport layer.It records every request and response verbatim to a local SQLite file. Replay serves those exact bytes back in sequence, in under 1 ms per exchange: same code path, same span tree, same failure. No API calls.

Record once. Commit the fixture. Replay in every CI run at zero API cost:

# tests/test_agent.py import pytest from pathlib import Path from agent_trace import replay FIXTURE_PATH = Path("fixtures/my_agent_run.db") @pytest.mark.skipif( not FIXTURE_PATH.exists(), reason="Run: python scripts/record_fixture.py to generate the fixture" ) def test_agent_answer(): with replay(FIXTURE_PATH) as ctx: from my_module import my_agent result = my_agent("what is 2+2?") assert "4" in result

SetAGENT_TRACE_NETWORK_GUARD=1in CI. Any HTTP call not in the fixture raisesNetworkGuardErrorimmediately, catching regressions before they hit production.

AGENT_TRACE_NETWORK_GUARD=1 uv run pytest tests/
10-step agent × $0.15 per run × 10 debug sessions per week = $15/week in API costs With Agent Observability CI replay: $0/week At scale (10 engineers, each debugging 3 failures/week): Before: ~$45/week, ~5 hours/week waiting for live re-runs After: $0/week, 0.93 ms per replay
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.