Log viewer
Review everything an agent did in a local web UI
The log viewer is a local web UI that lets you inspect every session spens has recorded.
Start the viewer
spens log-viewerThis opens a browser at http://127.0.0.1:7331 by default. You can change the port and host:
spens log-viewer --port 8080 --host 0.0.0.0 --no-browserThe viewer reads sessions from .spens/sessions/ near the workspace, or from the path you give it with --spens-dir.
What you see
The viewer has four tabs:
Chat transcript
Every LLM call, decoded: request messages, responses, tool calls, reasoning, and token usage. This is the full conversation between the agent and the model, reconstructed from the captured traffic.
Audit log
Session metadata, executable identity, tracked paths, audit events, and the integrity chain. This comes from nono.sh's audit ledger, which records every filesystem access the agent made with a Merkle-root integrity chain.
Other HTTP
All non-LLM HTTP requests and responses captured during the session. This includes package registry lookups, GitHub API calls, and any other network traffic the agent generated.
File changes
Every file the agent changed, with diffs and rollback information. At the end of a session you can accept the changes or roll the workspace back to its pre-session state.
Where the data comes from
Every session writes its data under <workspace>/.spens/sessions/<session-id>/:
| File | What it holds |
|---|---|
events.jsonl | Machine-readable event stream for the session |
state.json | Current session state (running, finished, canceled, error) |
session_summary.json | Tokens, cost, models, file changes, pricing sources |
traces/captured.jsonl | Decoded LLM API calls |
traces/request_log.jsonl | Every HTTP request/response and CONNECT decision |
traces/dns_log.jsonl | Every DNS query the agent made |
nono-audit/audit/ | nono audit events and the integrity ledger |
nono-audit/rollbacks/ | Rollback snapshots and per-file change records |
Session summary and cost estimate
session_summary.json includes an estimated cost, computed from the token usage in the captured LLM traces. Spens prices tokens with the Portkey pricing dataset, covering six providers: anthropic, openai, google, fireworks-ai, openrouter, and bedrock.
Each session summary records which source each provider's numbers came from (live dataset, vendored snapshot, built-in table, or $0), so an archived cost figure can still be explained later.
See Pricing for how costing works.
Spens