synapt 0.6.2__tar.gz → 0.7.2__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.
- {synapt-0.6.2/src/synapt.egg-info → synapt-0.7.2}/PKG-INFO +91 -20
- {synapt-0.6.2 → synapt-0.7.2}/README.md +90 -19
- {synapt-0.6.2 → synapt-0.7.2}/pyproject.toml +1 -1
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/__init__.py +1 -1
- synapt-0.7.2/src/synapt/_models/vllm_client.py +61 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/_model_router.py +21 -1
- synapt-0.7.2/src/synapt/recall/channel.py +1520 -0
- synapt-0.7.2/src/synapt/recall/channel_chat.py +380 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/cli.py +292 -14
- synapt-0.7.2/src/synapt/recall/codex.py +240 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/consolidate.py +100 -6
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/core.py +264 -57
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/journal.py +14 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/server.py +447 -28
- synapt-0.7.2/src/synapt/recall/sharded_db.py +176 -0
- synapt-0.7.2/src/synapt/recall/sharding.py +281 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/storage.py +166 -32
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/working_memory.py +56 -3
- {synapt-0.6.2 → synapt-0.7.2/src/synapt.egg-info}/PKG-INFO +91 -20
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt.egg-info/SOURCES.txt +6 -0
- {synapt-0.6.2 → synapt-0.7.2}/LICENSE +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/setup.cfg +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/__init__.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/_utils.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/api_vision.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/base.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/convert.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/llamacpp_client.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/mlx_client.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/ollama_client.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/onnx_client.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/_models/transformers_client.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/cli.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/plugins.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/__init__.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/_filelock.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/_llm_util.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/_mlx.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/archive.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/bm25.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/chatgpt.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/clustering.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/config.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/content_profile.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/embeddings.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/enrich.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/hybrid.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/knowledge.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/live.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/promotion.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/reminders.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/reranker.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/scrub.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/tagging.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/recall/timeline.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/server.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/x/__init__.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt/x/server.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt.egg-info/dependency_links.txt +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt.egg-info/entry_points.txt +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt.egg-info/requires.txt +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/src/synapt.egg-info/top_level.txt +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/tests/test_plugins.py +0 -0
- {synapt-0.6.2 → synapt-0.7.2}/tests/test_server.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: synapt
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Persistent conversational memory for AI coding assistants
|
|
5
5
|
Author: Layne Penney
|
|
6
6
|
License-Expression: MIT
|
|
@@ -58,9 +58,17 @@ Dynamic: license-file
|
|
|
58
58
|
remembers what you worked on, decisions you made, and patterns you established.
|
|
59
59
|
</p>
|
|
60
60
|
|
|
61
|
+
<p align="center">
|
|
62
|
+
<a href="https://synapt.dev">Website</a> ·
|
|
63
|
+
<a href="https://synapt.dev/blog/">Blog</a> ·
|
|
64
|
+
<a href="https://x.com/synapt_dev">@synapt_dev</a>
|
|
65
|
+
</p>
|
|
66
|
+
|
|
61
67
|
---
|
|
62
68
|
|
|
63
|
-
|
|
69
|
+
**#2 on LOCOMO** (76.04%, within 1.5pp of Engram) and **+14.51pp over Mem0** on CodeMemo (90.51% vs 76.0%). Local-first — runs on a laptop, no cloud dependency for memory.
|
|
70
|
+
|
|
71
|
+
Works as an [MCP server](https://modelcontextprotocol.io/) for Claude Code, Codex CLI, OpenCode, and other MCP-compatible tools.
|
|
64
72
|
|
|
65
73
|
## Install
|
|
66
74
|
|
|
@@ -100,20 +108,57 @@ Add to your Claude Code config (`~/.claude/mcp.json`):
|
|
|
100
108
|
}
|
|
101
109
|
```
|
|
102
110
|
|
|
103
|
-
This gives your AI assistant
|
|
111
|
+
This gives your AI assistant tools for searching past sessions, managing a journal, setting reminders, and building a durable knowledge base.
|
|
112
|
+
|
|
113
|
+
### Codex CLI
|
|
114
|
+
|
|
115
|
+
Add to `~/.codex/config.toml`:
|
|
116
|
+
|
|
117
|
+
```toml
|
|
118
|
+
[mcp_servers.synapt]
|
|
119
|
+
command = "synapt"
|
|
120
|
+
args = ["server"]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Synapt automatically discovers and indexes Codex transcripts from `~/.codex/sessions/`.
|
|
124
|
+
|
|
125
|
+
### OpenCode
|
|
126
|
+
|
|
127
|
+
Add to `~/.config/opencode/opencode.json`:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"mcp": {
|
|
132
|
+
"synapt": {
|
|
133
|
+
"type": "local",
|
|
134
|
+
"command": ["synapt", "server"],
|
|
135
|
+
"enabled": true
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
104
140
|
|
|
105
141
|
## Features
|
|
106
142
|
|
|
107
|
-
- **
|
|
143
|
+
- **FTS5 + embedding hybrid search** — BM25 full-text search fused with semantic embeddings via [Reciprocal Rank Fusion](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf), plus cross-encoder reranking. Surfaces results that keyword search alone would miss.
|
|
144
|
+
- **Sub-chunk splitting** — Splits transcripts at tool-use boundaries so each chunk captures a coherent action (code edit, test run, error trace) rather than arbitrary fixed-length windows.
|
|
145
|
+
- **Cross-session link expansion** — When retrieving a chunk, automatically surfaces related chunks from other sessions, enabling multi-hop reasoning across your project history.
|
|
146
|
+
- **Content-aware adaptive filtering** — Classifies conversations as code/personal/mixed and adjusts consolidation filters and retrieval parameters per content type.
|
|
108
147
|
- **Query intent routing** — Classifies queries as factual, temporal, debug, decision, aggregation, exploratory, or procedural and adjusts search parameters (recency decay, knowledge boost, embedding weight) automatically.
|
|
148
|
+
- **Enrichment + consolidation + knowledge graph** — Optional LLM-powered session summaries, durable knowledge extraction, and a knowledge graph that connects facts across sessions.
|
|
109
149
|
- **Knowledge embeddings** — Durable knowledge nodes get 384-dim embeddings for semantic retrieval, built at index time.
|
|
110
150
|
- **Topic clustering** — Jaccard token-overlap clustering groups related chunks across sessions.
|
|
111
151
|
- **Session journal** — Rich entries with focus, decisions, done items, and next steps.
|
|
112
152
|
- **Reminders** — Cross-session sticky reminders that surface at session start.
|
|
113
153
|
- **Timeline** — Chronological work arcs showing project narrative.
|
|
114
154
|
- **Working memory** — Frequency-boosted search results for active topics.
|
|
115
|
-
- **
|
|
116
|
-
- **
|
|
155
|
+
- **Local-first** — Runs entirely on your laptop. Indexing, embedding, and retrieval are all local — no cloud dependency for memory.
|
|
156
|
+
- **MCP server** — 16 tools for Claude Code integration: search, journal, channels, reminders, knowledge, and more.
|
|
157
|
+
- **Agent channels** — Cross-session communication via append-only channels. Agents can post messages, send directives, and coordinate work across worktrees.
|
|
158
|
+
- **Directive notifications** — Targeted directives are automatically surfaced in MCP tool responses. Broadcast directives (`to="*"`) reach all agents.
|
|
159
|
+
- **Contradiction flagging** — Flag conflicting information from free text or search results. Auto-matches existing knowledge nodes via FTS, creates new nodes on resolution.
|
|
160
|
+
- **Codex CLI support** — Indexes Codex transcripts from `~/.codex/sessions/` automatically. Cross-editor memory between Claude Code and Codex.
|
|
161
|
+
- **Agent-aware consolidation** — Journal entries capture agent identity (griptree, agent_id). Consolidation detects concurrent sessions and annotates them for the LLM.
|
|
117
162
|
- **Plugin system** — Extend with additional tools via entry-point discovery.
|
|
118
163
|
|
|
119
164
|
## MCP tools
|
|
@@ -132,7 +177,10 @@ This gives your AI assistant 13 tools for searching past sessions, managing a jo
|
|
|
132
177
|
| `recall_remind` | Set cross-session reminders |
|
|
133
178
|
| `recall_enrich` | LLM-powered chunk summarization |
|
|
134
179
|
| `recall_consolidate` | Extract knowledge from journals |
|
|
135
|
-
| `recall_contradict` | Flag contradictions in knowledge |
|
|
180
|
+
| `recall_contradict` | Flag contradictions in knowledge (supports free-text claims) |
|
|
181
|
+
| `recall_channel` | Cross-session agent communication (post, read, directives, who) |
|
|
182
|
+
| `recall_quick` | Fast knowledge check (no transcript chunks) |
|
|
183
|
+
| `recall_reload` | Restart MCP server to pick up code changes |
|
|
136
184
|
|
|
137
185
|
## CLI reference
|
|
138
186
|
|
|
@@ -148,23 +196,39 @@ synapt server # Start MCP server
|
|
|
148
196
|
|
|
149
197
|
## Benchmarks
|
|
150
198
|
|
|
151
|
-
|
|
199
|
+
### LOCOMO — Conversational Memory
|
|
200
|
+
|
|
201
|
+
Evaluated on [LOCOMO](https://snap-research.github.io/locomo/) (Long Conversational Memory) — 10 conversations, 1540 QA pairs — following [Mem0's methodology](https://arxiv.org/abs/2504.19413) (J-score via LLM-as-Judge). Competitor data from the [Mem0 paper](https://arxiv.org/abs/2504.19413) and [Memobase benchmark](https://github.com/memodb-io/memobase/blob/main/docs/experiments/locomo-benchmark/README.md).
|
|
152
202
|
|
|
153
|
-
|
|
154
|
-
|--------|-----------|----------|------------|-------------|-------------|-------|
|
|
155
|
-
| **synapt** | **70.21** | **61.68** | **62.50** | **80.14** | **73.38** | **local 3B model** |
|
|
156
|
-
| Full-Context | — | — | — | — | 72.90 | upper bound |
|
|
157
|
-
| Mem0+Graph | 47.19 | 58.13 | 65.71 | 75.71 | 68.44 | cloud GPT-4 |
|
|
158
|
-
| Mem0 | 51.15 | 55.51 | 67.13 | 72.93 | 66.88 | cloud GPT-4 |
|
|
159
|
-
| Zep | 41.35 | 49.31 | 61.70 | 76.60 | 65.99 | cloud service |
|
|
160
|
-
| LangMem | 47.92 | 23.43 | 62.23 | 71.12 | 58.10 | cloud |
|
|
161
|
-
| OpenAI Memory | 42.92 | 21.71 | 63.79 | 62.29 | 52.90 | cloud |
|
|
203
|
+
All systems use gpt-4o-mini as shared backbone (generation + judge) for fair comparison. Competitor data from the [Engram paper](https://arxiv.org/abs/2511.12960) (3 runs, stddev reported) and [Mem0 paper](https://arxiv.org/abs/2504.19413).
|
|
162
204
|
|
|
163
|
-
|
|
205
|
+
| System | **Overall** | Multi-Hop | Temporal | Infra |
|
|
206
|
+
|--------|-------------|-----------|----------|-------|
|
|
207
|
+
| Engram | 77.55 ± 0.13 | — | — | cloud (BM25+ColBERT+KG) |
|
|
208
|
+
| **synapt v0.6.1 (8B)** | **76.04** | **70.92** | 66.36 | Ministral 8B cloud enrich |
|
|
209
|
+
| Memobase | 75.78 | 46.88 | **85.05** | cloud |
|
|
210
|
+
| **synapt v0.6.1 (3B)** | **73.38** | 70.21 | 61.68 | **local 3B on M2 Air** |
|
|
211
|
+
| memOS | 72.99 ± 0.14 | — | — | cloud |
|
|
212
|
+
| Full-Context | 72.60 ± 0.07 | — | — | upper bound |
|
|
213
|
+
| Mem0 | 64.73 ± 0.17 | 51.15 | 55.51 | cloud GPT-4 |
|
|
214
|
+
| Zep | 42.29 ± 0.18 | — | — | cloud |
|
|
164
215
|
|
|
165
|
-
|
|
216
|
+
Synapt is **#2 on LOCOMO** at 76.04% — 1.51pp behind Engram (within their stddev of ±0.13) and ahead of Memobase (75.78%), the Full-Context upper bound (72.60%), and all other systems. The 3B local configuration (73.38%) beats the Full-Context upper bound using only a Ministral 3B model running on an M2 MacBook Air.
|
|
166
217
|
|
|
167
|
-
**Best-in-class
|
|
218
|
+
**Best-in-class multi-hop**: 70.92% — highest of any system tested, including those using GPT-4 for memory extraction. Engram is cloud-only; synapt runs entirely on a laptop.
|
|
219
|
+
|
|
220
|
+
> **What is Full-Context?** The entire conversation history is passed directly to the LLM as context — no retrieval, no memory extraction. It represents the theoretical upper bound: the LLM has access to every fact. Synapt beats it because focused retrieval surfaces only what's relevant, reducing noise for the answer model.
|
|
221
|
+
|
|
222
|
+
### CodeMemo — Coding Memory
|
|
223
|
+
|
|
224
|
+
First benchmark specifically testing coding session memory — 158 questions across 3 projects, 6 categories. Same gpt-4o-mini judge and answer model for both systems.
|
|
225
|
+
|
|
226
|
+
| System | Factual | Debug | Architecture | Temporal | Convention | Cross-Session | **Overall** |
|
|
227
|
+
|--------|---------|-------|-------------|----------|------------|---------------|-------------|
|
|
228
|
+
| **synapt v0.6.2** | **97.14** | **100.0** | 92.86 | **90.91** | **80.0** | **86.36** | **90.51** |
|
|
229
|
+
| Mem0 (OSS) | 72.73 | 77.78 | **100.0** | 87.50 | 42.86 | 71.43 | 76.0 |
|
|
230
|
+
|
|
231
|
+
Synapt leads by **+14.51pp overall**. The biggest gaps are in convention (+37pp), factual (+24pp), and debug (+22pp) — categories that depend on raw evidence preservation. Synapt runs entirely locally; Mem0 requires OpenAI API calls for memory extraction, embedding, and search.
|
|
168
232
|
|
|
169
233
|
## How search works
|
|
170
234
|
|
|
@@ -235,6 +299,13 @@ pip install -e ".[test]"
|
|
|
235
299
|
pytest tests/ -v
|
|
236
300
|
```
|
|
237
301
|
|
|
302
|
+
## Links
|
|
303
|
+
|
|
304
|
+
- [synapt.dev](https://synapt.dev) — Website
|
|
305
|
+
- [synapt.dev/blog](https://synapt.dev/blog/) — Blog
|
|
306
|
+
- [@synapt_dev](https://x.com/synapt_dev) — X / Twitter
|
|
307
|
+
- [PyPI](https://pypi.org/project/synapt/) — `pip install synapt`
|
|
308
|
+
|
|
238
309
|
## License
|
|
239
310
|
|
|
240
311
|
MIT
|
|
@@ -14,9 +14,17 @@
|
|
|
14
14
|
remembers what you worked on, decisions you made, and patterns you established.
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://synapt.dev">Website</a> ·
|
|
19
|
+
<a href="https://synapt.dev/blog/">Blog</a> ·
|
|
20
|
+
<a href="https://x.com/synapt_dev">@synapt_dev</a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
17
23
|
---
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
**#2 on LOCOMO** (76.04%, within 1.5pp of Engram) and **+14.51pp over Mem0** on CodeMemo (90.51% vs 76.0%). Local-first — runs on a laptop, no cloud dependency for memory.
|
|
26
|
+
|
|
27
|
+
Works as an [MCP server](https://modelcontextprotocol.io/) for Claude Code, Codex CLI, OpenCode, and other MCP-compatible tools.
|
|
20
28
|
|
|
21
29
|
## Install
|
|
22
30
|
|
|
@@ -56,20 +64,57 @@ Add to your Claude Code config (`~/.claude/mcp.json`):
|
|
|
56
64
|
}
|
|
57
65
|
```
|
|
58
66
|
|
|
59
|
-
This gives your AI assistant
|
|
67
|
+
This gives your AI assistant tools for searching past sessions, managing a journal, setting reminders, and building a durable knowledge base.
|
|
68
|
+
|
|
69
|
+
### Codex CLI
|
|
70
|
+
|
|
71
|
+
Add to `~/.codex/config.toml`:
|
|
72
|
+
|
|
73
|
+
```toml
|
|
74
|
+
[mcp_servers.synapt]
|
|
75
|
+
command = "synapt"
|
|
76
|
+
args = ["server"]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Synapt automatically discovers and indexes Codex transcripts from `~/.codex/sessions/`.
|
|
80
|
+
|
|
81
|
+
### OpenCode
|
|
82
|
+
|
|
83
|
+
Add to `~/.config/opencode/opencode.json`:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"mcp": {
|
|
88
|
+
"synapt": {
|
|
89
|
+
"type": "local",
|
|
90
|
+
"command": ["synapt", "server"],
|
|
91
|
+
"enabled": true
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
60
96
|
|
|
61
97
|
## Features
|
|
62
98
|
|
|
63
|
-
- **
|
|
99
|
+
- **FTS5 + embedding hybrid search** — BM25 full-text search fused with semantic embeddings via [Reciprocal Rank Fusion](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf), plus cross-encoder reranking. Surfaces results that keyword search alone would miss.
|
|
100
|
+
- **Sub-chunk splitting** — Splits transcripts at tool-use boundaries so each chunk captures a coherent action (code edit, test run, error trace) rather than arbitrary fixed-length windows.
|
|
101
|
+
- **Cross-session link expansion** — When retrieving a chunk, automatically surfaces related chunks from other sessions, enabling multi-hop reasoning across your project history.
|
|
102
|
+
- **Content-aware adaptive filtering** — Classifies conversations as code/personal/mixed and adjusts consolidation filters and retrieval parameters per content type.
|
|
64
103
|
- **Query intent routing** — Classifies queries as factual, temporal, debug, decision, aggregation, exploratory, or procedural and adjusts search parameters (recency decay, knowledge boost, embedding weight) automatically.
|
|
104
|
+
- **Enrichment + consolidation + knowledge graph** — Optional LLM-powered session summaries, durable knowledge extraction, and a knowledge graph that connects facts across sessions.
|
|
65
105
|
- **Knowledge embeddings** — Durable knowledge nodes get 384-dim embeddings for semantic retrieval, built at index time.
|
|
66
106
|
- **Topic clustering** — Jaccard token-overlap clustering groups related chunks across sessions.
|
|
67
107
|
- **Session journal** — Rich entries with focus, decisions, done items, and next steps.
|
|
68
108
|
- **Reminders** — Cross-session sticky reminders that surface at session start.
|
|
69
109
|
- **Timeline** — Chronological work arcs showing project narrative.
|
|
70
110
|
- **Working memory** — Frequency-boosted search results for active topics.
|
|
71
|
-
- **
|
|
72
|
-
- **
|
|
111
|
+
- **Local-first** — Runs entirely on your laptop. Indexing, embedding, and retrieval are all local — no cloud dependency for memory.
|
|
112
|
+
- **MCP server** — 16 tools for Claude Code integration: search, journal, channels, reminders, knowledge, and more.
|
|
113
|
+
- **Agent channels** — Cross-session communication via append-only channels. Agents can post messages, send directives, and coordinate work across worktrees.
|
|
114
|
+
- **Directive notifications** — Targeted directives are automatically surfaced in MCP tool responses. Broadcast directives (`to="*"`) reach all agents.
|
|
115
|
+
- **Contradiction flagging** — Flag conflicting information from free text or search results. Auto-matches existing knowledge nodes via FTS, creates new nodes on resolution.
|
|
116
|
+
- **Codex CLI support** — Indexes Codex transcripts from `~/.codex/sessions/` automatically. Cross-editor memory between Claude Code and Codex.
|
|
117
|
+
- **Agent-aware consolidation** — Journal entries capture agent identity (griptree, agent_id). Consolidation detects concurrent sessions and annotates them for the LLM.
|
|
73
118
|
- **Plugin system** — Extend with additional tools via entry-point discovery.
|
|
74
119
|
|
|
75
120
|
## MCP tools
|
|
@@ -88,7 +133,10 @@ This gives your AI assistant 13 tools for searching past sessions, managing a jo
|
|
|
88
133
|
| `recall_remind` | Set cross-session reminders |
|
|
89
134
|
| `recall_enrich` | LLM-powered chunk summarization |
|
|
90
135
|
| `recall_consolidate` | Extract knowledge from journals |
|
|
91
|
-
| `recall_contradict` | Flag contradictions in knowledge |
|
|
136
|
+
| `recall_contradict` | Flag contradictions in knowledge (supports free-text claims) |
|
|
137
|
+
| `recall_channel` | Cross-session agent communication (post, read, directives, who) |
|
|
138
|
+
| `recall_quick` | Fast knowledge check (no transcript chunks) |
|
|
139
|
+
| `recall_reload` | Restart MCP server to pick up code changes |
|
|
92
140
|
|
|
93
141
|
## CLI reference
|
|
94
142
|
|
|
@@ -104,23 +152,39 @@ synapt server # Start MCP server
|
|
|
104
152
|
|
|
105
153
|
## Benchmarks
|
|
106
154
|
|
|
107
|
-
|
|
155
|
+
### LOCOMO — Conversational Memory
|
|
156
|
+
|
|
157
|
+
Evaluated on [LOCOMO](https://snap-research.github.io/locomo/) (Long Conversational Memory) — 10 conversations, 1540 QA pairs — following [Mem0's methodology](https://arxiv.org/abs/2504.19413) (J-score via LLM-as-Judge). Competitor data from the [Mem0 paper](https://arxiv.org/abs/2504.19413) and [Memobase benchmark](https://github.com/memodb-io/memobase/blob/main/docs/experiments/locomo-benchmark/README.md).
|
|
108
158
|
|
|
109
|
-
|
|
110
|
-
|--------|-----------|----------|------------|-------------|-------------|-------|
|
|
111
|
-
| **synapt** | **70.21** | **61.68** | **62.50** | **80.14** | **73.38** | **local 3B model** |
|
|
112
|
-
| Full-Context | — | — | — | — | 72.90 | upper bound |
|
|
113
|
-
| Mem0+Graph | 47.19 | 58.13 | 65.71 | 75.71 | 68.44 | cloud GPT-4 |
|
|
114
|
-
| Mem0 | 51.15 | 55.51 | 67.13 | 72.93 | 66.88 | cloud GPT-4 |
|
|
115
|
-
| Zep | 41.35 | 49.31 | 61.70 | 76.60 | 65.99 | cloud service |
|
|
116
|
-
| LangMem | 47.92 | 23.43 | 62.23 | 71.12 | 58.10 | cloud |
|
|
117
|
-
| OpenAI Memory | 42.92 | 21.71 | 63.79 | 62.29 | 52.90 | cloud |
|
|
159
|
+
All systems use gpt-4o-mini as shared backbone (generation + judge) for fair comparison. Competitor data from the [Engram paper](https://arxiv.org/abs/2511.12960) (3 runs, stddev reported) and [Mem0 paper](https://arxiv.org/abs/2504.19413).
|
|
118
160
|
|
|
119
|
-
|
|
161
|
+
| System | **Overall** | Multi-Hop | Temporal | Infra |
|
|
162
|
+
|--------|-------------|-----------|----------|-------|
|
|
163
|
+
| Engram | 77.55 ± 0.13 | — | — | cloud (BM25+ColBERT+KG) |
|
|
164
|
+
| **synapt v0.6.1 (8B)** | **76.04** | **70.92** | 66.36 | Ministral 8B cloud enrich |
|
|
165
|
+
| Memobase | 75.78 | 46.88 | **85.05** | cloud |
|
|
166
|
+
| **synapt v0.6.1 (3B)** | **73.38** | 70.21 | 61.68 | **local 3B on M2 Air** |
|
|
167
|
+
| memOS | 72.99 ± 0.14 | — | — | cloud |
|
|
168
|
+
| Full-Context | 72.60 ± 0.07 | — | — | upper bound |
|
|
169
|
+
| Mem0 | 64.73 ± 0.17 | 51.15 | 55.51 | cloud GPT-4 |
|
|
170
|
+
| Zep | 42.29 ± 0.18 | — | — | cloud |
|
|
120
171
|
|
|
121
|
-
|
|
172
|
+
Synapt is **#2 on LOCOMO** at 76.04% — 1.51pp behind Engram (within their stddev of ±0.13) and ahead of Memobase (75.78%), the Full-Context upper bound (72.60%), and all other systems. The 3B local configuration (73.38%) beats the Full-Context upper bound using only a Ministral 3B model running on an M2 MacBook Air.
|
|
122
173
|
|
|
123
|
-
**Best-in-class
|
|
174
|
+
**Best-in-class multi-hop**: 70.92% — highest of any system tested, including those using GPT-4 for memory extraction. Engram is cloud-only; synapt runs entirely on a laptop.
|
|
175
|
+
|
|
176
|
+
> **What is Full-Context?** The entire conversation history is passed directly to the LLM as context — no retrieval, no memory extraction. It represents the theoretical upper bound: the LLM has access to every fact. Synapt beats it because focused retrieval surfaces only what's relevant, reducing noise for the answer model.
|
|
177
|
+
|
|
178
|
+
### CodeMemo — Coding Memory
|
|
179
|
+
|
|
180
|
+
First benchmark specifically testing coding session memory — 158 questions across 3 projects, 6 categories. Same gpt-4o-mini judge and answer model for both systems.
|
|
181
|
+
|
|
182
|
+
| System | Factual | Debug | Architecture | Temporal | Convention | Cross-Session | **Overall** |
|
|
183
|
+
|--------|---------|-------|-------------|----------|------------|---------------|-------------|
|
|
184
|
+
| **synapt v0.6.2** | **97.14** | **100.0** | 92.86 | **90.91** | **80.0** | **86.36** | **90.51** |
|
|
185
|
+
| Mem0 (OSS) | 72.73 | 77.78 | **100.0** | 87.50 | 42.86 | 71.43 | 76.0 |
|
|
186
|
+
|
|
187
|
+
Synapt leads by **+14.51pp overall**. The biggest gaps are in convention (+37pp), factual (+24pp), and debug (+22pp) — categories that depend on raw evidence preservation. Synapt runs entirely locally; Mem0 requires OpenAI API calls for memory extraction, embedding, and search.
|
|
124
188
|
|
|
125
189
|
## How search works
|
|
126
190
|
|
|
@@ -191,6 +255,13 @@ pip install -e ".[test]"
|
|
|
191
255
|
pytest tests/ -v
|
|
192
256
|
```
|
|
193
257
|
|
|
258
|
+
## Links
|
|
259
|
+
|
|
260
|
+
- [synapt.dev](https://synapt.dev) — Website
|
|
261
|
+
- [synapt.dev/blog](https://synapt.dev/blog/) — Blog
|
|
262
|
+
- [@synapt_dev](https://x.com/synapt_dev) — X / Twitter
|
|
263
|
+
- [PyPI](https://pypi.org/project/synapt/) — `pip install synapt`
|
|
264
|
+
|
|
194
265
|
## License
|
|
195
266
|
|
|
196
267
|
MIT
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""vLLM inference client for decoder-only models.
|
|
2
|
+
|
|
3
|
+
Fast GPU inference for models like Ministral-8B using vLLM's
|
|
4
|
+
offline LLM engine. No server process needed.
|
|
5
|
+
|
|
6
|
+
Requires: pip install vllm
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import logging
|
|
12
|
+
from typing import List
|
|
13
|
+
|
|
14
|
+
from .base import Message, ModelClient
|
|
15
|
+
|
|
16
|
+
logger = logging.getLogger(__name__)
|
|
17
|
+
|
|
18
|
+
_ENGINE_CACHE: dict[str, object] = {}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class VLLMClient(ModelClient):
|
|
22
|
+
"""Decoder-only model client via vLLM offline inference."""
|
|
23
|
+
|
|
24
|
+
def __init__(self, max_tokens: int = 800, model_name: str | None = None):
|
|
25
|
+
self.max_tokens = max_tokens
|
|
26
|
+
self._model_name = model_name
|
|
27
|
+
|
|
28
|
+
def _get_engine(self, model: str):
|
|
29
|
+
if model in _ENGINE_CACHE:
|
|
30
|
+
return _ENGINE_CACHE[model]
|
|
31
|
+
|
|
32
|
+
from vllm import LLM
|
|
33
|
+
|
|
34
|
+
engine = LLM(model=model, max_model_len=4096, trust_remote_code=True)
|
|
35
|
+
_ENGINE_CACHE[model] = engine
|
|
36
|
+
return engine
|
|
37
|
+
|
|
38
|
+
def chat(
|
|
39
|
+
self,
|
|
40
|
+
model: str,
|
|
41
|
+
messages: List[Message],
|
|
42
|
+
temperature: float = 0.2,
|
|
43
|
+
**kwargs,
|
|
44
|
+
) -> str:
|
|
45
|
+
from vllm import SamplingParams
|
|
46
|
+
|
|
47
|
+
max_tokens = kwargs.get("max_tokens") or self.max_tokens
|
|
48
|
+
engine = self._get_engine(self._model_name or model)
|
|
49
|
+
|
|
50
|
+
# Use vLLM's chat API with the tokenizer's chat template
|
|
51
|
+
chat_messages = [{"role": m.role, "content": m.content} for m in messages]
|
|
52
|
+
|
|
53
|
+
params = SamplingParams(
|
|
54
|
+
temperature=temperature,
|
|
55
|
+
max_tokens=max_tokens,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
outputs = engine.chat(chat_messages, params)
|
|
59
|
+
if outputs and outputs[0].outputs:
|
|
60
|
+
return outputs[0].outputs[0].text.strip()
|
|
61
|
+
return ""
|
|
@@ -144,6 +144,8 @@ def get_client(
|
|
|
144
144
|
return _get_transformers_client(max_tokens)
|
|
145
145
|
elif override == "ollama":
|
|
146
146
|
return _get_ollama_client(max_tokens)
|
|
147
|
+
elif override == "vllm":
|
|
148
|
+
return _get_vllm_client(max_tokens)
|
|
147
149
|
elif override in _extra_backends:
|
|
148
150
|
key = (override, max_tokens)
|
|
149
151
|
cached = _client_cache.get(key, _NOT_FOUND)
|
|
@@ -255,7 +257,8 @@ def _get_ollama_client(max_tokens: int) -> object | None:
|
|
|
255
257
|
|
|
256
258
|
try:
|
|
257
259
|
from synapt._models.ollama_client import OllamaClient
|
|
258
|
-
client = OllamaClient(
|
|
260
|
+
client = OllamaClient()
|
|
261
|
+
client.max_tokens = max_tokens
|
|
259
262
|
_client_cache[key] = client
|
|
260
263
|
logger.debug("OllamaClient available for decoder-only inference")
|
|
261
264
|
return client
|
|
@@ -264,6 +267,23 @@ def _get_ollama_client(max_tokens: int) -> object | None:
|
|
|
264
267
|
return None
|
|
265
268
|
|
|
266
269
|
|
|
270
|
+
def _get_vllm_client(max_tokens: int) -> object | None:
|
|
271
|
+
"""Try to create a VLLMClient. Returns None if unavailable."""
|
|
272
|
+
key = ("vllm", max_tokens)
|
|
273
|
+
if key in _client_cache:
|
|
274
|
+
return _client_cache[key]
|
|
275
|
+
|
|
276
|
+
try:
|
|
277
|
+
from synapt._models.vllm_client import VLLMClient
|
|
278
|
+
client = VLLMClient(max_tokens=max_tokens)
|
|
279
|
+
_client_cache[key] = client
|
|
280
|
+
logger.debug("VLLMClient available for decoder-only inference")
|
|
281
|
+
return client
|
|
282
|
+
except ImportError:
|
|
283
|
+
logger.debug("VLLMClient not available (vllm not installed)")
|
|
284
|
+
return None
|
|
285
|
+
|
|
286
|
+
|
|
267
287
|
def _get_llamacpp_client(max_tokens: int) -> object | None:
|
|
268
288
|
"""Try to create a LlamaCppClient. Returns None if unavailable."""
|
|
269
289
|
key = ("llamacpp", max_tokens)
|