https://github.com/daedalus/convo-tools
Build knowledge graphs from ChatGPT conversation exports
https://github.com/daedalus/convo-tools
chatgpt graph-analysis knowledge-graph nlp python
Last synced: about 8 hours ago
JSON representation
Build knowledge graphs from ChatGPT conversation exports
- Host: GitHub
- URL: https://github.com/daedalus/convo-tools
- Owner: daedalus
- License: mit
- Created: 2026-06-09T18:57:25.000Z (26 days ago)
- Default Branch: master
- Last Pushed: 2026-06-17T15:43:12.000Z (18 days ago)
- Last Synced: 2026-06-17T16:11:39.852Z (18 days ago)
- Topics: chatgpt, graph-analysis, knowledge-graph, nlp, python
- Language: Python
- Size: 365 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# convo-tools
Build knowledge graphs from ChatGPT conversation exports.
[](https://pypi.org/project/convo-tools/)
## Install
```bash
pip install convo-tools
```
## Usage
```python
from convo_tools import build_graph, extract_messages
# Extract messages from a ChatGPT conversation JSON
with open("conversation.json") as f:
conversation = json.load(f)
messages = extract_messages(conversation)
# Build knowledge graph
graph = build_graph(messages)
print(f"Nodes: {len(graph['nodes'])}, Edges: {sum(len(v) for v in graph.values() if isinstance(v, (set, list)))}")
```
## CLI
```bash
# Extract JSON conversations → deduped pickle
convo-tools -m extract /path/to/conversations/ messages.pkl
# Build knowledge graph from pickle
convo-tools -m graph messages.pkl
# Full pipeline
convo-tools -m full /path/to/conversations/ messages.pkl
```
## Development
```bash
git clone https://github.com/daedalus/convo-tools.git
cd convo-tools
pip install -e ".[test]"
pytest
```