Skip to main content
Every kiwifs init template ships agent-facing documents beside your markdown pages. Together they tell agents where to write, what frontmatter to use, and which MCP tools to call.

Core files

FilePurpose
SCHEMA.mdDirectory layout, frontmatter field tables, naming conventions
.kiwi/playbook.mdStep-by-step MCP sequences for each operation
.kiwi/rules.mdHarness-specific behavior (Cursor, Claude, etc.)
index.mdAuto-maintained table of contents
log.mdOptional append-only chronological record
The knowledge template also includes episodes/ for episodic memory. See Episodic memory.

Load context in one call

kiwi_context
Returns schema, playbook, and index in one response.
MCP also exposes read-only resource kiwi://schema for the schema document alone.

Playbook operations

kiwi_context
kiwi_search("authentication")
kiwi_write("pages/auth.md", content)
kiwi_read("index.md")
kiwi_write("index.md", updated_index)
kiwi_append("log.md", "- added auth page")
kiwi_search("payment timeout")
kiwi_read("pages/payments.md")
kiwi_append("episodes/2026-05-21.md", observation)
kiwi_memory_report
kiwi_read("episodes/2026-05-21.md")
kiwi_write("pages/topic.md", merged_content)
kiwi_analytics
kiwi_health_check("pages/auth.md")
kiwi_lint

Rules for your harness

Export .kiwi/rules.md in a format your agent tool understands:
kiwifs rules
REST: GET /api/kiwi/rules, PUT /api/kiwi/rules — see Utilities API.

Provenance on writes

curl -X PUT 'http://localhost:3333/api/kiwi/file?path=episodes/run-249.md' \
  -H 'X-Actor: agent:researcher' \
  -H 'X-Provenance: run:run-249' \
  -d '# Session notes...'
KiwiFS injects derived-from into frontmatter automatically from these headers.

MCP

Full tool reference.

Episodic memory

Episodes, consolidation, and merge reports.

Schemas

JSON Schema validation on writes.

Examples

Practical workflow recipes.
Last modified on May 23, 2026