# AgentLens

AgentLens collects AI agent events and exposes them through an API and web dashboard. Use it to inspect tool calls and check whether the event log has changed.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 24
- Author: agentkitai
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/agentkitai/agentlens
- Updated: 2026-10-18
- HTML: https://affpapa.org/en/nevibecode/mcp/agentlens

## What it does

AgentLens receives agent activity, including tool calls, sessions, and other events. You can inspect the records through its API or web dashboard. Each event is linked to the previous one with SHA-256, so a changed, removed, or reordered record breaks verification and can be identified.

The MCP server install command uses `npx` to run `@agentkitai/agentlens-mcp`. AgentLens can also run as a standalone service: the quick setup uses SQLite, while the full stack uses Postgres and Redis. Docker is required for the audit-chain demo. Editing a stored event breaks verification, so the log’s integrity depends on keeping its records intact.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add agentlens -- npx -y @agentkitai/agentlens-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add agentlens -- npx -y @agentkitai/agentlens-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "agentlens": {
            "command": "npx",
            "args": [
                "-y",
                "@agentkitai/agentlens-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "agentlens": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@agentkitai/agentlens-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add agentlens npx -y @agentkitai/agentlens-mcp
```

## When to use it
- capture agent sessions and tool calls
- inspect agent events through an API or dashboard
- detect edits, deletions, or reordered audit records
- export a verifiable audit snapshot with `GET /api/audit/verify/export`

## Example prompts
- Show the sessions and tool calls recorded by AgentLens.
- Check the AgentLens audit chain and report any broken records.
- Export a verifiable audit snapshot with `GET /api/audit/verify/export`.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
