Skip to main content
KiwiFS gives agent memory systems a data model on top of plain files. Episodes hold raw, per-session observations. Semantic pages hold curated knowledge. A coverage report shows which episodes have not yet been folded into a semantic page. KiwiFS does not run an LLM. Consolidation is your agent’s or scheduler’s job; KiwiFS provides the conventions, the tools, and the report.

Episodic memory

Raw notes per run or session. High volume and append-friendly. Lives under episodes/.

Semantic memory

Durable entity and concept pages, built from episodes during consolidation.
Start a workspace with this layout using kiwifs init --template memory. It ships episodes/, pages/, log.md, and a playbook for ingest, recall, and consolidation.

Record and retire memories

kiwi_remember writes an episode to episodes/<YYYY-MM-DD>/<episode_id>.md with memory_kind: episodic, a created timestamp, and optional scope and tags. It generates an episode_id when you omit one.kiwi_forget retires a page without deleting it. It sets memory_status: superseded, valid_until to now, and an optional superseded_reason, and keeps the body.

Frontmatter conventions

Any page under the episodes prefix counts as episodic unless it sets memory_kind: semantic or consolidation.
Partition memories by user, project, or tenant with values such as user:alice or project:billing. Pass scope to kiwi_search, kiwi_search_semantic, or GET /api/kiwi/search to see only that partition.
expires_at (RFC3339) or ttl (such as 7d or 24h, counted from created) flag a page for review once it passes. kiwifs janitor reports it as expired-memory; nothing is deleted.valid_from and valid_until record when a fact was true, such as a policy that applied only for a quarter.
Set contradicts to the path or wiki link of a conflicting page, and prefer memory_status: contested over silently overwriting. The link is indexed with relation contradicts and appears in the target’s backlinks. KiwiFS records contradictions you declare; it does not detect them.

Production versus consolidation

Two frontmatter lists answer different questions. Coverage uses only merged-from. An episode is identified by its episode_id, or id when that is absent.
pages/communication-preferences.md
An episode counts as merged when any page lists it as type: episode with a matching id or path. Entries of type run, session, trace, event, or ingest with the same id also count, so consolidators that key on run IDs match too.

Consolidation workflow

1

Agents write episodes

Use kiwi_remember, or write under episodes/ with X-Provenance and an episode_id.
2

Find what is unmerged

Run the memory report and take the unmerged list as your queue.
3

Consolidate

Read those episodes, merge them into pages/ with your model or rules, and list them in merged-from. Retire episodes you no longer need with kiwi_forget.
4

Verify

Re-run the report until unmerged is empty or acceptable.

Memory report

Terminal
limit and offset page episodic_files and unmerged; the total_* fields stay unpaginated. To use a folder other than episodes/ for the report and episode classification, set it in config. kiwi_remember always writes under episodes/.
.kiwi/config.toml

Agent playbook

The files that tell agents how to remember and consolidate.

Analytics API

Full response for the memory report.

Search

Scope filters and superseded pages.

Configuration

The [memory] section.
Last modified on October 19, 2026