Record any Python agent run and turn it into a shareable animated graph, with one command and zero code changes.
Agent logs are a wall of text. You cannot see the shape of a run: which tool fired, in what order, where it looped, where it stopped. agentcam plays the run back as a moving map. Every function your agent calls is a glowing dot, and a spark carries the real data from one function to the next, in the exact order it happened. It is a camera for your agent, not another dashboard.
git clone https://github.com/reezanahamed/agentcam && cd agentcam
pip install -e .
agentcam run -- python examples/agent_demo.py --mock # opens agentcam.htmlNo API key needed for the demo (--mock uses a fake LLM). Point it at your own script the same way:
agentcam run -- python your_agent.py
agentcam run --gif -- python your_agent.py # also writes a shareable GIF| Feature | What you get |
|---|---|
| Zero code changes | Wrap any command with agentcam run --. Nothing to import in your agent. |
| Real values, real order | Every call and return, with the actual arguments and results, in the order they ran. |
| One self-contained file | Output is a single HTML file. No server, no account, no external requests. |
| Made for sharing | --gif renders a short looping GIF for X or your README. |
| Reads your code only | Your functions and LLM calls show up. Library and stdlib noise is filtered out. |
agentcam runs your program under a tracer (Python's sys.setprofile) and records every function call and return with its values, in order. It keeps the frames that belong to your project plus known LLM clients, and drops the library noise. Those events are grouped into lanes (LLM calls, your tools, your code) and injected into a small canvas animation: dots for functions, sparks for data moving between them, a scrubber to step through slowly. Think of it as a flight recorder for one run, played back as a picture.
It is not a profiler. For timing and flamegraphs, use VizTracer. agentcam exists to help you understand a run and show it to other people.
- Python only for now.
- Shows Python-level calls in the order they ran. Async code is flattened into call order, not a wall-clock timeline. Deep C-level calls are not shown.
- Argument values are shown as short previews and can contain prompts or secrets. Use
--no-args, and agentcam masks common key or token argument names by default. - Very long runs are capped and repeated loops are collapsed. agentcam tells you when it trimmed the trace.
MIT
