Show HN: AgentLens – Lightweight, self-hosted tracer for AI agents (github.com)
I built AgentLens because existing APMs and telemetry platforms felt too heavy when I just wanted to see what my multi-step AI agents were doing locally.
When an agent enters a nested loop, standard logging either clobbers the terminal or hides why a tool was selected, what arguments were passed, and where tokens were burned. Setting up enterprise observability often meant spinning up complex multi-service stacks or sending prompt payloads to third-party cloud SaaS.
AgentLens is an open-source, local-first tracer designed to take under two minutes to run:
1. Install: pip install agentlens-py
2. Instrument in 2 lines: import agentlens as al al.init() al.instrument_openai()
3. Start the local dashboard: docker compose up
What it gives you: - Step-by-step execution tree showing parent/child spans and tool calls - Per-step latency, input payloads, and micro-cent token cost tracking - Automatic field-level PII redaction (`redact_fields`) so keys and sensitive data never leave your environment - Zero external cloud telemetry: all traces stay on your machine
GitHub: https://github.com/kp183/Agentlens PyPI: https://pypi.org/project/agentlens-py/
I just released v0.2.2 with relaxed dependencies and have zero active users right now. If you're running agents or LLM scripts today, I would love for you to try installing it and tell me where it breaks or confuses you.
I’ll be in the comments answering questions and fixing bugs on the spot.
0 comments
[ 0.36 ms ] story [ 7.2 ms ] threadNo comments yet.