claw-lens is a local observability dashboard for OpenClaw agents. Its premise is that agent operators need different tooling from traditional APM: cost, not latency, is the dominant signal; the atomic unit is a session, not a request; and the failures that matter most — an agent reading files it shouldn't, leaking a credential, executing injected instructions — never throw exceptions. It reads the files OpenClaw already writes to disk (session JSONL logs, cache traces, cron configs, agent memory), parses them into a local SQLite database, and serves a React dashboard from an Express backend on localhost.
The dashboard covers:
- Cost and token analytics — per-agent, per-model, per-period breakdowns across input, output, cache read, and cache write, with cache hit rates and trends
- Session inspection — filterable session tables, turn-by-turn timelines with stop reasons and full tool-call traces, plus a profiler ranking sessions by token consumption
- Live monitoring — a real-time agent activity feed via a WebSocket proxy to the OpenClaw Gateway
- Security audit — deterministic rule-based risk scoring of every tool call (file access, shell commands, external HTTP, sensitive-data patterns, prompt-injection patterns) with per-agent behavioral anomaly detection over 30-day baselines
- Context and cache tooling — per-turn context-window fill visualization and step-through replay of OpenClaw's cache trace logs
Everything stays local and read-only: the server binds to 127.0.0.1, makes no outbound calls, sends no telemetry, and the only file it writes is its own SQLite database. It runs with zero configuration against the default OpenClaw data directory and offers English and Chinese interfaces.
