@nano-step/nano-brain 2026.6.2602 → 2026.6.2604
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.
- package/README.md +76 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ nano-brain is the missing memory layer for AI coding agents. It's:
|
|
|
35
35
|
|
|
36
36
|
- **Self-hosted** — Your data stays on your server. No cloud dependency.
|
|
37
37
|
- **Works everywhere** — OpenCode, Claude Code, Cursor, any MCP client.
|
|
38
|
-
- **Actually useful** — Not a toy demo. Production-ready with
|
|
38
|
+
- **Actually useful** — Not a toy demo. Production-ready with 16 MCP tools, hybrid search, code intelligence, and agent-oriented benchmarks.
|
|
39
39
|
- **Built for developers** — Go binary, PostgreSQL, zero magic. You can read the code.
|
|
40
40
|
- **Beating competitors** — P@5 of 80% vs LlamaIndex's 55% and Qdrant's 27% on real-world queries.
|
|
41
41
|
|
|
@@ -50,7 +50,7 @@ nano-brain solves **session amnesia** — the problem where AI agents forget eve
|
|
|
50
50
|
It automatically:
|
|
51
51
|
- **Ingests** AI sessions, notes, and codebase files
|
|
52
52
|
- **Indexes** everything with hybrid search (BM25 + pgvector)
|
|
53
|
-
- **Serves** memories via
|
|
53
|
+
- **Serves** memories via 16 MCP tools and REST API
|
|
54
54
|
|
|
55
55
|
Built in Go with PostgreSQL. Single static binary. Zero CGO dependencies.
|
|
56
56
|
|
|
@@ -124,24 +124,26 @@ graph LR
|
|
|
124
124
|
|
|
125
125
|
Auto-ingest from OpenCode and Claude Code sessions. Map-reduce LLM summarization. Incremental harvest with dedup.
|
|
126
126
|
|
|
127
|
-
###
|
|
127
|
+
### 16 MCP Tools
|
|
128
128
|
|
|
129
129
|
| Tool | Description |
|
|
130
130
|
|------|-------------|
|
|
131
|
-
| `memory_query` | Hybrid search
|
|
132
|
-
| `memory_search` | BM25 keyword search |
|
|
133
|
-
| `memory_vsearch` | Vector similarity
|
|
134
|
-
| `memory_get` | Get document by path |
|
|
131
|
+
| `memory_query` | Hybrid search — default first tool for broad questions |
|
|
132
|
+
| `memory_search` | BM25 keyword search for exact text/errors |
|
|
133
|
+
| `memory_vsearch` | Vector similarity for fuzzy concepts |
|
|
134
|
+
| `memory_get` | Get document by path or ID |
|
|
135
135
|
| `memory_write` | Write/update document |
|
|
136
|
-
| `memory_graph` |
|
|
137
|
-
| `memory_trace` |
|
|
138
|
-
| `memory_impact` |
|
|
139
|
-
| `memory_symbols` | Symbol search |
|
|
140
|
-
| `memory_flow` |
|
|
136
|
+
| `memory_graph` | One-hop callers/callees/imports |
|
|
137
|
+
| `memory_trace` | Downstream call chain trace |
|
|
138
|
+
| `memory_impact` | Pre-change blast radius analysis |
|
|
139
|
+
| `memory_symbols` | Symbol search (functions, types, interfaces) |
|
|
140
|
+
| `memory_flow` | HTTP route execution flow |
|
|
141
|
+
| `memory_flowchart` | Function-level control-flow graph |
|
|
142
|
+
| `memory_workspaces_resolve` | Resolve path to workspace hash |
|
|
141
143
|
| `memory_tags` | List tags with counts |
|
|
142
|
-
| `memory_status` | Server
|
|
144
|
+
| `memory_status` | Server and queue health |
|
|
143
145
|
| `memory_update` | Trigger re-embedding |
|
|
144
|
-
| `memory_wake_up` |
|
|
146
|
+
| `memory_wake_up` | Session-start workspace briefing |
|
|
145
147
|
|
|
146
148
|
---
|
|
147
149
|
|
|
@@ -263,7 +265,7 @@ Before pushing, run `memory_impact` on changed files. Discover what else depends
|
|
|
263
265
|
|
|
264
266
|
## Performance
|
|
265
267
|
|
|
266
|
-
###
|
|
268
|
+
### Search Quality
|
|
267
269
|
|
|
268
270
|
| Metric | nano-brain | LlamaIndex | Qdrant/Mem0 |
|
|
269
271
|
|--------|------------|------------|-------------|
|
|
@@ -273,12 +275,69 @@ Before pushing, run `memory_impact` on changed files. Discover what else depends
|
|
|
273
275
|
|
|
274
276
|
Tested on 60 domain-specific queries across 3 workspaces (gaming, Go codebase, Rails app).
|
|
275
277
|
|
|
276
|
-
### Search Quality
|
|
277
|
-
|
|
278
278
|
- **BM25 OR fallback** — Retries with OR semantics when AND returns 0 results
|
|
279
279
|
- **Incoming edges symbol fallback** — Falls back to symbol name when target lookup fails
|
|
280
280
|
- **Workspace-specific queries** — Each project gets queries tailored to its domain
|
|
281
281
|
|
|
282
|
+
### Agent-Oriented Capability Benchmarks
|
|
283
|
+
|
|
284
|
+
nano-brain is built for agents. These benchmarks measure how well agents can **find relevant context for real-world domain tasks** using nano-brain's MCP tools — not just search quality in isolation.
|
|
285
|
+
|
|
286
|
+
Each benchmark runs a deterministic agent workflow:
|
|
287
|
+
1. **query_question** — natural-language domain question
|
|
288
|
+
2. **query_input** — optimized search query
|
|
289
|
+
3. **symbols_identifiers** — symbol lookup for known identifiers
|
|
290
|
+
|
|
291
|
+
This mimics how a real agent explores a codebase: broad understanding first, then targeted retrieval.
|
|
292
|
+
|
|
293
|
+
#### Scores
|
|
294
|
+
|
|
295
|
+
| Workspace | Domain | Overall | Multi-tool | Search-QA | Symbol-Lookup |
|
|
296
|
+
|-----------|--------|---------|------------|-----------|---------------|
|
|
297
|
+
| **nano-brain** | Go daemon | **1.000** | 1.000 | 1.000 | 1.000 |
|
|
298
|
+
| **TypeScript** | CS2 item trading | **0.885** | 1.000 | 0.817 | 1.000 |
|
|
299
|
+
| **Rails** | CS2 item trading | **0.795** | 1.000 | 0.726 | 0.667 |
|
|
300
|
+
|
|
301
|
+
**What this means:**
|
|
302
|
+
- **Multi-tool 1.000** — When agents combine search + symbols, they find every expected context item
|
|
303
|
+
- **Overall 0.885** — TypeScript workspace: agent finds 88.5% of expected domain artifacts
|
|
304
|
+
- **Fixed vs Agent** — Agent workflow improves recall by 15-40% over single-tool queries
|
|
305
|
+
|
|
306
|
+
#### How to Run
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
# TypeScript workspace (CS2 item trading domain)
|
|
310
|
+
NANO_BRAIN_URL=http://localhost:3100 \
|
|
311
|
+
NANO_BRAIN_WORKSPACE=<your-workspace-hash> \
|
|
312
|
+
go test -v -tags=capbench -run TestCapabilityBenchmark \
|
|
313
|
+
./benchmarks/typescript/capability/
|
|
314
|
+
|
|
315
|
+
# Rails workspace (CS2 item trading domain)
|
|
316
|
+
NANO_BRAIN_URL=http://localhost:3100 \
|
|
317
|
+
NANO_BRAIN_WORKSPACE=<your-workspace-hash> \
|
|
318
|
+
go test -v -tags=capbench -run TestCapabilityBenchmark \
|
|
319
|
+
./benchmarks/rails/capability/
|
|
320
|
+
|
|
321
|
+
# nano-brain itself (Go daemon)
|
|
322
|
+
NANO_BRAIN_URL=http://localhost:3100 \
|
|
323
|
+
NANO_BRAIN_WORKSPACE=nano-brain \
|
|
324
|
+
go test -v -tags=capbench -run TestCapabilityBenchmark \
|
|
325
|
+
./benchmarks/capability/
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
#### Task Categories
|
|
329
|
+
|
|
330
|
+
| Category | What It Tests | Tools Used |
|
|
331
|
+
|----------|---------------|------------|
|
|
332
|
+
| **search-qa** | Domain concept retrieval via search | `query_question`, `query_input` |
|
|
333
|
+
| **symbol-lookup** | Known identifier resolution | `query_input`, `symbols_identifiers` |
|
|
334
|
+
| **multi-tool** | Cross-tool workflow (search → symbols) | All three tools in sequence |
|
|
335
|
+
|
|
336
|
+
See individual benchmark READMEs for full task breakdowns:
|
|
337
|
+
- [`benchmarks/typescript/capability/README.md`](benchmarks/typescript/capability/README.md)
|
|
338
|
+
- [`benchmarks/rails/capability/README.md`](benchmarks/rails/capability/README.md)
|
|
339
|
+
- [`benchmarks/capability/README.md`](benchmarks/capability/README.md)
|
|
340
|
+
|
|
282
341
|
---
|
|
283
342
|
|
|
284
343
|
## Ruby / Rails Support
|