@nano-step/nano-brain 2026.6.2603 → 2026.6.2605
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 +99 -25
- 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,21 +265,93 @@ Before pushing, run `memory_impact` on changed files. Discover what else depends
|
|
|
263
265
|
|
|
264
266
|
## Performance
|
|
265
267
|
|
|
266
|
-
###
|
|
268
|
+
### Search Quality vs Competitors
|
|
267
269
|
|
|
268
|
-
| Metric | nano-brain | LlamaIndex | Qdrant/Mem0 |
|
|
269
|
-
|
|
270
|
-
| P@5 | **80%** | 55% | 27% |
|
|
271
|
-
| MRR | **
|
|
272
|
-
| Latency | 42ms | — | — |
|
|
270
|
+
| Metric | nano-brain | LlamaIndex | Qdrant/Mem0 | Cognee | GraphRAG | Zep |
|
|
271
|
+
|--------|------------|------------|-------------|--------|----------|-----|
|
|
272
|
+
| P@5 | **80%** | 55% | 27% | — | — | — |
|
|
273
|
+
| MRR | **95%** | — | — | — | — | — |
|
|
274
|
+
| Latency | **42ms** | — | — | — | — | — |
|
|
275
|
+
| Code Intelligence | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
276
|
+
| Symbol Graph | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
277
|
+
| Impact Analysis | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
278
|
+
| Flow Diagrams | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
273
279
|
|
|
274
|
-
Tested on 60 domain-specific queries across 3 workspaces
|
|
280
|
+
Tested on 60 domain-specific queries across 3 workspaces. nano-brain is the **only** solution with code intelligence — competitors focus on conversation memory and document retrieval.
|
|
275
281
|
|
|
276
|
-
###
|
|
282
|
+
### Competitive Landscape
|
|
277
283
|
|
|
278
|
-
|
|
279
|
-
- **
|
|
280
|
-
- **
|
|
284
|
+
**What competitors offer:**
|
|
285
|
+
- **Mem0 / Zep** — Conversation memory, temporal ranking, chat history recall
|
|
286
|
+
- **Cognee / GraphRAG** — Document-level knowledge graphs, multi-hop reasoning
|
|
287
|
+
- **LlamaIndex** — Flexible RAG pipelines, document retrieval
|
|
288
|
+
|
|
289
|
+
**What nano-brain adds:**
|
|
290
|
+
- **Code intelligence** — Symbol graphs, call chains, impact analysis, flow diagrams
|
|
291
|
+
- **Agent-oriented benchmarks** — Measures how well agents find context for domain tasks
|
|
292
|
+
- **Hybrid search** — BM25 + pgvector + RRF fusion + recency decay
|
|
293
|
+
|
|
294
|
+
Competitors optimize for conversation recall. nano-brain optimizes for **agent comprehension** — helping agents understand codebases, not just retrieve documents.
|
|
295
|
+
|
|
296
|
+
### Agent-Oriented Capability Benchmarks
|
|
297
|
+
|
|
298
|
+
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.
|
|
299
|
+
|
|
300
|
+
Each benchmark runs a deterministic agent workflow:
|
|
301
|
+
1. **query_question** — natural-language domain question
|
|
302
|
+
2. **query_input** — optimized search query
|
|
303
|
+
3. **symbols_identifiers** — symbol lookup for known identifiers
|
|
304
|
+
|
|
305
|
+
This mimics how a real agent explores a codebase: broad understanding first, then targeted retrieval.
|
|
306
|
+
|
|
307
|
+
#### Scores
|
|
308
|
+
|
|
309
|
+
| Workspace | Domain | Overall | Multi-tool | Search-QA | Symbol-Lookup |
|
|
310
|
+
|-----------|--------|---------|------------|-----------|---------------|
|
|
311
|
+
| **nano-brain** | Go daemon | **1.000** | 1.000 | 1.000 | 1.000 |
|
|
312
|
+
| **TypeScript** | CS2 item trading | **0.885** | 1.000 | 0.817 | 1.000 |
|
|
313
|
+
| **Rails** | CS2 item trading | **0.795** | 1.000 | 0.726 | 0.667 |
|
|
314
|
+
|
|
315
|
+
**What this means:**
|
|
316
|
+
- **Multi-tool 1.000** — When agents combine search + symbols, they find every expected context item
|
|
317
|
+
- **Overall 0.885** — TypeScript workspace: agent finds 88.5% of expected domain artifacts
|
|
318
|
+
- **Fixed vs Agent** — Agent workflow improves recall by 15-40% over single-tool queries
|
|
319
|
+
- **Unique capability** — No competitor offers agent-oriented benchmarks or code intelligence
|
|
320
|
+
|
|
321
|
+
#### How to Run
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
# TypeScript workspace (CS2 item trading domain)
|
|
325
|
+
NANO_BRAIN_URL=http://localhost:3100 \
|
|
326
|
+
NANO_BRAIN_WORKSPACE=<your-workspace-hash> \
|
|
327
|
+
go test -v -tags=capbench -run TestCapabilityBenchmark \
|
|
328
|
+
./benchmarks/typescript/capability/
|
|
329
|
+
|
|
330
|
+
# Rails workspace (CS2 item trading domain)
|
|
331
|
+
NANO_BRAIN_URL=http://localhost:3100 \
|
|
332
|
+
NANO_BRAIN_WORKSPACE=<your-workspace-hash> \
|
|
333
|
+
go test -v -tags=capbench -run TestCapabilityBenchmark \
|
|
334
|
+
./benchmarks/rails/capability/
|
|
335
|
+
|
|
336
|
+
# nano-brain itself (Go daemon)
|
|
337
|
+
NANO_BRAIN_URL=http://localhost:3100 \
|
|
338
|
+
NANO_BRAIN_WORKSPACE=nano-brain \
|
|
339
|
+
go test -v -tags=capbench -run TestCapabilityBenchmark \
|
|
340
|
+
./benchmarks/capability/
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
#### Task Categories
|
|
344
|
+
|
|
345
|
+
| Category | What It Tests | Tools Used |
|
|
346
|
+
|----------|---------------|------------|
|
|
347
|
+
| **search-qa** | Domain concept retrieval via search | `query_question`, `query_input` |
|
|
348
|
+
| **symbol-lookup** | Known identifier resolution | `query_input`, `symbols_identifiers` |
|
|
349
|
+
| **multi-tool** | Cross-tool workflow (search → symbols) | All three tools in sequence |
|
|
350
|
+
|
|
351
|
+
See individual benchmark READMEs for full task breakdowns:
|
|
352
|
+
- [`benchmarks/typescript/capability/README.md`](benchmarks/typescript/capability/README.md)
|
|
353
|
+
- [`benchmarks/rails/capability/README.md`](benchmarks/rails/capability/README.md)
|
|
354
|
+
- [`benchmarks/capability/README.md`](benchmarks/capability/README.md)
|
|
281
355
|
|
|
282
356
|
---
|
|
283
357
|
|