AgentStack
MCP verified MIT Self-run

Agentlens

mcp-arkfelix7-agentlens · by ArkFelix7

Chrome DevTools for AI Agents — real-time observability, hallucination detection, session replay, and cost tracking. MIT licensed.

No reviews yet
0 installs
13 views
0.0% view→install

Install

$ agentstack add mcp-arkfelix7-agentlens

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Agentlens? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

AgentLens

Chrome DevTools for AI Agents

See every decision, trace every tool call, catch every hallucination.

[](https://opensource.org/licenses/MIT) [](https://pypi.org/project/agentlens-sdk/) [](https://pypi.org/project/agentlens-server/) [](https://www.npmjs.com/package/@agentlens-sdk/sdk)

[Quick Start](#quick-start) · [Features](#features) · [VS Code Extension](#vs-code-extension) · [GitHub Actions CI](#github-actions-ci) · [Supported Frameworks](#supported-frameworks) · [MCP Integration](#mcp-integration) · [Examples](#examples) · [Contributing](#contributing)


Why AgentLens?

AI agents fail in opaque ways — wrong data, hallucinated numbers, runaway costs, corrupted memory. AgentLens gives you a real-time debugging dashboard: every LLM call, tool execution, memory operation, and decision your agent makes — visible, searchable, replayable. Two lines of code to integrate, zero config to start.

Quick Start

1. Install and run the server

pip install agentlens-server
agentlens-server
# Server: http://localhost:8766  |  Dashboard: http://localhost:5173

2. Install the Python SDK

pip install agentlens-sdk

3. Add two lines to your agent

from agentlens_sdk import auto_instrument
auto_instrument()

# That's it. Open http://localhost:5173 and run your agent.

TypeScript / Node.js

npm install @agentlens-sdk/sdk
import { autoInstrument } from '@agentlens-sdk/sdk';
autoInstrument();

Run from source (development)

git clone https://github.com/ArkFelix7/agentlens
cd agentlens
make install && make dev

Features

Core Observability

| Feature | Description | |---------|-------------| | Real-time Trace Graph | D3.js force-directed graph — every agent step as a node, click for full input/output | | Cost Analytics | Per-model, per-step cost breakdown with cheaper-model suggestions | | Hallucination Detection | Semantic comparison of tool outputs vs LLM responses, number transposition alerts | | Memory Inspector | Version history, influence mapping, in-dashboard edit/delete for agent memory | | Session Replay | VCR-style playback of any past run, shareable replay links |

v0.2 — New Features

| Feature | Description | |---------|-------------| | Reliability Score Badge | 0–100 score (A/B/C/D) grading a session on hallucinations, errors, cost, and latency. Embeddable SVG badge for any README. | | Budget Guardrails | Set per-session or per-model cost/token/call limits. Real-time alerts fire the moment a running agent crosses a threshold. | | Auto Test Generation | One click turns any trace into a pytest fixture — captures inputs, outputs, and assertions so production failures become regression tests. | | LLM Model Comparison | Replay any session with a different model and diff the outputs side-by-side. Compare cost, latency, and accuracy across GPT-4o, Claude, Gemini. | | Prompt Version Control | Track every prompt edit, compare versions, and run A/B experiments across sessions — all without leaving the dashboard. | | Multi-Agent Topology Map | Visual coordination graph for CrewAI, AutoGen, and custom multi-agent setups — see which agent called which, when, and at what cost. | | Air-Gap Privacy Mode | Redact PII from traces before they reach the server. Full local-only mode with no external network calls. | | VS Code / Cursor Extension | Inline cost and latency annotations on @trace decorated functions. Sidebar showing the last trace without leaving your editor. | | GitHub Actions CI | Post a trace quality report as a PR comment — hallucination count, cost, reliability score, and test pass/fail. |

VS Code Extension

Install from the VS Code Marketplace or build from source:

cd vscode-extension
npm install
npm run compile
# Then: Extensions panel → "Install from VSIX..." → select the generated .vsix

Features:

  • Inline cost and latency annotations on any @trace-decorated function
  • Sidebar panel with real-time trace feed
  • Command palette: AgentLens: Show Last Trace, AgentLens: Toggle Cost Annotations
  • Auto-connects to http://localhost:8766 on startup (configurable)

GitHub Actions CI

Add to any repo to get automatic trace quality checks on every PR:

# .github/workflows/agent-check.yml
name: Agent Trace Check
on: [pull_request]

jobs:
  trace-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ArkFelix7/agentlens/.github/actions/agentlens-check@v0.2.0
        with:
          script: python my_agent.py
          fail-on-hallucination: 'true'
          max-cost-usd: '0.10'

Posts a comment to the PR with: reliability score, hallucination count, total cost, and latency breakdown.

Supported Frameworks

| Framework | Integration | How | |-----------|-------------|-----| | OpenAI | Auto | auto_instrument() | | Anthropic | Auto | auto_instrument() | | LangChain | Callback | AgentLensCallbackHandler | | CrewAI | Auto-detect | auto_instrument() | | AutoGen | Auto-detect | auto_instrument() | | Semantic Kernel | Filter | instrument_semantic_kernel(kernel) | | Any Python | Decorator | @trace(name="my_step") | | TypeScript/Node | Wrapper | trace(fn, { name: "my_step" }) | | MCP agents | Zero-code | agentlens-mcp server |

MCP Integration

Zero-code observability for Claude Desktop, Cursor, Windsurf, and any MCP-compatible agent.

pip install agentlens-mcp

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "agentlens": {
      "command": "agentlens-mcp"
    }
  }
}

Examples

See [examples/](./examples/) for five runnable demos:

  • demo_multi_step.py — full showcase: 8+ steps, intentional hallucination, memory ops (no API key needed)
  • demo_multi_agent.py — multi-agent topology: orchestrator spawning researcher + writer agents
  • demo_openai_agent.py — minimal @trace usage
  • demo_anthropic_agent.pyauto_instrument() usage
  • demo_langchain_agent.py — LangChain callback handler
make demo

Contributing

PRs welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup instructions and the architecture overview.

License

MIT

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.