This release is a pre-release and may not be stable for production use.
GraphVIAgent
Local Graph-View-Agent for LangGraph. Scan *_pipeline.py files, record runs under .graphviagent/, and inspect them in a browser UI.
Pipeline files do not import GraphVIAgent. Only runs you start from the UI or CLI are stored.
What's new in 1.3.0-dev
- Parallel
Sendnodes keep timing, logs, tokens, and cancellabletime.sleepon worker threads graphviagent.tomlcontextis passed into runs as LangGraph runtime context- Routing strip counts paused with success / failed / canceled. Runtime average vs longest uses successful runs only
- Cancel mid-node keeps that visit’s timing; Routing shows canceled, not END
See CHANGELOG.md for 1.2.0.
Requirements
- Python 3.11 or newer
- A folder of LangGraph files named
*_pipeline.py
Install
New folder:
mkdir my_graphs
cd my_graphs
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install graphviagent
From a clone of this repo:
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
First pipeline
Installing the package does not copy example files into your project. Add one yourself. The file name must end with _pipeline.py.
Save this as echo_pipeline.py:
from typing import TypedDict
from langgraph.graph import END, START, StateGraph
EXAMPLES = [
{"label": "hello", "input": {"text": "hello"}},
{"label": "GraphVIAgent", "input": {"text": "GraphVIAgent"}},
]
class EchoState(TypedDict):
text: str
echoed: str
length: int
def echo(state: EchoState) -> dict:
text = state["text"]
return {
"echoed": text[::-1],
"length": len(text),
"reason": f"reversed {len(text)} chars",
}
def build_graph():
graph = StateGraph(EchoState)
graph.add_node("echo", echo)
graph.add_edge(START, "echo")
graph.add_edge("echo", END)
return graph.compile()
EXAMPLES is optional. The first item prefills the input box. Use {"label": "hello", "input": {"text": "hello"}} or a bare dict.
List pipelines
From the folder that contains the file:
graphviagent .
graphviagent list .
You should see echo_pipeline.py ok examples=2. If you see no pipelines, you are in the wrong folder or the file name is wrong.
Record a run from the CLI
graphviagent run echo_pipeline.py --input '{"text":"hi"}'
The run is stored under .graphviagent/ in the current directory. Exit status is 1 if the graph raised.
Open the UI
graphviagent serve .
graphviagent serve . --open
--open launches the browser. Or open http://127.0.0.1:8765 yourself. Leave the terminal running.
graphviagent serve . --port 9000
graphviagent serve . --host 127.0.0.1
The UI only accepts requests from its own origin (a page on another site cannot click Run for you). Bind stays on localhost unless you pass --expose:
graphviagent serve . --host 0.0.0.0 --expose
--expose prints a warning. Anyone who can open that URL can run your pipelines and read stored runs.
New or edited *_pipeline.py files (and toml-listed pipelines, including files outside the serve root) refresh the sidebar on their own. You do not need to restart serve. A file-change panel (bottom right) shows when a pipeline appears, is modified, or its SHA256 hash changes.
Trace
- Select the pipeline in the sidebar.
- Edit the JSON input (the first
EXAMPLESitem is prefilled). - Click Run.
- Single-click a node to select it. Double-click to open Node view. Node cards show
file:line; click to open in the editor. Failed nodes include a traceback. - Click the gutter dot on a topology card to break before that node. Breakpoints persist per pipeline. Continue resumes with those breakpoints; Step runs the next node and pauses again.
- Human-in-the-loop graphs (
interrupt(...)) pause with a resume-value box. Continue sends that JSON (trueto keep a draft, or"edit this"to replace it). Continue after a process restart fails — checkpoints are in-memory. - Filter the run list by status (all / success / paused / canceled / failed) or input text.
- Export downloads the open run as JSON. Import or drop a JSON file on the run list.
- Runs and Statistics (between Import and Delete) jump to this pipeline. Delete run removes the open run. Hover a JSON box and use Copy to copy it. Cancel stops an in-flight run, or abandons a paused one — stored as canceled, not failed.
Replay step runs only the selected node again. Replay from continues the compiled graph from that checkpoint (reducers and routing included). GraphVIAgent attaches an in-process checkpointer when the pipeline did not. Approximate replay is only when that is impossible, or the original thread is gone after a restart. Side effects will fire.
Each run stores a SHA256 of the graph (nodes, edges, state keys, tools). If that hash no longer matches the loaded pipeline, the run is marked outdated and replay asks before continuing.
If a node returns messages or tool calls, they render as a thread above the JSON tree.
Runs
Airflow-style grid: duration bars, then task × run (✓ / ✕ / ○ / paused amber). Click the name to open Trace. Click a bar, cell, or ▶ to open that run. Trace and Statistics jump to this pipeline (#/runs/<name>). Clear deletes every run for that pipeline.
Failed nodes stay in history and show as red.
Compare
Open Compare. Filter by pipeline (default all). When a pipeline is selected, Run A and Run B only list that pipeline’s runs. Diff input, path, per-node output, and timing. If a node ran more than once (loop or branch), each visit is aligned separately. Hover a cell and use Copy.
Statistics
Open Statistics (#/statistics/<name>). Choose a pipeline — there is no all view. Trace and Runs jump to that pipeline. Routing, Runtime, and Cost draw the same topology as Trace. Routing shows run count, average node visits per run, and a success / failed / canceled / paused split. Runtime writes average duration on each node and a pipeline grand total / average per successful run (violet average vs orange max on the same strip as Cost / Routing). Cost writes average in/out tokens on each node, a total badge, and a pipeline grand total / average per run. Hover a color strip for a legend of color dots and labels, one per line. Click a node on Routing to see branches grouped together, with similar reason text collapsed into a pattern. Click a node on Runtime for min / avg / max.
Where runs are stored
Runs are written under the folder you served or ran from:
my_graphs/.graphviagent/runs/echo_pipeline/<id>.json
Each file includes schema_version (currently 1) and gva_version. Older files with no version still load. A run from a newer GraphVIAgent is refused. Add .graphviagent/ to .gitignore.
Pipeline contract
A file is viewable if it is named *_pipeline.py (or listed in graphviagent.toml) and exposes, in this order:
build_graph()/get_graph()/create_graph()/__graph__- compiled or
StateGraphGRAPH - compiled
app(streamandinvokeonly — a package namedappis ignored)
Optional: EXAMPLES = [{"label": "hello", "input": {"text": "hello"}}] (or a bare dict). The first example prefills the Trace input.
If a node update includes decisions, reason, or choice, the UI labels the branch. That is optional.
Do not put GRAPH / app only under if __name__ == "__main__":. The loader imports the file; it does not run that block.
Project config
Put graphviagent.toml at the project root so from app.graph import build_graph works even when you launch graphviagent from another directory (Desktop, a shortcut, venv/Scripts):
root = "."
pythonpath = ["."]
env_file = ".env"
context = {}
[pipeline.decision]
file = "decision_pipeline.py"
rootandpythonpathare resolved relative to the toml file, not the process cwdpythonpathis inserted onsys.pathbefore the pipeline runs; the file's own directory is always added tooenv_fileloadsKEY=VALUElines without overwriting variables already in the environmentcontextis LangGraph runtime context (runtime.context/get_runtime()), not graph state. It is passed on every UI, CLI, HITL resume, and replay run. Empty{}is omitted- If any
[pipeline.*]tables exist, those files are the pipelines (filemay be any.py, including a path outside the serve root). Optionalfactory = "build_graph" - If there are no
[pipeline.*]tables, GraphVIAgent still globs*_pipeline.py
graphviagent serve /path/to/proj uses that project's toml even when cwd is elsewhere.
Examples in this repo
After a clone:
graphviagent serve examples
examples/dummy_pipeline.py— name-length branch and a polish loopexamples/tokens_pipeline.py— dummy randomusageprompt/completion on each node (Cost view)examples/echo_pipeline.py— reverse atextfieldexamples/context_pipeline.py—runtime.context.user_namefromexamples/graphviagent.tomlexamples/math_pipeline.py— add or divide;{a: 12, b: 0, op: "div"}raisesexamples/ratio_pipeline.py— part / total;{total: 0}raisesexamples/stats_pipeline.py— mean of a list;{values: []}raisesexamples/grade_pipeline.py— score / max;{maximum: 0}raisesexamples/convert_pipeline.py—{value: 0, unit: "per_unit"}or{unit: "kelvin"}raisesexamples/traceback_pipeline.py— nested helpers;{hits: 3, tries: 0}raises with a clickable tracebackexamples/wait_pipeline.py— threetime.sleepnodes (seconds, default 1)examples/hitl_pipeline.py— draft theninterrupt; Continue from the UI withtrueor"edit this"
Metadata
Release files for graphviagent 1.3.0.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| graphviagent-1.3.0.dev0.tar.gz | 106.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| graphviagent-1.3.0.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 205.8 kB
Release files / graphviagent-1.3.0.dev0.tar.gz
| Download URL | graphviagent-1.3.0.dev0.tar.gz |
|---|---|
| Size | 106.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd0ce343318975ee41c83b3914d5cf959a947b27e58a4ee8221cf07d7ad346e6
|
|
BLAKE2b-256 checksum How to use checksums |
f8ab2a1b5ccfb9ae4295a286cc8f2cb69d5ab7f765d29e0e6ba1ed15b94ff557
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / graphviagent-1.3.0.dev0-py3-none-any.whl
| Download URL | graphviagent-1.3.0.dev0-py3-none-any.whl |
|---|---|
| Size | 98.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98b53d0ce89dbbf06ec38cb3974de5a2ee94046f4631b5fa8c6ca31396cb69b8
|
|
BLAKE2b-256 checksum How to use checksums |
9295093f455fff76e6e774faac7a0b8a61a2eb98d64ef1c5e02fe4cb26b8ce85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency log