Metadata-Version: 2.4
Name: graphsight
Version: 0.1.0
Summary: Local viewer for agent retrieval traces — open a trace_state.json in the Graphsight Studio with one command, no backend.
Author: Arush Karnatak
License: MIT
Project-URL: Repository, https://github.com/Kcodess2807/graphsight
Project-URL: Documentation, https://github.com/Kcodess2807/graphsight/tree/main/graphsight
Keywords: tracing,observability,rag,retrieval,agents,visualization,langgraph
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Debuggers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# graphsight

**Open an agent retrieval trace in your browser with one command.**

```bash
pip install graphsight
graphsight path/to/trace_state.json
```

That's it — a local server starts (stdlib only, zero dependencies), your
browser opens, and the Graphsight Studio renders the trace: the retrieved
entities as a graph, relational edges between them, per-item scores, and the
execution timeline of the run that produced it. No backend, no account, no
telemetry — nothing leaves localhost.

## Where traces come from

Any tool that emits the Studio's `TraceState` JSON. Today that's:

- [`graphsight-langgraph`](../graphsight-langgraph) — trace any LangGraph agent
  with one callback handler:

  ```bash
  pip install "graphsight-langgraph[example]"
  graphsight-github-trace langchain-ai/langgraph "who fixed the recent streaming bugs?"
  graphsight graphsight_out/trace_state.json
  ```

- The full TraceRAG engine (this repo) — its `/api/trace` responses are the
  same shape.

LlamaIndex and raw-OTel adapters are planned; they'll emit the same schema.

## CLI

```
graphsight [trace_state.json] [--port 4630] [--no-browser]
```

- With a trace file: serves it and opens `/memory/import?src=…` — the Studio
  auto-loads it.
- Without: opens the import page, where you can drag-and-drop or paste JSON.

## How it's built

The package bundles a static build of the Studio UI (Vite + React + React
Flow) and serves it with Python's stdlib `http.server` — which is why the
dependency list is empty. The UI source lives in
[`frontend/`](../frontend) in the main repo; to refresh the bundle:

```bash
cd frontend && npm run build
rm -rf ../graphsight/graphsight/dist
cp -r dist ../graphsight/graphsight/dist
```
