graphsight-langgraph 0.2.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/LICENSE +21 -21
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/PKG-INFO +26 -9
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/README.md +276 -259
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph/__init__.py +34 -34
- graphsight_langgraph-0.3.1/graphsight_langgraph/_text.py +17 -0
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph/capture.py +43 -43
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph/github_ingest.py +310 -309
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph/mapper.py +158 -158
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph/schema.py +79 -79
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph/tracer.py +271 -270
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph.egg-info/PKG-INFO +26 -9
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph.egg-info/SOURCES.txt +5 -1
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/pyproject.toml +41 -41
- graphsight_langgraph-0.3.1/tests/test_capture.py +32 -0
- graphsight_langgraph-0.3.1/tests/test_mapper.py +81 -0
- graphsight_langgraph-0.3.1/tests/test_tracer.py +138 -0
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph.egg-info/dependency_links.txt +0 -0
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph.egg-info/entry_points.txt +0 -0
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph.egg-info/requires.txt +0 -0
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/graphsight_langgraph.egg-info/top_level.txt +0 -0
- {graphsight_langgraph-0.2.0 → graphsight_langgraph-0.3.1}/setup.cfg +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Arush Karnatak
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arush Karnatak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: graphsight-langgraph
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: X-ray for LangGraph retrieval: one callback handler captures every retriever call, score, and relational path — rendered as an interactive graph.
|
|
5
5
|
Author: Arush Karnatak
|
|
6
6
|
License: MIT
|
|
@@ -31,10 +31,13 @@ Dynamic: license-file
|
|
|
31
31
|
[](https://pypi.org/project/graphsight-langgraph/)
|
|
32
32
|
[](https://github.com/Kcodess2807/graphsight/blob/main/graphsight-langgraph/LICENSE)
|
|
33
33
|
|
|
34
|
-
**See
|
|
34
|
+
**See which retrieved documents your agent actually used — and which it ignored.**
|
|
35
|
+
|
|
36
|
+
Retrieval in an agent is a black box: twelve documents go in, an answer comes
|
|
37
|
+
out, and when the answer is wrong you're left guessing which context misled
|
|
38
|
+
it. The nine documents the model ignored still cost you tokens, latency, and
|
|
39
|
+
a wider surface to go wrong on — and nothing tells you which nine.
|
|
35
40
|
|
|
36
|
-
Retrieval in an agent is a black box: documents go in, an answer comes out,
|
|
37
|
-
and when the answer is wrong you're left guessing which context misled it.
|
|
38
41
|
This package opens the box. One callback handler records a
|
|
39
42
|
[LangGraph](https://github.com/langchain-ai/langgraph) run — every node,
|
|
40
43
|
every retriever call, per-document scores, and (for graph-aware retrievers)
|
|
@@ -42,13 +45,18 @@ the relational paths between retrieved entities — and one command renders it
|
|
|
42
45
|
as an interactive graph in your browser.
|
|
43
46
|
|
|
44
47
|
```
|
|
45
|
-
your LangGraph agent ──▶ LangGraphTracer ──▶ AgentTrace (v0.
|
|
48
|
+
your LangGraph agent ──▶ LangGraphTracer ──▶ AgentTrace (v0.2) ──▶ graphsight viewer
|
|
46
49
|
(callbacks) neutral JSON interactive graph
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
Only dependency: `langchain-core`. No engine, no backend, no account —
|
|
50
53
|
nothing leaves your machine.
|
|
51
54
|
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
*A real run. `PR #101` scored **0.910** — the highest of anything retrieved — and the answer
|
|
58
|
+
never used it. `PR #412` scored **0.340** and is the one that answered.*
|
|
59
|
+
|
|
52
60
|
## Installation
|
|
53
61
|
|
|
54
62
|
```bash
|
|
@@ -64,8 +72,8 @@ pip install graphsight # the local viewer (recommended)
|
|
|
64
72
|
| Python | ≥ 3.10 |
|
|
65
73
|
| `langchain-core` | ≥ 0.3 (verified against 1.5.0) |
|
|
66
74
|
| `langgraph` | any recent version; only needed for the `[example]` extra |
|
|
67
|
-
| Sync (`invoke` / `stream`) | verified |
|
|
68
|
-
| Async (`ainvoke` / `astream`) |
|
|
75
|
+
| Sync (`invoke` / `stream`) | verified, covered by the test suite |
|
|
76
|
+
| Async (`ainvoke` / `astream`) | verified, covered by the test suite |
|
|
69
77
|
|
|
70
78
|
## Quickstart: trace a GitHub repo in 60 seconds
|
|
71
79
|
|
|
@@ -171,7 +179,7 @@ retrievals.
|
|
|
171
179
|
| `capture(tracer, query=None, answer=None, dir=None) -> Path` | `finish()` + save to the history directory in one call. |
|
|
172
180
|
| `save_trace(trace, dir=None) -> Path` | Writes a finished trace to the history directory (`./.graphsight/` or `$GRAPHSIGHT_DIR`). |
|
|
173
181
|
| `to_tracestate(trace) -> dict` | Maps an `AgentTrace` to the viewer's JSON contract. Serialize with `json.dump`. |
|
|
174
|
-
| `trace.to_dict() -> dict` | The framework-neutral `AgentTrace` (schema v0.
|
|
182
|
+
| `trace.to_dict() -> dict` | The framework-neutral `AgentTrace` (schema v0.2) for your own tooling. |
|
|
175
183
|
| `AgentTrace`, `Span`, `Retrieval`, `RetrievedItem`, `TraceEdge` | Plain dataclasses defining the schema; importable for custom emitters. |
|
|
176
184
|
|
|
177
185
|
## What gets captured
|
|
@@ -214,6 +222,15 @@ Document(
|
|
|
214
222
|
`repo → Repo`, `library → Library`, `team → Team`, `tool → Tool`; anything
|
|
215
223
|
else renders as `Document`).
|
|
216
224
|
|
|
225
|
+
> **Both endpoints must be retrieved items.** The viewer can only draw an edge
|
|
226
|
+
> between two nodes it has, so an edge pointing at something you didn't return
|
|
227
|
+
> — `{"source": "person_vishal", "target": "pr_412"}` when no document has
|
|
228
|
+
> `id: "person_vishal"` — is dropped from the rendered graph. (It is preserved
|
|
229
|
+
> in `AgentTrace`, so your own tooling still sees it.) If you want people,
|
|
230
|
+
> services or tickets on the canvas, **return them as documents too**, each
|
|
231
|
+
> with its own `id`, `label` and `kind`. A retriever that emits only PRs and
|
|
232
|
+
> then links them to authors will render a flat graph with no edges at all.
|
|
233
|
+
|
|
217
234
|
### Degradation behavior
|
|
218
235
|
|
|
219
236
|
- **No edges in metadata** → a flat scored-retrieval view instead of
|
|
@@ -265,7 +282,7 @@ OpenTelemetry) emit the same shape and render in the same viewer. v0.2 adds
|
|
|
265
282
|
|---|---|
|
|
266
283
|
| Node spans but no retrievals | Config not propagated into the node's sub-runnables — see [Configuration propagation](#configuration-propagation-read-this-once). |
|
|
267
284
|
| Items without scores | Your retriever doesn't write a recognized score key to `Document.metadata` — add one (`score` is simplest). |
|
|
268
|
-
| Flat graph, no edges |
|
|
285
|
+
| Flat graph, no edges | Either your retriever doesn't emit `metadata["edges"]`, or the edges point at ids you never returned as documents — both endpoints must be retrieved items. See [Making your retriever graph-aware](#making-your-retriever-graph-aware). |
|
|
269
286
|
| `GitHub API 403` from the CLI | Rate limit (60 requests/hour unauthenticated) — pass `--token` or set `GITHUB_TOKEN`. |
|
|
270
287
|
| Garbled output on Windows consoles | Fixed in ≥ 0.1.1; upgrade. |
|
|
271
288
|
|