Agent Lens: Real-time observability dashboard for multi-agent Claude Code sessions.
Visualize agent interactions, tool usage, and session flows through a modern dual-pane interface...
Real-time observability dashboard for multi-agent Claude Code sessions.
# Terminal 1: Start server
cd ~/.claude/skills/agent-lens/apps/server
bun run dev
# Terminal 2: Start client
cd ~/.claude/skills/agent-lens/apps/client
bun run dev
# Or use the project convenience script:
cd /path/to/qara
bun run start-obs
Open browser: http://localhost:5173
Once the dashboard is running:
Events are stored in JSONL (JSON Lines) format:
~/.claude/history/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl
Each line is a complete JSON object:
{"source_app":"qara","session_id":"abc123","hook_event_type":"PreToolUse","payload":{...},"timestamp":1234567890,"timestamp_aedt":"2025-01-28 14:30:00 AEDT"}
PAI_DIR - Path to PAI directory (defaults to ~/.claude/)
export PAI_DIR="/Users/yourname/.claude"
Agent Lens automatically tracks sessions using Claude Code's native session IDs:
${CLAUDE_SESSION_ID}~/.claude/history/raw-outputs/YYYY-MM/YYYY-MM-DD_all-events.jsonl~/.claude/state/agent-lens/sessions/${CLAUDE_SESSION_ID}.jsonEach event includes the session_id field for correlation across the observability dashboard.
Hooks should be configured in ~/.claude/settings.json. The capture-all-events hook is required for Agent Lens to function.
echo $PAI_DIRls ~/.claude/hooks/capture-all-events.tsls -l ~/.claude/hooks/capture-all-events.tsls ~/.claude/history/raw-outputs/$(date +%Y-%m)/bun --versioncd apps/server && bun installlsof -i :4000Claude Code (with hooks)
↓
capture-all-events.ts hook → JSONL files
↓
file-ingest.ts (Bun server) → In-memory stream
↓
Vue 3 Client → Real-time dashboard
Approach: Filesystem-based event capture with in-memory streaming. No database required.
Inspired by @indydevdan's work on multi-agent observability for Claude Code.
Our implementation uses filesystem-based event capture and in-memory streaming instead of SQLite database persistence.