.kiwi/ state.
When to use multi-space
- Separate team wikis on one host (engineering vs product).
- Per-tenant isolation in self-hosted deployments.
- A default space plus dynamically provisioned workspaces.
Configure spaces
- config.toml
- CLI flags
.kiwi/config.toml
The first registered space is the default — requests without a space identifier route there.
Request routing
Resolution order:| Priority | Method | Example |
|---|---|---|
| 1 | X-Kiwi-Space header | Set by a reverse proxy (subdomain → space name) |
| 2 | URL path prefix | /api/kiwi/{space}/tree |
| 3 | Default space | First registered space |
Space admin API
| Method | Path | Purpose |
|---|---|---|
GET | /api/spaces | List all spaces with metadata |
GET | /api/spaces/:name | Single space summary |
POST | /api/spaces | Create { "name", "root" } |
DELETE | /api/spaces/:name | Remove a dynamic space |
.kiwi/spaces.json under the first space’s root and restore on restart.
See Spaces API for curl examples.
Per-space auth
Withauth.type = "perspace", API keys scope to a single space:
.kiwi/config.toml
MCP
Use--space <name> when the knowledge root hosts multiple configured spaces:
Related documentation
Configuration
[[spaces]] config syntax.Spaces API
REST CRUD for space management.