Two layers
Episodic memory
Per-run or per-session raw notes. High volume, append-friendly, lives under
episodes/.Semantic memory
Durable curated knowledge on entity and concept pages. Built from episodes after consolidation.
Provenance vs consolidation
| Frontmatter | Set by | Meaning |
|---|---|---|
derived-from | KiwiFS (from X-Provenance header) | Which run or job produced this file |
merged-from | You (or your consolidation job) | Which episodes were folded into this downstream page |
derived-from records authorship. merged-from records consumption. The memory report uses only merged-from to determine coverage.Classify pages with memory_kind
| Value | Role |
|---|---|
episodic | Raw run or session material |
semantic | Durable curated knowledge |
consolidation | Staging area before merge to semantic |
working | Scratch, high churn |
memory_kind: semantic or consolidation prevents a file from being treated as episodic even when it lives under the episodes path prefix.Path convention
By default, markdown underepisodes/ is treated as episodic when memory_kind is absent or set to episodic.
.kiwi/config.toml
Episodic identity and merged-from
Prefer episode_id in episodic frontmatter. If absent, KiwiFS falls back to id.
frontmatter example
merged-from — by id or by compatible type (run, session, trace, event, ingest).
Operator workflow
Agents write episodes
Write under
episodes/ with X-Provenance and optional episode_id in frontmatter.Consolidation job runs
Read unmerged episodes, consolidate with your LLM or rules, then update
pages/ with merged-from.Check coverage
- CLI
- REST
- MCP
Related documentation
Configuration
[memory] section in config.toml.Analytics API
Response fields for the memory report endpoint.