chore: update stale docs
This commit is contained in:
@@ -28,33 +28,45 @@ With this backend enabled, the coding agent:
|
||||
|
||||
Recalled memory is background context, not instructions. Current user messages and tool output take precedence when they conflict.
|
||||
|
||||
## Agent tools
|
||||
|
||||
Selecting Mnemopi makes these discoverable tools available:
|
||||
|
||||
- `recall` — search scoped memories. Results are previews and include memory IDs.
|
||||
- `retain` — store durable facts explicitly.
|
||||
- `reflect` — synthesize an answer across recalled memories.
|
||||
- `memory_edit` — `update`, `forget`, or `invalidate` an editable memory by ID. Fact-table rows are read-only.
|
||||
|
||||
Read the full content and metadata for a recalled result with `read memory://<memory-id>` before replacing it; clipped recall previews are not safe update payloads. The optional `learn` tool is also able to retain into Mnemopi when `autolearn.enabled: true`.
|
||||
|
||||
## Settings
|
||||
|
||||
| Setting | Default | Description |
|
||||
| ------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `memory.backend` | `off` | Set to `mnemopi` to enable this backend. |
|
||||
| `mnemopi.dbPath` | agent memories dir | Optional SQLite database path. |
|
||||
| `mnemopi.bank` | unset | Optional shared bank base name passed to `Mnemopi`; the coding-agent wrapper scopes from this base according to `mnemopi.scoping`. Unset → shared bank `default`; per-project modes derive a project bank from the working-directory basename plus a stable hash of its absolute path. |
|
||||
| `mnemopi.scoping` | `per-project` | Memory visibility mode: `global` = one shared bank, `per-project` = isolated project memory, `per-project-tagged` = project-local writes plus global recall visibility. |
|
||||
| `mnemopi.autoRecall` | `true` | Recall memory on the first turn of a session. |
|
||||
| `mnemopi.autoRetain` | `true` | Retain completed turns automatically. |
|
||||
| `mnemopi.polyphonicRecall` | `false` | Enable 4-voice polyphonic recall (vector, graph, fact, temporal) with reciprocal rank fusion; `MNEMOPI_POLYPHONIC_RECALL` overrides when set. |
|
||||
| `mnemopi.enhancedRecall` | `false` | Enable the tiered query result cache for repeated/similar recall queries; `MNEMOPI_ENHANCED_RECALL` overrides when set. |
|
||||
| `mnemopi.retainEveryNTurns` | `4` | Minimum user turns between automatic retain writes. |
|
||||
| `mnemopi.recallLimit` | `8` | Maximum recalled memories in the prompt block. |
|
||||
| `mnemopi.recallContextTurns` | `3` | Prior user-bounded turns included in recall queries. |
|
||||
| `mnemopi.recallMaxQueryChars` | `4000` | Maximum composed recall query length. |
|
||||
| `mnemopi.injectionTokenLimit` | `5000` | Approximate token budget for memory prompt injection. |
|
||||
| `mnemopi.debug` | `false` | Enable debug logging for backend failures. |
|
||||
| `mnemopi.noEmbeddings` | `false` | Pass `noEmbeddings` to `Mnemopi` and force FTS-only recall. |
|
||||
| `mnemopi.embeddingVariant` | `en` | Local embedding model variant: `en` = `BAAI/bge-base-en-v1.5` (768d), `multilingual` = `intfloat/multilingual-e5-large` (1024d). `mnemopi.embeddingModel`/`MNEMOPI_EMBEDDING_MODEL` override it; changing it rebuilds stored embeddings on the next writable start. |
|
||||
| `mnemopi.embeddingModel` | variant default | Explicit embedding model id; overrides `mnemopi.embeddingVariant`. Precedence: this setting > `MNEMOPI_EMBEDDING_MODEL` env > variant default. |
|
||||
| `mnemopi.embeddingApiUrl` | env/default | OpenAI-compatible embedding endpoint passed to `Mnemopi`. |
|
||||
| `mnemopi.embeddingApiKey` | env/default | Embedding API key passed to `Mnemopi`. |
|
||||
| `mnemopi.llmMode` | `smol` | `smol` uses the configured pi-ai smol model, `remote` uses the settings below, and `none` disables LLM calls. |
|
||||
| `mnemopi.llmBaseUrl` | env/default | OpenAI-compatible LLM endpoint for `llmMode: remote`. |
|
||||
| `mnemopi.llmApiKey` | env/default | LLM API key for `llmMode: remote`. |
|
||||
| `mnemopi.llmModel` | env/default | LLM model id for `llmMode: remote`. |
|
||||
| Setting | Default | Description |
|
||||
| ----------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `memory.backend` | `off` | Set to `mnemopi` to enable this backend. |
|
||||
| `mnemopi.dbPath` | agent memories dir | Optional SQLite database path. |
|
||||
| `mnemopi.bank` | unset | Optional shared bank base name passed to `Mnemopi`; the coding-agent wrapper scopes from this base according to `mnemopi.scoping`. Unset → shared bank `default`; per-project modes derive a project bank from the working-directory basename plus a stable hash of its absolute path. |
|
||||
| `mnemopi.scoping` | `per-project` | Memory visibility mode: `global` = one shared bank, `per-project` = isolated project memory, `per-project-tagged` = project-local writes plus global recall visibility. |
|
||||
| `mnemopi.autoRecall` | `true` | Recall memory on the first turn of a session. |
|
||||
| `mnemopi.autoRetain` | `true` | Retain completed turns automatically. |
|
||||
| `mnemopi.polyphonicRecall` | `false` | Enable 4-voice polyphonic recall (vector, graph, fact, temporal) with reciprocal rank fusion; `MNEMOPI_POLYPHONIC_RECALL` overrides when set. |
|
||||
| `mnemopi.enhancedRecall` | `false` | Enable the tiered query result cache for repeated/similar recall queries; `MNEMOPI_ENHANCED_RECALL` overrides when set. |
|
||||
| `mnemopi.proactiveLinking` | `false` | Ingest new memories into the episodic graph and link them to related entities/memories as they are stored; `MNEMOPI_PROACTIVE_LINKING` overrides when set. |
|
||||
| `mnemopi.retainEveryNTurns` | `4` | Minimum user turns between automatic retain writes. |
|
||||
| `mnemopi.recallLimit` | `8` | Maximum recalled memories in the prompt block. |
|
||||
| `mnemopi.recallContextTurns` | `3` | Prior user-bounded turns included in recall queries. |
|
||||
| `mnemopi.recallMaxQueryChars` | `4000` | Maximum composed recall query length. |
|
||||
| `mnemopi.injectionTokenLimit` | `5000` | Approximate token budget for memory prompt injection. |
|
||||
| `mnemopi.debug` | `false` | Enable debug logging for backend failures. |
|
||||
| `mnemopi.noEmbeddings` | `false` | Pass `noEmbeddings` to `Mnemopi` and force FTS-only recall. |
|
||||
| `mnemopi.embeddingVariant` | `en` | Local embedding model variant: `en` = `BAAI/bge-base-en-v1.5` (768d), `multilingual` = `intfloat/multilingual-e5-large` (1024d). `mnemopi.embeddingModel`/`MNEMOPI_EMBEDDING_MODEL` override it; changing it rebuilds stored embeddings on the next writable start. |
|
||||
| `mnemopi.embeddingModel` | variant default | Explicit embedding model id; overrides `mnemopi.embeddingVariant`. Precedence: this setting > `MNEMOPI_EMBEDDING_MODEL` env > variant default. |
|
||||
| `mnemopi.embeddingApiUrl` | env/default | OpenAI-compatible embedding endpoint passed to `Mnemopi`. |
|
||||
| `mnemopi.embeddingApiKey` | env/default | Embedding API key passed to `Mnemopi`. |
|
||||
| `mnemopi.llmMode` | `smol` | `smol` resolves the configured pi-ai `tiny` role then `smol`; `remote` uses the settings below; `none` disables LLM calls. |
|
||||
| `mnemopi.llmBaseUrl` | env/default | OpenAI-compatible LLM endpoint for `llmMode: remote`. |
|
||||
| `mnemopi.llmApiKey` | env/default | LLM API key for `llmMode: remote`. |
|
||||
| `mnemopi.llmModel` | env/default | LLM model id for `llmMode: remote`. |
|
||||
|
||||
## Scoping
|
||||
|
||||
@@ -68,7 +80,7 @@ The combined project-plus-global behavior lives in the wrapper. The `@oh-my-pi/p
|
||||
|
||||
## LLM and embeddings
|
||||
|
||||
The backend passes these settings to the `Mnemopi` constructor; if a setting is omitted, Mnemopi falls back to its `MNEMOPI_*` environment defaults. The backend does not download or run a local GGUF LLM. LLM-dependent paths use a configured pi-ai model, an opt-in local on-device memory model (`providers.memoryModel`, ONNX — overrides `smol`/`remote` when set to a local model), a dynamic completion function, a remote OpenAI-compatible endpoint, or deterministic no-LLM fallbacks.
|
||||
FTS and embedding paths use the settings below. LLM-backed extraction/consolidation uses the configured local on-device memory model (`providers.memoryModel`) when selected, otherwise `llmMode: smol` resolves the `tiny` role first and then `smol`; `llmMode: remote` uses the OpenAI-compatible endpoint settings; `llmMode: none` disables LLM calls. If no tiny/smol model or current credential resolves, Mnemopi continues without LLM-backed work.
|
||||
|
||||
FTS-only:
|
||||
|
||||
@@ -136,14 +148,14 @@ new Mnemopi({
|
||||
});
|
||||
```
|
||||
|
||||
pi-ai smol model LLM:
|
||||
pi-ai tiny/smol role LLM:
|
||||
|
||||
```yaml
|
||||
mnemopi:
|
||||
llmMode: smol
|
||||
```
|
||||
|
||||
The coding agent resolves its configured smol role and passes a dynamic completion function so every Mnemopi LLM call can fetch the current provider credentials at call time:
|
||||
The coding agent resolves `tiny` first and then `smol`, and passes a dynamic completion function so every Mnemopi LLM call can fetch current provider credentials at call time:
|
||||
|
||||
```ts
|
||||
new Mnemopi({
|
||||
@@ -158,3 +170,4 @@ new Mnemopi({
|
||||
- `/memory enqueue` forces retention of the current session, flushes pending fact extractions, and runs Mnemopi sleep/consolidation.
|
||||
- `/memory stats` and `/memory diagnose` render backend-specific bank statistics/diagnostics when the Mnemopi backend is active.
|
||||
- Subagents do not own separate Mnemopi retain loops; they alias the parent state when a parent Mnemopi state exists, and otherwise remain inert.
|
||||
- Backend startup is best-effort. If database/model initialization fails, the session continues with Mnemopi inert and logs a warning; memory tools then report that the backend is not initialized.
|
||||
|
||||
Reference in New Issue
Block a user