- Realm identity: which logical realm id is active.
- Realm state root: where realm directories are stored on disk.
ws-... realm id from the workspace/context root, then
stores the realm under <context-root>/.rkat/realms/.
See The Active Realm
Use verbose mode when behavior is surprising:realmis the logical sharing key.context rootis the path used to derive a workspace realm when--realmis omitted.realm rootis the physical realm directory that containsconfig.toml,realm_manifest.json, sessions, blobs, and other realm state.
Default CLI Behavior
When--realm is omitted, CLI run/session commands use a stable workspace
realm:
.rkat/realms/<realm>/ there on
first use.
This means a subdirectory is a different default realm from its parent. Pass
--context-root <parent> or --realm <id> when you want a subdirectory command
to share the parent project’s state.
Where State Lives
By default, CLI realm state is project-local:.rkat/ also contains project-scoped files such as
.rkat/mcp.toml, .rkat/skills/, and compatibility configuration workflows.
Project-local is where the CLI creates fresh realms. An existing realm is
found where it lies: resolution probes both the project-local root and the
user-global data root for the realm id first, so an explicit --realm
reaches its data no matter which surface materialized it. See
Realms for the full
resolution rules.
Choose An Explicit Shared Realm
Use--realm when multiple surfaces or folders should intentionally share
state:
Isolate A Run
Use--isolated when a command should not reuse workspace state:
realm-... id.
Change The Workspace Root
Use--context-root when you want workspace-derived identity, but from a
specific path:
ws-... realm id and, unless --state-root is
also supplied, the default project-local state root.
Override The State Root
Use--state-root when you want realm files somewhere other than
<context-root>/.rkat/realms:
--state-root changes the parent directory that contains realm directories. It
does not change the realm id. Combine it with --context-root or --realm when
you need both custom storage and predictable identity:
Backend Pinning
The first open of a realm writesrealm_manifest.json and pins the backend.
--realm-backend fails with a
backend-mismatch error (a matching value is a no-op). The stored manifest wins
so every surface opens the same backend.
Common Surprises
Recommended Defaults
For normal local development, use the CLI defaults and inspect with--verbose when needed.
For team or daemon workflows, use explicit names:
