Skip to main content
kiwifs init creates a knowledge directory from a built-in template. Pick the template closest to how you will use the knowledge base. Everything it creates is plain markdown plus a .kiwi/ folder, so you can change any of it later.
Terminal
init never overwrites existing files, so it is safe to run on a folder that already has content.

Available templates

The old template names knowledge and prompt-library are now memory and prompt. Using an old name returns an error that names the new one.

What every template includes

Every template, including blank, creates:
  • .kiwi/config.toml — server, search, versioning, and auth settings. Some templates ship their own; the rest get the default config.
  • .kiwi/rules.md — agent rules you can export with kiwifs rules export.
  • .kiwi/templates/ — page templates for decisions, meeting notes, onboarding, product specs, SOPs, and tasks.
  • .gitignore — ignores .kiwi/state/, which holds rebuildable indexes.
  • README.md
Every template except blank also includes two documents for agents:
  • SCHEMA.md — folder layout, frontmatter fields, and naming conventions.
  • playbook.md — step-by-step MCP tool sequences for common operations. init writes it to both the root and .kiwi/playbook.md. Agents receive it through kiwi_context.
See Agent playbook.

Export agent rules

Turn .kiwi/rules.md into the rules file your agent harness reads:
Terminal

Template reference

A curated knowledge base where articles are reviewed and kept fresh.
knowledge
SCHEMA.md
playbook.md
index.md
faq
getting-started
guides
reference
troubleshooting
.kiwi
config.toml
schemas/article.json
workflows/kb.json
  • Article frontmatter: title, type (how-to, troubleshooting, faq, or reference), owner, status, tags, and review_interval are required.
  • Workflow: draft → review → verified → stale → archived. Stale articles can go back to review.
  • Freshness: the janitor flags pages older than stale_days = 90.
A team wiki with onboarding, decisions, and processes. Uses the default config.
knowledge
SCHEMA.md
playbook.md
index.md
welcome.md
architecture.md
how-we-work.md
decisions
onboarding
processes
reference
.kiwi
processes/ ships with deployment, dev setup, and incident response pages. reference/ has an FAQ and a glossary.
Episodic and semantic memory for agents. Agents write short-lived observations to episodes/ and consolidate them into durable pages in pages/. Uses the default config.
knowledge
SCHEMA.md
playbook.md
index.md
log.md
episodes
pages
.kiwi
Use kiwi_remember to write an episode, kiwi_memory_report to find episodes not yet consolidated, and kiwi_forget to mark a memory as superseded. See Episodic memory.
Tasks as markdown files, ready for the kanban board and claims. Uses the default config.
knowledge
SCHEMA.md
WORKFLOW.md
playbook.md
index.md
tasks
.kiwi
schemas/task.json
workflows/tasks.json
  • Task frontmatter: type: task, title, status, and priority (an integer) are required. Optional fields include category, effort, assignee, parent, blocked-by, due, and claim fields such as claimed-by and lease-expires. Workflow actions read workflow and state, which is what the shipped example pages use.
  • Workflow: backlog → todo → in_progress → review → done, with cancelled reachable from every open state. in_progress has a WIP limit of 5 and review a limit of 3.
tasks/example-task.md
Advance a task through the workflow:
Terminal
Collections of structured records with DQL dashboards.
knowledge
SCHEMA.md
playbook.md
index.md
collections
dashboards
imports
.kiwi
config.toml
schemas/record.json
Records need title and type. Dashboards in dashboards/ combine kiwi-query and kiwi-chart blocks. Fill collections with kiwifs import. See DQL.
A git-native CMS with an editorial workflow, a public reader at /p/*, and feeds.
knowledge
SCHEMA.md
playbook.md
index.md
authors
blog
docs
pages
.kiwi
config.toml
schemas/blog-post.json
workflows/editorial.json
  • Post frontmatter: title, slug, type: blog-post, author, category, tags, published, and published_at are required.
  • Workflow: draft → review → scheduled → published → archived. Review can also publish directly.
  • Feeds: GET /api/kiwi/feed.xml (Atom) and GET /api/kiwi/feed.json (JSON Feed).
See Publishing.
Runbooks with severity, affected services, and execution tracking.
knowledge
SCHEMA.md
playbook.md
index.md
example-high-cpu.md
.kiwi
config.toml
schemas/runbook.json
templates/runbook.md
  • Runbook frontmatter: type: runbook, title, trigger, severity (P1–P4), owner, and services are required. Track runs with last_executed, last_outcome, and execution_count.
  • Execution staleness: the janitor flags runbooks not executed in 90 days, and runbooks whose last_outcome is failure.
  • services is a typed link field, so services appear as edges in the graph.
Architecture Decision Records in MADR format.
knowledge
SCHEMA.md
playbook.md
index.md
decisions
.kiwi
config.toml
schemas/adr.json
templates/adr.md
workflows/adr.json
  • ADR frontmatter: type: adr, title, status, date, and deciders are required.
  • Workflow: proposed → accepted → deprecated → superseded.
  • Auto-numbering: new files in decisions/ get the next adr_number, configured with [format_hooks.auto_sequence].
  • supersedes, superseded_by, and contradicts are typed links, so the graph shows decision chains.
Versioned prompts with evaluation rubrics. Git history records every prompt change.
knowledge
SCHEMA.md
playbook.md
index.md
system-prompts
task-prompts
evaluation
.kiwi
config.toml
schemas/prompt.json
schemas/rubric.json
Prompts need type: prompt, title, model, and label (production or staging). Optional fields such as temperature, eval_score, success_rate, and variant_of make prompts queryable with DQL.
A research library with a reading pipeline and typed citation links.
knowledge
SCHEMA.md
playbook.md
index.md
papers
notes
reviews
.kiwi
config.toml
schemas/paper.json
workflows/reading.json
  • Paper frontmatter: type: paper, title, authors, year, venue, workflow, and state are required. doi, bibtex_key, and cites are optional.
  • Workflow: unread → reading → annotated → summarized → incorporated, with a WIP limit of 10 on reading.
  • cites, contradicts, extends, and reviews are typed links. The kiwi_cite MCP tool creates a paper page from a DOI or arXiv ID.
An append-only event log with one file per day.
knowledge
SCHEMA.md
playbook.md
index.md
events
.kiwi
config.toml
schemas/event.json
Each daily file sets append_only: true in its frontmatter, and KiwiFS rejects overwrites of such files. Add entries with POST /api/kiwi/file/append or the kiwi_append MCP tool. Each entry is an H2 heading such as ## 2026-06-20T09:00:00Z | system.startup.v1, and git history provides tamper evidence.
No sample pages, no SCHEMA.md, and no playbook. You get the files listed in What every template includes and nothing else.

List templates over HTTP

A running server lists its templates at /api/init-templates, outside the /api/kiwi prefix:
Terminal
Response
Templates are sorted by label, with blank last.

Quickstart

Install and run KiwiFS.

Agent playbook

How agents use SCHEMA.md and playbook.md.

Workflows

State machines behind kanban boards and editorial pipelines.

Schemas

Validate frontmatter on write.
Last modified on October 19, 2026