Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kiwifs.com/llms.txt

Use this file to discover all available pages before exploring further.

The KiwiFS REST API gives you full read/write access to your knowledge base over HTTP. Every operation available in the web UI and MCP interface is also available as a REST endpoint.

Base URL

http://localhost:3333/api/kiwi
All endpoints are prefixed with /api/kiwi/. In multi-space mode, endpoints include the space name:
/api/kiwi/{space}/file?path=concepts/auth.md

Authentication

Configure the auth type in .kiwi/config.toml under [auth] type.
No authentication required. Suitable for local development and trusted networks.
curl http://localhost:3333/api/kiwi/tree

Common headers

HeaderPurposeExample
X-ActorAttribution for the git commit authoragent:my-agent
X-ProvenanceLineage tracking for audit trailsrun:run-249
If-MatchOptimistic locking using ETag (git blob SHA)a1b2c3d4e5f6
Content-TypeBody formattext/markdown or application/json
Always set X-Actor on write operations. KiwiFS uses this value as the git commit author, making it easy to trace which agent or user made each change.

Error handling

All errors return a JSON body with a single error field and a standard HTTP status code.
{"error": "file not found: concepts/missing.md"}
Status codeMeaning
400Bad request (malformed query, missing required field)
401Unauthorized (missing or invalid credentials)
404Resource not found
409Conflict (ETag mismatch on optimistic lock)
422Unprocessable entity (validation error)
500Internal server error

Health endpoints

Use these endpoints for liveness and readiness probes in container orchestrators.
curl http://localhost:3333/health
All three return:
{"status": "ok"}

Rate limiting

KiwiFS enforces a built-in rate limit of 100 requests/second per IP with a burst allowance of 200. Health and metrics endpoints are exempt. If you need stricter or more advanced rate limiting, place a reverse proxy (nginx, Caddy, Envoy) in front of the server.

Next steps

File operations

Read, write, and delete files.

Search

Full-text and vector search.

Versioning

Git history, diff, and blame.

Metadata

Structured queries and knowledge graph.
Last modified on May 4, 2026