Skip to content
Wenlan

Spaces

Spaces

Separate work, personal, client, and project memory, and understand how Wenlan resolves the active space.

Qi-Xuan LuUpdated 6 min read

At a glance

01

Spaces are memory buckets for different work contexts, such as origin, career, ideas, or a client project.

02

They reduce context bleed while keeping one local daemon and one Wenlan installation.

01

What a space is

A space is a named partition for memories, pages, and recall context. It is for separating work streams that should not automatically inform each other.

Use spaces when you switch between clients, personal projects, experiments, or repos with very different context.

02

Set the active space

The most explicit override is WENLAN_SPACE. It is useful when launching an agent for a specific context and you want every capture and recall to stay in that bucket.

List registered spaces first; if career is absent, add it before setting it as the default save Space. A WENLAN_SPACE pin takes precedence over an explicit Space argument.

Space commands
wenlan spaces list
# If career is absent, register it first:
wenlan spaces add career
wenlan spaces show career
wenlan spaces default career
wenlan spaces default
WENLAN_SPACE=career claude

03

Configure defaults

Wenlan can read space configuration from ~/.wenlan/spaces.toml. Map directory prefixes to spaces when you want a repo or Markdown folder to select the same context every time.

Longest matching prefix wins. Set the daemon's Default save Space with wenlan spaces default career, and inspect it with wenlan spaces default. This save default is separate from directory mappings.

spaces.toml
[[mapping]]
prefix = "~/Repos/origin"
space  = "origin"

[[mapping]]
prefix = "~/notes/career"
space  = "career"

04

Resolver order

For plugin and CLI context resolution, WENLAN_SPACE is a strict pin. An explicit Space comes next, followed by WENLAN_DEFAULT_SPACE, a directory mapping, and a registered git repository name. If none applies, the context is unscoped. CLI commands reject an explicit Space that conflicts with the strict pin.

Use wenlan doctor when you are unsure which layer selected the current space. Doctor prints the resolver state so you can diagnose accidental context bleed.

Priority chain
1. WENLAN_SPACE strict pin
2. explicit Space argument
3. WENLAN_DEFAULT_SPACE fallback
4. ~/.wenlan/spaces.toml cwd-prefix mapping
5. current git repo basename, if registered
6. unscoped

05

How recall behaves

Recall should start inside the active space so a client project does not accidentally pull personal memories or an unrelated repo history.

If you intentionally need cross-space context, move or recapture the durable fact into the right space rather than relying on accidental bleed.

06

What spaces are not

Spaces are not separate user accounts, encryption boundaries, or permission systems. They are product-level context separation inside your local Wenlan store.

For sensitive work, still treat the whole local machine and connected AI client as part of the privacy boundary.

Next

AI Agent Knowledge Graph

Build a source-backed AI knowledge base that links people, projects, tools, observations, and relations without treating graph context as authority.

Read next