AgentGlass
A local, step-through visual debugger for LangGraph agents.
AgentGlass renders your agent's execution as an interactive graph — live, in your browser, with zero cloud dependency. Step forward and backward through every node execution, inspect exact input/output state at each step, and see inside nodes: the LLM call, its token counts, model name, and every tool call it made. One with block. No login. No data leaves your machine.
Features
- Step-through debugger — IDE-style ◀ ▶ controls to walk through the execution one node at a time. Click any dot on the timeline to jump to any step.
- Live graph — nodes highlight blue (active), green (done), red (errored) as the run progresses. Edges trace the path taken.
- Click-to-inspect — click any node to see the exact state that went in and the update that came out.
- Nested sub-runs — expand inside
agentortoolsto see the LLM call, token counts, model name, and tool calls — like LangSmith's waterfall, but local. - Gemini-aware formatting — message arrays render as a chat transcript with role badges, function-call/response pairing, and finish-reason warnings.
- Zero egress — runs entirely on localhost. Nothing is sent anywhere.
Installation
AgentGlass uses uv for dependency management.
# Add to your project
uv add agentglass
# Or install globally
uv tool install agentglass
From source:
git clone https://github.com/yourname/agentglass
cd agentglass
uv sync
uv pip install -e .
Dependencies (installed automatically): fastapi, uvicorn, langchain-core, langgraph, websockets.
Quickstart
Wrap your compiled graph in trace(). That's the entire integration.
from agentglass import trace
compiled = your_graph.compile()
with trace(compiled, port=8765):
result = compiled.invoke({"input": "..."})
A browser tab opens at http://localhost:8765. Step through the run, click nodes, inspect state. Press Ctrl-C when done.
Examples
Mock agent (no API key needed)
Good for exploring the UI without any credentials. Simulates a Gemini-style tool-calling loop.
uv run examples/mock_agent.py
# examples/mock_agent.py
from agentglass import trace
from langgraph.graph import StateGraph, END
# ... build a graph with planner → tool_executor → planner loop
with trace(compiled, port=8765):
compiled.invoke(initial_state)
The mock agent runs a planner → tool_executor → planner loop twice, so you can see the visit-count badges and step through all 5 executions.
Real Gemini agent
export GOOGLE_API_KEY=your-key
uv run examples/gemini_react_agent.py
# examples/gemini_react_agent.py
import os
from agentglass import trace
from langchain_google_genai import ChatGoogleGenerativeAI
from langgraph.graph import StateGraph, END
from langgraph.prebuilt import ToolNode
model = ChatGoogleGenerativeAI(model="gemini-2.5-flash", temperature=0)
# ... define tools, nodes, edges ...
with trace(compiled, port=8765):
result = compiled.invoke({
"messages": [HumanMessage(content="What's the weather in Tokyo and London?")]
})
Clicking the agent node at any step shows the nested LLM call — model name (gemini-2.5-flash), token counts (↑406 ↓333 = 739), and the tool calls it requested. Clicking tools shows each tool that ran and what it returned.
Existing project (drop-in)
If you have an existing LangGraph agent, no changes to your node functions are required:
from agentglass import trace
# your existing code — untouched
app = graph.compile()
# wrap it
with trace(app, port=8765):
for step in app.stream(state, stream_mode="values"):
print_messages(step.get("messages", []))
How it works
your agent AgentGlass browser
────────── ────────── ───────
graph.compile() ──────► extract graph structure
attach callback tracer
compiled.invoke() ──────► on_chain_start ────────► WebSocket event
on_chat_model_start → node lights up
on_llm_end → LLM child recorded
on_tool_start/end → tool child recorded
on_chain_end ──────────► WebSocket event
→ node turns green
→ step available
user clicks node ◄──────────────────────────────── REST /api/events
The tracer uses a node stack to associate sub-runs (LLM calls, tool executions, condition functions) with their parent node — this works correctly even on LangGraph 1.x, which reuses the same run_id across an entire invocation.
UI walkthrough
| Control | Action |
|---|---|
▶ / ◀ |
Step forward / backward |
⏮ / ⏭ |
Jump to first / last step |
← → keyboard |
Step forward / backward |
Home / End |
Jump to first / last step |
| Click a timeline dot | Jump to that step |
| Click a node in the graph | Jump to that node's most recent execution |
Click ▸ on a sub-run row |
Expand input / output / tool args |
Roadmap
These are not in the current release but are planned or under consideration:
- State diff view — between consecutive visits to the same node, highlight exactly which keys changed
- Time-travel — pause at a node, edit state, resume
- Multi-run comparison — load two runs side by side and see where they diverged
- Persistence — SQLite backend so runs survive server restarts; a history page
- Cost / latency overlay — token cost and wall-clock time badges on each node
- Export — bundle a run into a self-contained HTML file for sharing
- Framework expansion — CrewAI, raw LangChain Runnable graphs
Contributing
Contributions are welcome! AgentGlass is designed with clear separation of concerns — most changes touch only one component.
# Quick setup
git clone https://github.com/subhranil2605/agentglass
cd agentglass
uv sync
uv run pytest tests/ -v
See CONTRIBUTING.md for:
- Development setup and architecture overview
- Code style and testing guidelines
- How to report bugs and propose features
See PULL_REQUEST_GUIDELINES.md for our Glass-themed PR philosophy.
License
MIT — see LICENSE.
Metadata
Release files for agentglass 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentglass-0.1.3.tar.gz | 359.4 kB | Without provenance | Details for agentglass-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentglass-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for agentglass-0.1.3-py3-none-any.whl |
Total release size: 383.2 kB
Release files / agentglass-0.1.3.tar.gz
| Download URL | agentglass-0.1.3.tar.gz |
|---|---|
| Size | 359.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4d1d67cd7890802879846d077864c435624a74afe8453bcdacc7ef8a57a8cba
|
|
BLAKE2b-256 checksum How to use checksums |
195f723e55fd76638eb4248107bd3c7d01838a4c8ba16e8190fc3d7d166510eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / agentglass-0.1.3-py3-none-any.whl
| Download URL | agentglass-0.1.3-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd0565bf200f41e2c90f5faec2a04d3e438dbcaea60bad0446a32d117bfd2397
|
|
BLAKE2b-256 checksum How to use checksums |
a67d8dbb483cb55872034de34c01512217649d50a2be7819b3b3af6d94fe7e38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for agentglass 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.