agentkitai/agentlens
View on GitHub ↗Open-source observability and audit trail platform for AI agents. MCP-native, tamper-evident event logging, real-time dashboard.
20 ★2 forksTypeScriptUpdated 19d ago
What you need to know
Open-source observability 'flight recorder' for AI agents with a tamper-evident SHA-256 hash-chained audit trail — captures every LLM call, tool invocation, approval and error, and presents it through a queryable API, real-time dashboard, and a 22-tool MCP server.
Install
docker run -p 3400:3400 -e AUTH_DISABLED=true -e JWT_SECRET=dev-secret ghcr.io/agentkitai/agentlens npx @agentkitai/agentlens-server pip install agentlensai[all-providers]
Usage
- •Point your OTLP exporter at http://localhost:3400/v1/traces to ingest gen_ai.* spans from any OTel-instrumented agent with no AgentLens SDK.
- •Instrument Python in one line: agentlensai.init(url=..., api_key=..., agent_id=...) — captures every LLM call across 9 providers automatically.
- •Add the MCP server to Claude Desktop/Cursor with AGENTLENS_API_URL/AGENTLENS_API_KEY to get 22 MCP tools.
- •Verify audit integrity: GET /api/audit/verify/export gives auditors a signed JSON snapshot; the demo (./demo/aha.sh) shows tamper detection in 30 seconds.
Key features
- ✓Tamper-evident, append-only, cryptographically verifiable hash chain per session — built for EU AI Act Article 12 record-keeping.
- ✓Five integration paths: OpenTelemetry GenAI, OpenClaw plugin, 1-line Python auto-instrumentation, MCP server, and Python/TypeScript SDKs.
- ✓LLM analytics with cost reconstruction from model pricing, 5-dimension health scores, cost optimizer, session replay and A/B benchmarking (Welch's t-test).
- ✓Guardrails with dry-run mode, alerting, multi-tenant isolation with per-tenant data scoping.
- ✓Self-hosted with SQLite by default, no external dependencies; MIT licensed.
Best for
Teams running production agents that need real-time observability plus a compliance-grade, tamper-evident audit trail.
Caveats
- ⚠For anything shared, drop AUTH_DISABLED, set a real JWT_SECRET and create an API key; OTLP can require OTLP_AUTH_TOKEN.
- ⚠Managed AgentLens Cloud (app.agentlens.ai) is a separate paid SaaS alternative to self-hosting.
- ⚠Cost reconstruction from OTel is fuzzy-matched on model id (approximation when no per-call cost attribute exists).
- ⚠MIT licensed.
Platforms: Local · Remote · Web · CloudClients: Claude Desktop · Cursor · Any MCP client
Reviewed 2026-08-18
Topics
- Stars
- 20★
- Forks
- 2
- Language
- TypeScript
- License
- MIT
- Created
- 2026-02-08
- Last push
- 2026-08-16