Skip to main content

See why your AI agent retrieved what it did — interactive graph viewer for agent retrieval traces. One command, zero dependencies, nothing leaves your machine.

Project description

graphsight

PyPI Python 3.10+ License: MIT

See exactly why your AI agent retrieved what it did.

Your agent answered a question. Which documents did it actually pull? What scores did they get? How are they connected to each other? Most stacks make you dig through logs to answer that. Graphsight renders the run as an interactive graph in your browser — one command, zero dependencies, nothing leaves your machine.

pip install graphsight
graphsight path/to/trace_state.json

What you get

  • Every retrieved item as a typed node — PR, Service, Person, Ticket, Document, Repo, Library, Team, Tool — with its retrieval score.
  • Relational paths between resultsperson → authored → PR → resolves → issue — the chain of evidence, not just a ranked list.
  • An inspector on every node: underlying content, score, source link.
  • The execution timeline of the run: each agent step, each retriever call, per-span timings, and which retrieval arm (vector / graph) produced the results.

Requirements

Python ≥ 3.10
Runtime dependencies none (stdlib only)
Platforms Windows, macOS, Linux
Browser any modern browser

Usage

graphsight [trace] [--port PORT] [--no-browser]
Argument Default Description
trace Path to a trace_state.json. Optional — omit to open the import page and drag-and-drop or paste JSON instead.
--port 4630 Local port to serve on.
--no-browser off Start the server without opening a browser window.

The server binds to 127.0.0.1 only and runs until you press Ctrl+C.

Producing traces

Graphsight renders any file matching its trace JSON contract. Current producers:

  • graphsight-langgraph — instrument any LangGraph agent with a single callback handler, or trace a GitHub repository in one command:

    pip install "graphsight-langgraph[example]"
    graphsight-github-trace langchain-ai/langgraph "who fixed the recent streaming bugs?"
    graphsight graphsight_out/trace_state.json
    
  • The TraceRAG engine — the graph-memory backend this project grew out of; its /api/trace responses are the same shape.

Adapters for LlamaIndex and raw OpenTelemetry spans are planned; all producers emit the same schema and render in this same viewer.

Writing your own producer

The minimum contract is small — a JSON object with:

{
  "query": "the question that was asked",          // required, string
  "graph": {
    "nodes": [{ "id", "label", "type", "score", "meta": { "snippet", "sourceUrl" } }],
    "edges": [{ "id", "source", "target", "relation", "confidence" }]
  },
  "steps":   [ /* execution timeline, optional */ ],
  "metrics": { "queryTimeSec": 0.004 }             // optional
}

Node positions are computed client-side; emitters never deal with layout. The complete schema and a reference emitter live in the graphsight-langgraph source.

Security and privacy

  • The dependency list is empty by design: the UI is a bundled static build (Vite + React + React Flow) served by Python's stdlib http.server.
  • Binds to 127.0.0.1 — not reachable from other machines.
  • No accounts, no telemetry, no outbound network calls. Your traces stay on your disk.

Troubleshooting

Symptom Cause / fix
Address already in use Another process holds the port — pass --port 4631.
Browser doesn't open Some environments (SSH, WSL, containers) can't launch one — start with --no-browser and open the printed URL yourself.
Bundled UI missing error Broken installation — pip install --force-reinstall graphsight.
Page loads but trace doesn't The JSON didn't match the contract — the import page shows the specific validation error.

Links

License

MIT © Arush Karnatak

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

graphsight-0.1.3.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphsight-0.1.3-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file graphsight-0.1.3.tar.gz.

File metadata

  • Download URL: graphsight-0.1.3.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for graphsight-0.1.3.tar.gz
Algorithm Hash digest
SHA256 23983e9a42e9dbc8898f46c8071e9e819df082b50e0dde3f5ec7411d6387f225
MD5 25f1724d856b6733579a8c17c6d0eda1
BLAKE2b-256 4d987238bd4e2c15129f311afd4b0a31e32d82ffd4f61f30e1153c51348292ea

See more details on using hashes here.

File details

Details for the file graphsight-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: graphsight-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for graphsight-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b2927b1d4a4b982ab37dd860f0d4d4035bc7b75260f84c948daabe916646affc
MD5 3bc673c7bc6846a56b787a2bb9956962
BLAKE2b-256 52de840e4bb48f207aa3f6f021c127eb769cccde66246c0f22b3a6d83dca9d1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page