AgentLens dashboard displaying a Claude Code session recap, prompts, tool calls, and project hierarchy

Local-first ยท Claude Code + Codex

AgentLens

The open-source AI agent log viewer for finding, replaying, and understanding every Claude Code and Codex CLI session on your machine.

  • Open source
  • Local SQLite
  • No cloud upload

One searchable history

A Claude Code log viewer and Codex session viewer in one

AgentLens reads the JSONL session history your coding agents already create. It normalizes both formats into a consistent timeline without sending prompts, source paths, or tool output to a hosted service.

01

Find the session

Search across projects and sessions, filter by date, and use automatic recaps to identify the work you need.

02

Replay the work

Inspect user prompts, assistant responses, slash commands, tool calls, subagents, tasks, and vision references in order.

03

Measure agent usage

Review token volume, model activity, tool usage, project totals, and recorded cost data from a local analytics dashboard.

Forensic session replay

See what the agent did, not just what it said

Conversation threads remain connected to the commands, files, subagents, and structured control-plane events that produced the result.

Detailed AgentLens prompt thread with assistant response and tool-call records
Prompt-thread detail preserves tool activity and assistant turns alongside the original request.

Private by architecture

Your agent logs stay on your machine

The public website contains product information only. The AgentLens application runs locally and indexes local session files into a SQLite database you control.

  1. ReadClaude Code and Codex JSONL session logs
  2. NormalizePrompts, calls, tools, tasks, vision, and subagents
  3. StoreStructured session history in local SQLite
  4. ExploreSearch and replay from the React dashboard

Run locally

Start exploring your coding-agent history

git clone https://github.com/QJ-Chen/agentlen.git
cd agentlen
pip install -e .
Full setup guide

Common questions

Agent log viewer FAQ

What is AgentLens?

AgentLens is a local-first AI agent log viewer. It turns Claude Code and Codex session files into a searchable project hierarchy, analytics overview, and detailed session replay.

Is AgentLens a Claude Code log viewer or cc-log-viewer?

Yes. It reads Claude Code logs from ~/.claude/projects/ and also reads Codex rollout logs from ~/.codex/sessions/. AgentLens adds unified search, recaps, tool inspection, subagent views, and usage analytics.

Does AgentLens upload prompts or source code?

No. Collection, normalization, storage, API access, and dashboard rendering run locally. The default SQLite database is stored at ~/.agentlens/agentlens.db.

Which operating systems and agents are supported?

AgentLens is a Python and React application designed for macOS, Linux, and Windows. The current collectors support Claude Code and OpenAI Codex CLI session formats.

Can AgentLens inspect tool calls and subagents?

Yes. Session replay connects prompts and assistant turns with tool inputs and outputs, slash commands, subagent activity, task status, vision references, token totals, and source JSONL provenance.

Agent history should be usable

Turn scattered coding sessions into evidence you can search.

View AgentLens on GitHub