kiwifs init template except blank ships a few agent-facing files beside your pages. An agent loads them with one call to kiwi_context and knows the layout, the frontmatter conventions, and the house rules before it writes anything.
The files
kiwifs init copies the template’s playbook to .kiwi/playbook.md, which is the copy kiwi_context serves. .kiwi/playbook.md and .kiwi/rules.md are the only .kiwi/ files reachable through the file API.
Load context in one call
- MCP
- REST
Call
kiwi_context with no arguments. It returns the schema, playbook, index, and rules as one document. Agents should call it first when they connect.The schema alone is also available as the read-only resource kiwi://schema.Typical operations
Each template’s playbook spells out its own sequences. These are the common shapes.Ingest: add a new source
Ingest: add a new source
Query: answer a question
Query: answer a question
Remember: record an observation
Remember: record an observation
Consolidate: fold episodes into durable pages
Consolidate: fold episodes into durable pages
Restructure: move or merge pages
Restructure: move or merge pages
Audit: check health
Audit: check health
Rules
.kiwi/rules.md holds rules that apply to every agent, such as “search before creating a page” or “never store secrets”. kiwi_context includes it, so MCP agents get it automatically. For agents that read rules from their own config, export it.
Terminal
cursor, claude, agents, openclaw, and skill. sync needs --output for every format except skill. Add --remote http://host:3333 to read the rules from a running server instead of the local file.
Over REST, GET /api/kiwi/rules reads the rules (add format= for an export) and PUT /api/kiwi/rules replaces them. See Utilities API.
Provenance on writes
Record which run produced a page. KiwiFS appends an entry to itsderived-from frontmatter.
Related
MCP
Client setup and the full tool reference.
Episodic memory
Episodes, consolidation, and coverage reports.
Schemas
Validate frontmatter on every write.
Templates
What each
kiwifs init template ships.