Tracing and graph extraction for agents
Project description
AgentGlass
A local, visual debugger for agentic AI workflows built on LangGraph and Google Gemini. Wrap your compiled graph in a single context manager, run it as usual, and get a live, clickable graph view in your browser with the exact input and output of every node execution — including every visit of a loop.
No hosted platform. No login. No data leaves your machine.
Install
pip install agentglass
Quickstart
from agentglass import trace
from langgraph.graph import StateGraph, END
# ... build your graph as you normally would ...
graph = StateGraph(MyState)
graph.add_node("retrieve", retrieve_fn)
graph.add_node("generate", generate_fn)
graph.set_entry_point("retrieve")
graph.add_edge("retrieve", "generate")
graph.add_edge("generate", END)
compiled = graph.compile()
with trace(compiled, port=8765):
result = compiled.invoke({"question": "What's the weather in Tokyo?"})
A browser tab opens at http://localhost:8765 showing your graph. As the run
proceeds, nodes light up. Click any node to see exactly what state went in and
what update came out. Nodes inside a loop show a visit-count badge and give you
per-call history in the side panel.
When the run finishes, the server keeps running so you can keep poking around.
Press Ctrl-C to exit.
What's in the MVP
- Live graph rendering via Cytoscape.js with a layered DAG layout. Conditional edges are dashed; regular edges are solid.
- Click-to-inspect any node: input state, output state update, duration, and per-execution history for looped nodes.
- Gemini-aware formatting of message / content arrays: role badges, function-call / function-response pairing, finish-reason warnings.
- Safe serialization of arbitrary Python state — Pydantic, LangChain messages, dataclasses, numpy arrays, bytes — with per-field size caps.
- Zero network egress: everything is local and in-memory.
What's not in the MVP (yet)
- Diff view between consecutive node executions
- Time-travel / pause-and-edit
- Multi-run comparison
- Persistence (SQLite) — currently in-memory only
- Cost / latency overlays
License
MIT.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentglass-0.1.0.tar.gz.
File metadata
- Download URL: agentglass-0.1.0.tar.gz
- Upload date:
- Size: 83.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0b851d1863c0fe6f3f7df4c21de3fb018499b3e60c0f511ac275a64ad204ddd
|
|
| MD5 |
0aacc88b5b59a021441cc9f02c11793b
|
|
| BLAKE2b-256 |
0abfd08ee8db9e934defa020244d2529fd230d39fe66a59b11d7cd76fa1db1ab
|
File details
Details for the file agentglass-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentglass-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b462c1286f2daaa359571e572dfad48f746f3e54af312b08bce90eb403874442
|
|
| MD5 |
182e4723bcac6b29650d269296099dea
|
|
| BLAKE2b-256 |
351c83efe014dbf3a331c1f073c1e3a6b7f10b6619fc20d89a66ab41ee35508e
|