Keysmith Lens, running in three commands
A Python package with no dependencies. Look at the demo runs first, then record your own agent.
No sign-up, no login. Everything stays local: recorded requests go to a folder you choose, and the output is one HTML file.
PYTHON 3.9+ / MACOS · LINUX · WINDOWS / MIT
What you get
record
Runs a forwarding proxy on your machine. Point the agent's API address at it and each model request is saved as a JSON file; responses stream back to the agent as usual.
build
Reads one or more run folders, matches rule files by content and writes one self-contained HTML file.
Demo runs
examples/make_demo.py writes five made-up runs: a late rule, a rule dropped by compaction, one never delivered, two agents side by side, and a clean run.
Step 1 / Try the demo
git clone https://github.com/Jia-Ethan/keysmith-lens.git cd keysmith-lens python3 examples/make_demo.py examples/demo PYTHONPATH=. python3 -m keysmith_lens build examples/demo -o out/lens.html open out/lens.html
Step 2 / Record your agent
# terminal 1: the local proxy; --rule names the rule files to check PYTHONPATH=. python3 -m keysmith_lens record runs/first \ --upstream https://api.anthropic.com --rule ./AGENTS.md # terminal 2: point the agent at the proxy, use it as usual, then Ctrl-C in terminal 1 ANTHROPIC_BASE_URL=http://127.0.0.1:8787 claude
Step 3 / Build and open
PYTHONPATH=. python3 -m keysmith_lens build runs -o out/lens.html open out/lens.html # embeds request text: keep it local, redact before sharing
Copy for an agent to set up
Read the README at https://github.com/Jia-Ethan/keysmith-lens, then clone the repository locally. Generate the demo runs with python3 examples/make_demo.py examples/demo, build the page with PYTHONPATH=. python3 -m keysmith_lens build examples/demo -o out/lens.html, and tell me the path. Do not install any third-party dependencies. If recording, run record on 127.0.0.1 only and never write an API key to a file.Lens listens on 127.0.0.1 only and sends requests nowhere except the upstream you name.