graphsight 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.
Files changed (78) hide show
  1. {graphsight-0.2.0 → graphsight-0.3.1}/LICENSE +21 -21
  2. {graphsight-0.2.0 → graphsight-0.3.1}/MANIFEST.in +2 -2
  3. {graphsight-0.2.0/graphsight.egg-info → graphsight-0.3.1}/PKG-INFO +41 -13
  4. {graphsight-0.2.0 → graphsight-0.3.1}/README.md +180 -152
  5. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/__init__.py +11 -11
  6. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/cli.py +66 -66
  7. graphsight-0.2.0/graphsight/dist/assets/arc-DX2Y_03-.js → graphsight-0.3.1/graphsight/dist/assets/arc-DGOsvhEX.js +1 -1
  8. graphsight-0.2.0/graphsight/dist/assets/architectureDiagram-3BPJPVTR-CoN3YUIu.js → graphsight-0.3.1/graphsight/dist/assets/architectureDiagram-3BPJPVTR-CbMqmqRH.js +1 -1
  9. graphsight-0.2.0/graphsight/dist/assets/blockDiagram-GPEHLZMM-z6CbyinI.js → graphsight-0.3.1/graphsight/dist/assets/blockDiagram-GPEHLZMM-CDyJXpDM.js +1 -1
  10. graphsight-0.2.0/graphsight/dist/assets/c4Diagram-AAUBKEIU-BS1vxNfO.js → graphsight-0.3.1/graphsight/dist/assets/c4Diagram-AAUBKEIU-CDIS2dj-.js +1 -1
  11. graphsight-0.3.1/graphsight/dist/assets/channel-DKZXqgRh.js +1 -0
  12. graphsight-0.2.0/graphsight/dist/assets/chunk-2J33WTMH-Kx9yrCNJ.js → graphsight-0.3.1/graphsight/dist/assets/chunk-2J33WTMH-DF0wXQ_q.js +1 -1
  13. graphsight-0.2.0/graphsight/dist/assets/chunk-4BX2VUAB-ChQj2n3P.js → graphsight-0.3.1/graphsight/dist/assets/chunk-4BX2VUAB-C6Xwj9Pr.js +1 -1
  14. graphsight-0.2.0/graphsight/dist/assets/chunk-55IACEB6-CzqSW9P2.js → graphsight-0.3.1/graphsight/dist/assets/chunk-55IACEB6-BjGYIYUH.js +1 -1
  15. graphsight-0.2.0/graphsight/dist/assets/chunk-727SXJPM-Ci9pVnPE.js → graphsight-0.3.1/graphsight/dist/assets/chunk-727SXJPM-wS8WwDXi.js +1 -1
  16. graphsight-0.2.0/graphsight/dist/assets/chunk-AQP2D5EJ-DHxxpVwV.js → graphsight-0.3.1/graphsight/dist/assets/chunk-AQP2D5EJ-MY0fo7mx.js +1 -1
  17. graphsight-0.2.0/graphsight/dist/assets/chunk-FMBD7UC4-Bpcavdl6.js → graphsight-0.3.1/graphsight/dist/assets/chunk-FMBD7UC4-CNVgh_MP.js +1 -1
  18. graphsight-0.2.0/graphsight/dist/assets/chunk-ND2GUHAM-p3aZOIrR.js → graphsight-0.3.1/graphsight/dist/assets/chunk-ND2GUHAM-r3utGEk6.js +1 -1
  19. graphsight-0.2.0/graphsight/dist/assets/chunk-QZHKN3VN-CosEeF5i.js → graphsight-0.3.1/graphsight/dist/assets/chunk-QZHKN3VN-CRKapwff.js +1 -1
  20. graphsight-0.3.1/graphsight/dist/assets/classDiagram-4FO5ZUOK-DvcSHvlU.js +1 -0
  21. graphsight-0.3.1/graphsight/dist/assets/classDiagram-v2-Q7XG4LA2-DvcSHvlU.js +1 -0
  22. graphsight-0.2.0/graphsight/dist/assets/cose-bilkent-S5V4N54A-BssgBP7_.js → graphsight-0.3.1/graphsight/dist/assets/cose-bilkent-S5V4N54A-D8A0GZYU.js +1 -1
  23. graphsight-0.2.0/graphsight/dist/assets/dagre-BM42HDAG-BwS39MAa.js → graphsight-0.3.1/graphsight/dist/assets/dagre-BM42HDAG-CdY1GieV.js +1 -1
  24. graphsight-0.2.0/graphsight/dist/assets/diagram-2AECGRRQ-B7CPRZV4.js → graphsight-0.3.1/graphsight/dist/assets/diagram-2AECGRRQ-BmpqIsY_.js +1 -1
  25. graphsight-0.2.0/graphsight/dist/assets/diagram-5GNKFQAL-BIuCqvh0.js → graphsight-0.3.1/graphsight/dist/assets/diagram-5GNKFQAL-CGucdtV7.js +1 -1
  26. graphsight-0.2.0/graphsight/dist/assets/diagram-KO2AKTUF-D_PC7ApA.js → graphsight-0.3.1/graphsight/dist/assets/diagram-KO2AKTUF-D8UClmZ6.js +1 -1
  27. graphsight-0.2.0/graphsight/dist/assets/diagram-LMA3HP47-BIyYFC4E.js → graphsight-0.3.1/graphsight/dist/assets/diagram-LMA3HP47-BbUB7zIV.js +1 -1
  28. graphsight-0.2.0/graphsight/dist/assets/diagram-OG6HWLK6-W3CKcEFl.js → graphsight-0.3.1/graphsight/dist/assets/diagram-OG6HWLK6-BLKvQFD6.js +1 -1
  29. graphsight-0.2.0/graphsight/dist/assets/erDiagram-TEJ5UH35-D6scDkhL.js → graphsight-0.3.1/graphsight/dist/assets/erDiagram-TEJ5UH35-DhE3Yfeq.js +1 -1
  30. graphsight-0.2.0/graphsight/dist/assets/flowDiagram-I6XJVG4X-Bj_XdVV-.js → graphsight-0.3.1/graphsight/dist/assets/flowDiagram-I6XJVG4X-BoPzRdHF.js +1 -1
  31. graphsight-0.2.0/graphsight/dist/assets/ganttDiagram-6RSMTGT7-CBvqqbHJ.js → graphsight-0.3.1/graphsight/dist/assets/ganttDiagram-6RSMTGT7-Cn2HPQDn.js +1 -1
  32. graphsight-0.2.0/graphsight/dist/assets/gitGraphDiagram-PVQCEYII-by8Fq2bW.js → graphsight-0.3.1/graphsight/dist/assets/gitGraphDiagram-PVQCEYII-e5mkpbyX.js +1 -1
  33. graphsight-0.3.1/graphsight/dist/assets/index-BAt7CdVk.css +1 -0
  34. graphsight-0.3.1/graphsight/dist/assets/index-Bi1lliDA.js +483 -0
  35. graphsight-0.2.0/graphsight/dist/assets/infoDiagram-5YYISTIA-1307Ve3t.js → graphsight-0.3.1/graphsight/dist/assets/infoDiagram-5YYISTIA-DRkiL_DQ.js +1 -1
  36. graphsight-0.2.0/graphsight/dist/assets/ishikawaDiagram-YF4QCWOH-DQl6oden.js → graphsight-0.3.1/graphsight/dist/assets/ishikawaDiagram-YF4QCWOH-_FUPaFzj.js +1 -1
  37. graphsight-0.2.0/graphsight/dist/assets/journeyDiagram-JHISSGLW-COdjWyKQ.js → graphsight-0.3.1/graphsight/dist/assets/journeyDiagram-JHISSGLW-BC6uAFP5.js +1 -1
  38. graphsight-0.2.0/graphsight/dist/assets/kanban-definition-UN3LZRKU-BoaAvorr.js → graphsight-0.3.1/graphsight/dist/assets/kanban-definition-UN3LZRKU-X9H1Bevu.js +1 -1
  39. graphsight-0.2.0/graphsight/dist/assets/linear-CmJqJ-n6.js → graphsight-0.3.1/graphsight/dist/assets/linear-L4AgCZnM.js +1 -1
  40. graphsight-0.2.0/graphsight/dist/assets/mermaid.core-B77A9b3a.js → graphsight-0.3.1/graphsight/dist/assets/mermaid.core-B4Rsz1_K.js +4 -4
  41. graphsight-0.2.0/graphsight/dist/assets/mindmap-definition-RKZ34NQL-4qBkCr9q.js → graphsight-0.3.1/graphsight/dist/assets/mindmap-definition-RKZ34NQL-BggN-jLg.js +1 -1
  42. graphsight-0.2.0/graphsight/dist/assets/pieDiagram-4H26LBE5-C0UJig1b.js → graphsight-0.3.1/graphsight/dist/assets/pieDiagram-4H26LBE5-MXE68O6T.js +1 -1
  43. graphsight-0.2.0/graphsight/dist/assets/quadrantDiagram-W4KKPZXB-DQSdxmL2.js → graphsight-0.3.1/graphsight/dist/assets/quadrantDiagram-W4KKPZXB-lrEZKCVn.js +1 -1
  44. graphsight-0.2.0/graphsight/dist/assets/requirementDiagram-4Y6WPE33-D-XOmsTq.js → graphsight-0.3.1/graphsight/dist/assets/requirementDiagram-4Y6WPE33-BFFGZPL_.js +1 -1
  45. graphsight-0.2.0/graphsight/dist/assets/sankeyDiagram-5OEKKPKP-F877OceW.js → graphsight-0.3.1/graphsight/dist/assets/sankeyDiagram-5OEKKPKP-D2rDi26n.js +1 -1
  46. graphsight-0.2.0/graphsight/dist/assets/sequenceDiagram-3UESZ5HK-CcxrPDRe.js → graphsight-0.3.1/graphsight/dist/assets/sequenceDiagram-3UESZ5HK-Bit_NcSO.js +1 -1
  47. graphsight-0.2.0/graphsight/dist/assets/stateDiagram-AJRCARHV-DGBGZ_xo.js → graphsight-0.3.1/graphsight/dist/assets/stateDiagram-AJRCARHV-yUP1OLyV.js +1 -1
  48. graphsight-0.3.1/graphsight/dist/assets/stateDiagram-v2-BHNVJYJU-CtmFDByB.js +1 -0
  49. graphsight-0.2.0/graphsight/dist/assets/timeline-definition-PNZ67QCA-Chr67AKg.js → graphsight-0.3.1/graphsight/dist/assets/timeline-definition-PNZ67QCA-DNKkG3d7.js +1 -1
  50. graphsight-0.2.0/graphsight/dist/assets/vennDiagram-CIIHVFJN-JuYPgaLN.js → graphsight-0.3.1/graphsight/dist/assets/vennDiagram-CIIHVFJN-C7xsmX66.js +1 -1
  51. graphsight-0.2.0/graphsight/dist/assets/wardley-L42UT6IY-DJty7ogt.js → graphsight-0.3.1/graphsight/dist/assets/wardley-L42UT6IY-rz2LOAhR.js +1 -1
  52. graphsight-0.2.0/graphsight/dist/assets/wardleyDiagram-YWT4CUSO-D5xm5gDN.js → graphsight-0.3.1/graphsight/dist/assets/wardleyDiagram-YWT4CUSO-_1bS5QK8.js +1 -1
  53. graphsight-0.2.0/graphsight/dist/assets/xychartDiagram-2RQKCTM6-D1MZmrg5.js → graphsight-0.3.1/graphsight/dist/assets/xychartDiagram-2RQKCTM6-CVODa8Gv.js +1 -1
  54. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/index.html +25 -25
  55. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/server.py +110 -110
  56. {graphsight-0.2.0 → graphsight-0.3.1/graphsight.egg-info}/PKG-INFO +41 -13
  57. graphsight-0.3.1/graphsight.egg-info/SOURCES.txt +69 -0
  58. {graphsight-0.2.0 → graphsight-0.3.1}/pyproject.toml +40 -40
  59. graphsight-0.3.1/tests/test_server.py +84 -0
  60. graphsight-0.2.0/graphsight/dist/assets/channel-B5gEPc6v.js +0 -1
  61. graphsight-0.2.0/graphsight/dist/assets/classDiagram-4FO5ZUOK-D5MvdHvc.js +0 -1
  62. graphsight-0.2.0/graphsight/dist/assets/classDiagram-v2-Q7XG4LA2-D5MvdHvc.js +0 -1
  63. graphsight-0.2.0/graphsight/dist/assets/index-48_-4Vab.js +0 -460
  64. graphsight-0.2.0/graphsight/dist/assets/index-BvyEzIL6.css +0 -1
  65. graphsight-0.2.0/graphsight/dist/assets/stateDiagram-v2-BHNVJYJU-BH0l1SFC.js +0 -1
  66. graphsight-0.2.0/graphsight.egg-info/SOURCES.txt +0 -68
  67. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/assets/cytoscape.esm-DTSO7Bv0.js +0 -0
  68. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/assets/defaultLocale-DX6XiGOO.js +0 -0
  69. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/assets/graph-CAnANduQ.js +0 -0
  70. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/assets/init-Gi6I4Gst.js +0 -0
  71. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/assets/katex-C5jXJg4s.js +0 -0
  72. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/assets/layout-DGIYPm2g.js +0 -0
  73. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/assets/ordinal-Cboi1Yqb.js +0 -0
  74. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight/dist/favicon.svg +0 -0
  75. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight.egg-info/dependency_links.txt +0 -0
  76. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight.egg-info/entry_points.txt +0 -0
  77. {graphsight-0.2.0 → graphsight-0.3.1}/graphsight.egg-info/top_level.txt +0 -0
  78. {graphsight-0.2.0 → graphsight-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,2 +1,2 @@
1
- recursive-include graphsight/dist *
2
- include LICENSE
1
+ recursive-include graphsight/dist *
2
+ include LICENSE
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphsight
3
- Version: 0.2.0
3
+ Version: 0.3.1
4
4
  Summary: See why your AI agent retrieved what it did — interactive graph viewer for agent retrieval traces. One command, zero dependencies, nothing leaves your machine.
5
5
  Author: Arush Karnatak
6
6
  License: MIT
@@ -28,20 +28,42 @@ Dynamic: license-file
28
28
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://pypi.org/project/graphsight/)
29
29
  [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/Kcodess2807/graphsight/blob/main/graphsight/LICENSE)
30
30
 
31
- **See exactly why your AI agent retrieved what it did.**
31
+ **See which retrieved documents your agent actually used — and which it ignored.**
32
32
 
33
- Your agent answered a question. Which documents did it actually pull? What
34
- scores did they get? How are they connected to each other? Most stacks make
35
- you dig through logs to answer that. Graphsight renders the run as an
36
- **interactive graph in your browser** — one command, zero dependencies,
33
+ Your agent answered a question. Which documents did it actually pull? Which
34
+ of those did the answer come from? What scores did they get, and how are they
35
+ connected? Most stacks make you dig through logs. Graphsight renders the run
36
+ as an **interactive graph in your browser** — one command, zero dependencies,
37
37
  nothing leaves your machine.
38
38
 
39
+ ![Graphsight showing a retrieved-but-unused document](https://raw.githubusercontent.com/Kcodess2807/graphsight/main/docs/media/retrieved-vs-used.gif)
40
+
41
+ *A real run. `PR #101` scored **0.910** — the highest of anything retrieved — and the answer
42
+ never used it. `PR #412` scored **0.340** and is the one that answered.*
43
+
39
44
  ```bash
40
45
  pip install graphsight
41
46
  graphsight path/to/trace_state.json
42
47
  ```
43
48
 
44
- ## What you get
49
+ ## Retrieved vs. used
50
+
51
+ The signal that isn't in your logs. When a trace carries the final answer,
52
+ every retrieved item is scored by lexical overlap against it and rendered
53
+ either **highlighted** (surfaced in the answer) or **dimmed** with the label
54
+ *"retrieved, unused."* That splits the two classic retrieval failures at a
55
+ glance:
56
+
57
+ - **Right document retrieved, ignored by the model** → a dimmed node with a
58
+ high retrieval score. Your retriever worked; your prompt or context order
59
+ didn't.
60
+ - **Wrong document trusted** → a highlighted node that shouldn't be.
61
+
62
+ The overlap is a lexical heuristic, labeled as such (threshold 0.2). No LLM
63
+ re-reads your evidence, and no score is invented — a trace with no answer
64
+ attached makes no usage claims at all.
65
+
66
+ ## What else you get
45
67
 
46
68
  - **Every retrieved item as a typed node** — PR, Service, Person, Ticket,
47
69
  Document, Repo, Library, Team, Tool — with its retrieval score.
@@ -86,10 +108,13 @@ graphsight .graphsight/
86
108
 
87
109
  The [graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)
88
110
  `capture()` helper appends every agent run there automatically, so your
89
- debugging history accumulates with zero ceremony. Traces render with the
90
- **retrieved vs. used** split: items that surfaced in the answer highlighted,
91
- items retrieved but ignored dimmed — the two classic retrieval failures,
92
- visible at a glance.
111
+ debugging history accumulates with zero ceremony — no setup, no database.
112
+
113
+ Because the history is a directory of plain files, you can **compare two
114
+ runs side by side**: what the retrieval returned before a prompt change and
115
+ after it, which items appeared or vanished, and which flipped between used
116
+ and ignored. That is usually the fastest way to answer "what did my edit
117
+ actually do to retrieval?"
93
118
 
94
119
  ## Sharing traces with your team
95
120
 
@@ -122,8 +147,11 @@ producers:
122
147
  graphsight graphsight_out/trace_state.json
123
148
  ```
124
149
 
125
- - **The TraceRAG engine** — the graph-memory backend this project grew out
126
- of; its `/api/trace` responses are the same shape.
150
+ - **The Graphsight graph-memory engine** — the backend this project grew out
151
+ of: GitHub events become a live knowledge graph with typed, timestamped
152
+ edges (`AUTHORED`, `RESOLVES`, `TOUCHES`), queried by a hybrid
153
+ vector + graph router. Its `/api/trace` responses are the same shape. See
154
+ the [main repository](https://github.com/Kcodess2807/graphsight).
127
155
 
128
156
  Adapters for LlamaIndex and raw OpenTelemetry spans are planned; all
129
157
  producers emit the same schema and render in this same viewer.
@@ -1,152 +1,180 @@
1
- # graphsight
2
-
3
- [![PyPI](https://img.shields.io/pypi/v/graphsight.svg)](https://pypi.org/project/graphsight/)
4
- [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://pypi.org/project/graphsight/)
5
- [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/Kcodess2807/graphsight/blob/main/graphsight/LICENSE)
6
-
7
- **See exactly why your AI agent retrieved what it did.**
8
-
9
- Your agent answered a question. Which documents did it actually pull? What
10
- scores did they get? How are they connected to each other? Most stacks make
11
- you dig through logs to answer that. Graphsight renders the run as an
12
- **interactive graph in your browser** — one command, zero dependencies,
13
- nothing leaves your machine.
14
-
15
- ```bash
16
- pip install graphsight
17
- graphsight path/to/trace_state.json
18
- ```
19
-
20
- ## What you get
21
-
22
- - **Every retrieved item as a typed node** — PR, Service, Person, Ticket,
23
- Document, Repo, Library, Team, Tool — with its retrieval score.
24
- - **Relational paths between results** — *person → authored → PR →
25
- resolves → issue* — the chain of evidence, not just a ranked list.
26
- - **An inspector on every node**: underlying content, score, source link.
27
- - **The execution timeline** of the run: each agent step, each retriever
28
- call, per-span timings, and which retrieval arm (vector / graph) produced
29
- the results.
30
-
31
- ## Requirements
32
-
33
- | | |
34
- |---|---|
35
- | Python | ≥ 3.10 |
36
- | Runtime dependencies | **none** (stdlib only) |
37
- | Platforms | Windows, macOS, Linux |
38
- | Browser | any modern browser |
39
-
40
- ## Usage
41
-
42
- ```
43
- graphsight [trace] [--port PORT] [--no-browser]
44
- ```
45
-
46
- | Argument | Default | Description |
47
- |---|---|---|
48
- | `trace` | — | A `trace_state.json` file, **or a directory of them** (e.g. `.graphsight/`) to browse run history. Optional — omit to open the import page and drag-and-drop or paste JSON instead. |
49
- | `--port` | `4630` | Local port to serve on. |
50
- | `--no-browser` | off | Start the server without opening a browser window. |
51
-
52
- The server binds to `127.0.0.1` only and runs until you press `Ctrl+C`.
53
-
54
- ## Run history
55
-
56
- Point `graphsight` at a directory and it becomes a run browser — every
57
- trace listed by query and time, one click to open:
58
-
59
- ```bash
60
- graphsight .graphsight/
61
- ```
62
-
63
- The [graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)
64
- `capture()` helper appends every agent run there automatically, so your
65
- debugging history accumulates with zero ceremony. Traces render with the
66
- **retrieved vs. used** split: items that surfaced in the answer highlighted,
67
- items retrieved but ignored dimmed — the two classic retrieval failures,
68
- visible at a glance.
69
-
70
- ## Sharing traces with your team
71
-
72
- A trace is one self-contained JSON file — no account or backend needed to
73
- share it:
74
-
75
- - **Send the file.** A teammate with `graphsight` installed runs
76
- `graphsight trace.json`. Works in a DM, a ticket attachment, a CI
77
- artifact.
78
- - **Link it.** A deployed Graphsight frontend opens any publicly reachable
79
- trace via `…/memory/import?src=<url-to-json>` — host the JSON on a gist
80
- or artifact store and share the link. (The host must allow cross-origin
81
- GETs; raw gists do.)
82
- - **Commit it.** Trace files in the repo next to the incident or PR they
83
- explain make retrieval debugging part of the review record.
84
-
85
- ## Producing traces
86
-
87
- Graphsight renders any file matching its trace JSON contract. Current
88
- producers:
89
-
90
- - **[graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)** —
91
- instrument any [LangGraph](https://github.com/langchain-ai/langgraph)
92
- agent with a single callback handler, or trace a GitHub repository in one
93
- command:
94
-
95
- ```bash
96
- pip install "graphsight-langgraph[example]"
97
- graphsight-github-trace langchain-ai/langgraph "who fixed the recent streaming bugs?"
98
- graphsight graphsight_out/trace_state.json
99
- ```
100
-
101
- - **The TraceRAG engine** — the graph-memory backend this project grew out
102
- of; its `/api/trace` responses are the same shape.
103
-
104
- Adapters for LlamaIndex and raw OpenTelemetry spans are planned; all
105
- producers emit the same schema and render in this same viewer.
106
-
107
- ### Writing your own producer
108
-
109
- The minimum contract is small — a JSON object with:
110
-
111
- ```jsonc
112
- {
113
- "query": "the question that was asked", // required, string
114
- "graph": {
115
- "nodes": [{ "id", "label", "type", "score", "meta": { "snippet", "sourceUrl" } }],
116
- "edges": [{ "id", "source", "target", "relation", "confidence" }]
117
- },
118
- "steps": [ /* execution timeline, optional */ ],
119
- "metrics": { "queryTimeSec": 0.004 } // optional
120
- }
121
- ```
122
-
123
- Node positions are computed client-side; emitters never deal with layout.
124
- The complete schema and a reference emitter live in the
125
- [graphsight-langgraph source](https://github.com/Kcodess2807/graphsight/tree/main/graphsight-langgraph).
126
-
127
- ## Security and privacy
128
-
129
- - The dependency list is empty by design: the UI is a bundled static build
130
- (Vite + React + React Flow) served by Python's stdlib `http.server`.
131
- - Binds to `127.0.0.1` — not reachable from other machines.
132
- - No accounts, no telemetry, no outbound network calls. Your traces stay on
133
- your disk.
134
-
135
- ## Troubleshooting
136
-
137
- | Symptom | Cause / fix |
138
- |---|---|
139
- | `Address already in use` | Another process holds the port — pass `--port 4631`. |
140
- | Browser doesn't open | Some environments (SSH, WSL, containers) can't launch one — start with `--no-browser` and open the printed URL yourself. |
141
- | `Bundled UI missing` error | Broken installation — `pip install --force-reinstall graphsight`. |
142
- | Page loads but trace doesn't | The JSON didn't match the contract — the import page shows the specific validation error. |
143
-
144
- ## Links
145
-
146
- - Source & issue tracker: [github.com/Kcodess2807/graphsight](https://github.com/Kcodess2807/graphsight)
147
- - LangGraph adapter: [graphsight-langgraph on PyPI](https://pypi.org/project/graphsight-langgraph/)
148
- - Beta test script: [BETA.md](https://github.com/Kcodess2807/graphsight/blob/main/BETA.md)
149
-
150
- ## License
151
-
152
- MIT © Arush Karnatak
1
+ # graphsight
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/graphsight.svg)](https://pypi.org/project/graphsight/)
4
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://pypi.org/project/graphsight/)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/Kcodess2807/graphsight/blob/main/graphsight/LICENSE)
6
+
7
+ **See which retrieved documents your agent actually used — and which it ignored.**
8
+
9
+ Your agent answered a question. Which documents did it actually pull? Which
10
+ of those did the answer come from? What scores did they get, and how are they
11
+ connected? Most stacks make you dig through logs. Graphsight renders the run
12
+ as an **interactive graph in your browser** — one command, zero dependencies,
13
+ nothing leaves your machine.
14
+
15
+ ![Graphsight showing a retrieved-but-unused document](https://raw.githubusercontent.com/Kcodess2807/graphsight/main/docs/media/retrieved-vs-used.gif)
16
+
17
+ *A real run. `PR #101` scored **0.910** — the highest of anything retrieved — and the answer
18
+ never used it. `PR #412` scored **0.340** and is the one that answered.*
19
+
20
+ ```bash
21
+ pip install graphsight
22
+ graphsight path/to/trace_state.json
23
+ ```
24
+
25
+ ## Retrieved vs. used
26
+
27
+ The signal that isn't in your logs. When a trace carries the final answer,
28
+ every retrieved item is scored by lexical overlap against it and rendered
29
+ either **highlighted** (surfaced in the answer) or **dimmed** with the label
30
+ *"retrieved, unused."* That splits the two classic retrieval failures at a
31
+ glance:
32
+
33
+ - **Right document retrieved, ignored by the model** → a dimmed node with a
34
+ high retrieval score. Your retriever worked; your prompt or context order
35
+ didn't.
36
+ - **Wrong document trusted** → a highlighted node that shouldn't be.
37
+
38
+ The overlap is a lexical heuristic, labeled as such (threshold 0.2). No LLM
39
+ re-reads your evidence, and no score is invented — a trace with no answer
40
+ attached makes no usage claims at all.
41
+
42
+ ## What else you get
43
+
44
+ - **Every retrieved item as a typed node** — PR, Service, Person, Ticket,
45
+ Document, Repo, Library, Team, Tool — with its retrieval score.
46
+ - **Relational paths between results** — *person → authored → PR →
47
+ resolves → issue* — the chain of evidence, not just a ranked list.
48
+ - **An inspector on every node**: underlying content, score, source link.
49
+ - **The execution timeline** of the run: each agent step, each retriever
50
+ call, per-span timings, and which retrieval arm (vector / graph) produced
51
+ the results.
52
+
53
+ ## Requirements
54
+
55
+ | | |
56
+ |---|---|
57
+ | Python | ≥ 3.10 |
58
+ | Runtime dependencies | **none** (stdlib only) |
59
+ | Platforms | Windows, macOS, Linux |
60
+ | Browser | any modern browser |
61
+
62
+ ## Usage
63
+
64
+ ```
65
+ graphsight [trace] [--port PORT] [--no-browser]
66
+ ```
67
+
68
+ | Argument | Default | Description |
69
+ |---|---|---|
70
+ | `trace` | — | A `trace_state.json` file, **or a directory of them** (e.g. `.graphsight/`) to browse run history. Optional — omit to open the import page and drag-and-drop or paste JSON instead. |
71
+ | `--port` | `4630` | Local port to serve on. |
72
+ | `--no-browser` | off | Start the server without opening a browser window. |
73
+
74
+ The server binds to `127.0.0.1` only and runs until you press `Ctrl+C`.
75
+
76
+ ## Run history
77
+
78
+ Point `graphsight` at a directory and it becomes a run browser — every
79
+ trace listed by query and time, one click to open:
80
+
81
+ ```bash
82
+ graphsight .graphsight/
83
+ ```
84
+
85
+ The [graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)
86
+ `capture()` helper appends every agent run there automatically, so your
87
+ debugging history accumulates with zero ceremony — no setup, no database.
88
+
89
+ Because the history is a directory of plain files, you can **compare two
90
+ runs side by side**: what the retrieval returned before a prompt change and
91
+ after it, which items appeared or vanished, and which flipped between used
92
+ and ignored. That is usually the fastest way to answer "what did my edit
93
+ actually do to retrieval?"
94
+
95
+ ## Sharing traces with your team
96
+
97
+ A trace is one self-contained JSON file — no account or backend needed to
98
+ share it:
99
+
100
+ - **Send the file.** A teammate with `graphsight` installed runs
101
+ `graphsight trace.json`. Works in a DM, a ticket attachment, a CI
102
+ artifact.
103
+ - **Link it.** A deployed Graphsight frontend opens any publicly reachable
104
+ trace via `…/memory/import?src=<url-to-json>` — host the JSON on a gist
105
+ or artifact store and share the link. (The host must allow cross-origin
106
+ GETs; raw gists do.)
107
+ - **Commit it.** Trace files in the repo next to the incident or PR they
108
+ explain make retrieval debugging part of the review record.
109
+
110
+ ## Producing traces
111
+
112
+ Graphsight renders any file matching its trace JSON contract. Current
113
+ producers:
114
+
115
+ - **[graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)** —
116
+ instrument any [LangGraph](https://github.com/langchain-ai/langgraph)
117
+ agent with a single callback handler, or trace a GitHub repository in one
118
+ command:
119
+
120
+ ```bash
121
+ pip install "graphsight-langgraph[example]"
122
+ graphsight-github-trace langchain-ai/langgraph "who fixed the recent streaming bugs?"
123
+ graphsight graphsight_out/trace_state.json
124
+ ```
125
+
126
+ - **The Graphsight graph-memory engine** — the backend this project grew out
127
+ of: GitHub events become a live knowledge graph with typed, timestamped
128
+ edges (`AUTHORED`, `RESOLVES`, `TOUCHES`), queried by a hybrid
129
+ vector + graph router. Its `/api/trace` responses are the same shape. See
130
+ the [main repository](https://github.com/Kcodess2807/graphsight).
131
+
132
+ Adapters for LlamaIndex and raw OpenTelemetry spans are planned; all
133
+ producers emit the same schema and render in this same viewer.
134
+
135
+ ### Writing your own producer
136
+
137
+ The minimum contract is small — a JSON object with:
138
+
139
+ ```jsonc
140
+ {
141
+ "query": "the question that was asked", // required, string
142
+ "graph": {
143
+ "nodes": [{ "id", "label", "type", "score", "meta": { "snippet", "sourceUrl" } }],
144
+ "edges": [{ "id", "source", "target", "relation", "confidence" }]
145
+ },
146
+ "steps": [ /* execution timeline, optional */ ],
147
+ "metrics": { "queryTimeSec": 0.004 } // optional
148
+ }
149
+ ```
150
+
151
+ Node positions are computed client-side; emitters never deal with layout.
152
+ The complete schema and a reference emitter live in the
153
+ [graphsight-langgraph source](https://github.com/Kcodess2807/graphsight/tree/main/graphsight-langgraph).
154
+
155
+ ## Security and privacy
156
+
157
+ - The dependency list is empty by design: the UI is a bundled static build
158
+ (Vite + React + React Flow) served by Python's stdlib `http.server`.
159
+ - Binds to `127.0.0.1` — not reachable from other machines.
160
+ - No accounts, no telemetry, no outbound network calls. Your traces stay on
161
+ your disk.
162
+
163
+ ## Troubleshooting
164
+
165
+ | Symptom | Cause / fix |
166
+ |---|---|
167
+ | `Address already in use` | Another process holds the port — pass `--port 4631`. |
168
+ | Browser doesn't open | Some environments (SSH, WSL, containers) can't launch one — start with `--no-browser` and open the printed URL yourself. |
169
+ | `Bundled UI missing` error | Broken installation — `pip install --force-reinstall graphsight`. |
170
+ | Page loads but trace doesn't | The JSON didn't match the contract — the import page shows the specific validation error. |
171
+
172
+ ## Links
173
+
174
+ - Source & issue tracker: [github.com/Kcodess2807/graphsight](https://github.com/Kcodess2807/graphsight)
175
+ - LangGraph adapter: [graphsight-langgraph on PyPI](https://pypi.org/project/graphsight-langgraph/)
176
+ - Beta test script: [BETA.md](https://github.com/Kcodess2807/graphsight/blob/main/BETA.md)
177
+
178
+ ## License
179
+
180
+ MIT © Arush Karnatak
@@ -1,11 +1,11 @@
1
- """graphsight — local viewer for agent retrieval traces.
2
-
3
- Usage:
4
-
5
- graphsight path/to/trace_state.json
6
-
7
- Serves the bundled Graphsight Studio UI locally and opens the trace in the
8
- browser. No backend, no accounts, no network calls beyond localhost.
9
- """
10
-
11
- __version__ = "0.2.0"
1
+ """graphsight — local viewer for agent retrieval traces.
2
+
3
+ Usage:
4
+
5
+ graphsight path/to/trace_state.json
6
+
7
+ Serves the bundled Graphsight Studio UI locally and opens the trace in the
8
+ browser. No backend, no accounts, no network calls beyond localhost.
9
+ """
10
+
11
+ __version__ = "0.3.1"
@@ -1,66 +1,66 @@
1
- """graphsight CLI — open a trace (or a whole run history) in the bundled UI."""
2
- from __future__ import annotations
3
-
4
- import argparse
5
- import sys
6
- import webbrowser
7
- from pathlib import Path
8
- from typing import Optional
9
-
10
- from .server import RUNS_ROUTE, TRACE_ROUTE, make_server
11
-
12
-
13
- def main(argv: Optional[list[str]] = None) -> None:
14
- for stream in (sys.stdout, sys.stderr):
15
- try:
16
- stream.reconfigure(encoding="utf-8") # type: ignore[union-attr]
17
- except (AttributeError, OSError):
18
- pass
19
-
20
- parser = argparse.ArgumentParser(
21
- prog="graphsight",
22
- description="Open a trace_state.json — or a history directory like .graphsight/ — in your browser.",
23
- )
24
- parser.add_argument("trace", nargs="?", type=Path,
25
- help="a trace_state.json, or a directory of them (e.g. .graphsight/); "
26
- "omit to open the import page")
27
- parser.add_argument("--port", type=int, default=4630, help="port to serve on (default 4630)")
28
- parser.add_argument("--no-browser", action="store_true", help="don't open the browser")
29
- args = parser.parse_args(argv)
30
-
31
- trace_path: Optional[Path] = None
32
- history_dir: Optional[Path] = None
33
- if args.trace is not None:
34
- target = args.trace.resolve()
35
- if target.is_dir():
36
- history_dir = target
37
- elif target.is_file():
38
- trace_path = target
39
- else:
40
- parser.error(f"not found: {target}")
41
-
42
- server = make_server(args.port, trace_path=trace_path, history_dir=history_dir)
43
- url = f"http://127.0.0.1:{args.port}/memory/import"
44
- if trace_path is not None:
45
- url += f"?src={TRACE_ROUTE}"
46
- elif history_dir is not None:
47
- url += f"?runs={RUNS_ROUTE}"
48
-
49
- print(f"graphsight serving at {url}")
50
- if trace_path is not None:
51
- print(f"trace: {trace_path}")
52
- if history_dir is not None:
53
- print(f"history: {history_dir}")
54
- print("Ctrl+C to stop")
55
- if not args.no_browser:
56
- webbrowser.open(url)
57
- try:
58
- server.serve_forever()
59
- except KeyboardInterrupt:
60
- print("\nbye")
61
- finally:
62
- server.server_close()
63
-
64
-
65
- if __name__ == "__main__":
66
- main()
1
+ """graphsight CLI — open a trace (or a whole run history) in the bundled UI."""
2
+ from __future__ import annotations
3
+
4
+ import argparse
5
+ import sys
6
+ import webbrowser
7
+ from pathlib import Path
8
+ from typing import Optional
9
+
10
+ from .server import RUNS_ROUTE, TRACE_ROUTE, make_server
11
+
12
+
13
+ def main(argv: Optional[list[str]] = None) -> None:
14
+ for stream in (sys.stdout, sys.stderr):
15
+ try:
16
+ stream.reconfigure(encoding="utf-8") # type: ignore[union-attr]
17
+ except (AttributeError, OSError):
18
+ pass
19
+
20
+ parser = argparse.ArgumentParser(
21
+ prog="graphsight",
22
+ description="Open a trace_state.json — or a history directory like .graphsight/ — in your browser.",
23
+ )
24
+ parser.add_argument("trace", nargs="?", type=Path,
25
+ help="a trace_state.json, or a directory of them (e.g. .graphsight/); "
26
+ "omit to open the import page")
27
+ parser.add_argument("--port", type=int, default=4630, help="port to serve on (default 4630)")
28
+ parser.add_argument("--no-browser", action="store_true", help="don't open the browser")
29
+ args = parser.parse_args(argv)
30
+
31
+ trace_path: Optional[Path] = None
32
+ history_dir: Optional[Path] = None
33
+ if args.trace is not None:
34
+ target = args.trace.resolve()
35
+ if target.is_dir():
36
+ history_dir = target
37
+ elif target.is_file():
38
+ trace_path = target
39
+ else:
40
+ parser.error(f"not found: {target}")
41
+
42
+ server = make_server(args.port, trace_path=trace_path, history_dir=history_dir)
43
+ url = f"http://127.0.0.1:{args.port}/memory/import"
44
+ if trace_path is not None:
45
+ url += f"?src={TRACE_ROUTE}"
46
+ elif history_dir is not None:
47
+ url += f"?runs={RUNS_ROUTE}"
48
+
49
+ print(f"graphsight serving at {url}")
50
+ if trace_path is not None:
51
+ print(f"trace: {trace_path}")
52
+ if history_dir is not None:
53
+ print(f"history: {history_dir}")
54
+ print("Ctrl+C to stop")
55
+ if not args.no_browser:
56
+ webbrowser.open(url)
57
+ try:
58
+ server.serve_forever()
59
+ except KeyboardInterrupt:
60
+ print("\nbye")
61
+ finally:
62
+ server.server_close()
63
+
64
+
65
+ if __name__ == "__main__":
66
+ main()