@nano-step/nano-brain 2026.5.265 → 2026.5.267

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 (2) hide show
  1. package/README.md +39 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -130,8 +130,46 @@ telemetry:
130
130
  logging:
131
131
  level: info
132
132
  file: "" # empty = stdout only
133
+
134
+ summarization:
135
+ enabled: false # set to true to generate LLM summaries of harvested sessions
136
+ provider_url: "" # OpenAI-compatible endpoint, e.g. https://ai-proxy.example.com/v1
137
+ api_key: "" # or set NANO_BRAIN_SUMMARIZE_API_KEY env var
138
+ model: "nano-brain" # model name passed to the provider
139
+ max_tokens: 4096 # max tokens per LLM completion
140
+ concurrency: 3 # parallel map-phase LLM calls
141
+ output_dir: "~/.nano-brain/summaries" # directory for .md summary files
142
+ ```
143
+
144
+ ### Session Summarization
145
+
146
+ When `summarization.enabled: true`, nano-brain automatically generates structured markdown summaries of each harvested session using an OpenAI-compatible LLM provider. Summaries are:
147
+
148
+ - Written as `.md` files to `output_dir` (`{source}_{title-slug}_{YYYY-MM-DD}.md`)
149
+ - Stored in the vector DB under collection `session-summary` for semantic search
150
+ - Idempotent — unchanged sessions are skipped; re-harvested sessions overwrite old summaries
151
+
152
+ **Quick setup with ai-proxy:**
153
+
154
+ ```yaml
155
+ summarization:
156
+ enabled: true
157
+ provider_url: "https://ai-proxy.example.com/v1"
158
+ api_key: "" # set NANO_BRAIN_SUMMARIZE_API_KEY instead
159
+ model: "claude-sonnet-4-5"
160
+ max_tokens: 4096
161
+ concurrency: 3
162
+ output_dir: "~/.nano-brain/summaries"
133
163
  ```
134
164
 
165
+ Or via environment variable:
166
+
167
+ ```bash
168
+ export NANO_BRAIN_SUMMARIZE_API_KEY="sk-..."
169
+ ```
170
+
171
+ Large sessions (100K+ tokens) are handled via map-reduce chunking — no session is too large.
172
+
135
173
  ### Environment Variables
136
174
 
137
175
  | Variable | Description |
@@ -139,6 +177,7 @@ logging:
139
177
  | `DATABASE_URL` | PostgreSQL connection string |
140
178
  | `VOYAGE_API_KEY` | Voyage AI API key |
141
179
  | `OPENCODE_STORAGE_DIR` | OpenCode session directory |
180
+ | `NANO_BRAIN_SUMMARIZE_API_KEY` | API key for the summarization LLM provider |
142
181
  | `NANO_BRAIN_*` | Override any config (e.g., `NANO_BRAIN_SERVER_PORT=3100`) |
143
182
 
144
183
  ## REST API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nano-step/nano-brain",
3
- "version": "2026.5.265",
3
+ "version": "2026.5.267",
4
4
  "description": "Persistent memory and code intelligence for AI coding agents",
5
5
  "bin": {
6
6
  "nano-brain": "npm/run.js"