memory::bank-changed
A memory bank was created or trashed. Payload: { event_type, bank }.
- bankstring
Only deliver events for this bank.
Durable cross-session agent memory — named banks of always-injected markdown rules and auto-extracted memories, hybrid BM25 + entity recall, pinning, and supersede-never-delete history. Plain files on disk; every operation is a traced function.
iii call compose::add worker=memory@0.2.7Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.
A memory bank was created or trashed. Payload: { event_type, bank }.
Only deliver events for this bank.
Create (or idempotently ensure) a named memory bank — an isolated scope of rules and memories, e.g. one per project or persona. Sessions select it via metadata `memory_bank`.
Human description shown in listings and the console.
Bank name, `[a-z0-9][a-z0-9_-]{0,63}` (it becomes a folder name).
Summary row for `memory::bank::list` and the console page.
Live memory (memory) count.
Rule (always-injected markdown) count.
False when the bank already existed (create is idempotent).
Move a bank's folder into the store's .trash (recoverable by hand); never destroys data.
Where the bank folder was moved (under the store's `.trash/`).
List every memory bank with memory/rule/pin counts.
Live memory (memory) count.
Rule (always-injected markdown) count.
Tombstone a memory (sets invalid_at). It leaves recall immediately but stays on disk and readable with include_superseded.
One memory item. Serialized whole as a `memories.jsonl` line; replay is last-wins by `id`, so an update appends a full record with a bumped `revision` and a delete appends a tombstoned record (`invalid_at` set) — history is never destroyed, only superseded.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
End-to-end self-test: data-dir writability, a save→recall→trash roundtrip in a scratch bank, and sibling reachability (router, session-manager). Reports degraded states explicitly instead of a bare process-up health.
True only when every REQUIRED check passed (sibling reachability is reported but advisory).
Internal: queue-delivered extraction job — errors propagate so the queue retries and dead-letters instead of losing the pass.
Fetch one memory by id, including superseded/tombstoned records.
One memory item. Serialized whole as a `memories.jsonl` line; replay is last-wins by `id`, so an update appends a full record with a bumped `revision` and a delete appends a tombstoned record (`invalid_at` set) — history is never destroyed, only superseded.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
Internal: harness pre-generate hook — injects the session bank's rules into the system prompt and recalled memories as one appended message. Never denies.
Transcript messages as assembled so far (schema-free: shapes belong to the router).
Turn metadata (`harness::send` options.metadata); `memory_bank` here overrides the session-level selection for this turn.
A memory was created, updated, superseded, or deleted in a memory bank. Payload: { event_type, bank, memory }. Bind console/live views here.
Only deliver events for this bank.
Page through a bank's memories, newest first. `include_superseded` shows history too.
Include superseded/tombstoned records (the history view).
Page size, default 50, max 500.
Only memories carrying this tag.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
Internal: hot-reload memory from the authoritative configuration when it changes — reopens the store on a data_dir change and swaps the per-call tuning snapshot otherwise.
Configuration id that changed (advisory; the handler re-fetches).
Internal: session::deleted handler — drops the session's extraction cursor.
Internal: harness turn-completed handler — enqueues one durable extraction job (a single router::complete call) for the finished turn; inline fallback without a queue.
Pin or unpin a memory. Pinned memories rank higher in recall and are untouchable by every automatic path.
One memory item. Serialized whole as a `memories.jsonl` line; replay is last-wins by `id`, so an update appends a full record with a bumped `revision` and a delete appends a tombstoned record (`invalid_at` set) — history is never destroyed, only superseded.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
Full injection dry-run for a hypothetical chat message: the exact system-prompt memory section (rules, budgets, truncation markers), the memories the turn would be handed (post ambient floor and token budget), and the appended message verbatim. Runs the same code as the pre-generate hook.
Bank to preview; the configured default when omitted.
The hypothetical user message (what someone would type in chat).
Memories the turn would be handed, post ambient floor and token budget, in injection order.
One memory item. Serialized whole as a `memories.jsonl` line; replay is last-wins by `id`, so an update appends a full record with a bumped `revision` and a delete appends a tombstoned record (`invalid_at` set) — history is never destroyed, only superseded.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
Recall score; 0.0 for memories added by the ambient floor.
The appended `<memory>` message body, verbatim; absent when no memory fits the budget.
Retrieval mode that ran (`bm25-entity` or `bm25-entity-semantic`).
Rules included, and whether any were cut by `max_rule_chars`.
The memory section appended to the system prompt (ambient header + rules), exactly as injected — truncation markers included.
Rank a bank's memories against a query (BM25 + entity match + corroboration + recency; no LLM). The same scorer the pre-generate hook uses — call it to preview an injection.
Bank to search; the configured default when omitted.
Also rank superseded/tombstoned records (the history view).
Max memories returned (default: the configured recall_limit).
Only rank memories carrying this tag.
One memory item. Serialized whole as a `memories.jsonl` line; replay is last-wins by `id`, so an update appends a full record with a bumped `revision` and a delete appends a tombstoned record (`invalid_at` set) — history is never destroyed, only superseded.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
Retrieval mode actually used — degradation is explicit, never silent. Currently always `bm25-entity`; a semantic signal joins when the router grows an embeddings surface.
Drop all in-RAM state and reload every bank from disk — the recovery hatch after editing bank files by hand.
List a bank's rules (markdown, injected whole into the system prompt on every turn). Stored as plain files under the bank's rules/ folder; editing them by hand is equivalent.
Bank whose rules to list; the configured default when omitted.
Milliseconds since epoch (file mtime).
Create or replace one rule (atomic write; empty content removes it). Rules are plain markdown files under the bank's rules/ folder.
Bank to write into; the configured default when omitted. Created on first use.
Markdown content. Empty removes the rule.
Rule name, `[a-z0-9][a-z0-9_-]{0,63}` (it becomes `<name>.md`).
False when the empty content removed the rule.
Save one memory explicitly. Content-fingerprinted: re-saving the same text reinforces the existing memory instead of duplicating it. Use when the user says `remember this`.
Target bank; the configured default when omitted.
Entity handles (people/projects/tools) used as a retrieval signal.
Provenance session, when saved on behalf of a conversation.
Topical labels for filtering within the bank (organization, not ranking).
The memory, one self-contained sentence.
False when the text fingerprint matched an existing memory (it was reinforced instead).
One memory item. Serialized whole as a `memories.jsonl` line; replay is last-wins by `id`, so an update appends a full record with a bumped `revision` and a delete appends a tombstoned record (`invalid_at` set) — history is never destroyed, only superseded.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
Retire one memory in favor of another: tombstone with a superseded_by pointer, never a plain delete. The consolidation seam; pinned memories cannot be superseded.
Memory to retire.
Live memory that replaces it.
One memory item. Serialized whole as a `memories.jsonl` line; replay is last-wins by `id`, so an update appends a full record with a bumped `revision` and a delete appends a tombstoned record (`invalid_at` set) — history is never destroyed, only superseded.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
Distinct tags across a bank's live memories with usage counts, most used first — the filter source for tag-scoped list/recall.
Serve the memory worker's injected console UI assets (content function for its console:script / console:style triggers).
The asset path from the trigger config (e.g. `state/page.js`).
The asset source, verbatim.
MIME type the console should serve the asset with.
Revise a memory's text, entities, or pin flag in place (same id, bumped revision; the prior revision stays in the on-disk log).
Replace the tag set (empty list clears).
One memory item. Serialized whole as a `memories.jsonl` line; replay is last-wins by `id`, so an update appends a full record with a bumped `revision` and a delete appends a tombstoned record (`invalid_at` set) — history is never destroyed, only superseded.
How a memory entered the store.
Times this memory was independently re-observed. Boosts recall rank.
Milliseconds since epoch.
Entity handles used as an exact-match retrieval signal.
Content fingerprint (`fp` + FNV-1a of the normalized text), so re-ingesting the same source reinforces instead of duplicating.
Set when the memory stopped being true (superseded or deleted). The record stays on disk and remains queryable with `include_superseded: true`.
Pinned memories are never touched by any automatic path (consolidation, decay); only an explicit `memory::pin`/`memory::update` changes them.
Bumped on every appended revision of this id; replay keeps the highest.
Memory id that replaced this one, when superseded by content.
Topical labels for filtering WITHIN a bank ("iii", "workers", "billing") — organization, not ranking. Normalized lowercase, capped like entities. Old records without the field load as untagged.
Find workers, kits and executables, or jump to a page.