Write many memories
batch_writeStore many memory entries in one atomic call. Use this whenever you have 3 or more things to write — it is faster, atomic, and ensures nothing is lost if the session ends unexpectedly. Entries can go to one namespace (top-level path) or to different namespaces (a path on each item). Every item needs a namespace: there is no default, so pass a top-level path or a path on every item — batch_write({path: "/projects/", contents: [...]}) — and pass "/" explicitly to write to the root. Every namespace must exist first (call mkns). Returns a UUID per entry. Prefer this over multiple sequential write calls.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contents": "<contents>"
},
"name": "batch_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Namespace for all items that don't set their own path. Must already exist. Required unless every item has its own path (or 'namespace' is given instead). There is no default: pass "/" explicitly to write to the root. | |
| contents | Yes | Items to store, max 50. Each item is either a string (stored in the top-level path) or an object {"content": "...", "path": "/some/namespace"}. Each item becomes a separate entry. | |
| namespace | No | Alias for 'path'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brain | Yes | ||
| entries | Yes | ||
| next_actions | No | ||
| total_tokens | Yes | ||
| namespace_path | No |