AI spaces
An AI space is a DNF host with the ai-space profile, usually a
microVM guest. It runs an
OpenClaw 🡕 assistant reserved for its members, with its own
secrets and its own data.
Create a space
Section titled “Create a space”-
Declare the host and its members
A host’s
usersare its members : DNF creates the Kanidm groupspace-<hôte>for them.etc/config.yaml - hostname: "ia-pro"zone: "lan:1.40"profile: "ai-space"features: ["microvm-guest:hyperviseur", "monitoring-node"]users: ["alice", "bob"]services:openclaw: {}monitoring-nodeplaces the space under the zone’s supervision : without it, neither a space failure nor the assistant stopping triggers an alert.The owner is the member whose subscription runs the assistant : they receive validation requests and spontaneous messages (reminders, scheduled tasks). As the only member, they are implicit. With several members, they are declared in
usr/machines/ia-pro/configuration.nix(the order ofusersis not preserved) :{ darkone.service.openclaw.owner = "alice"; } -
Initialize the space
just space-init ia-pro: host key, secrets (cf. Isolated hosts) and, if the network has Matrix, the bot@ia-pro:<domaine>and its identity. Then commitusr/secrets/andvar/generated/spaces/. -
Deploy
The hypervisor, the zone gateway (vhost, DNS) and the HCS (Kanidm group) :
just apply hyperviseur,gw,hcs. -
Connect the AI provider
Once per space, from the host (
just enter ia-pro), for each subscription of the owner that serves the space’s models (cf. Models and subscriptions) :Subscription Models Login Claude Pro/Max, via the claudeCLIanthropic/*(default :anthropic/claude-sonnet-5-5)sudo -u openclaw -H claude auth loginChatGPT Plus/Pro, via the codexpluginopenai/*openclaw models auth login --provider openaiThe host’s
openclawcommand switches to the service user on its own, including from the owner’s account (cf. Access).openclaw models statuschecks the connection, which stays in/var/lib/openclaw, persistent.
Models and subscriptions
Section titled “Models and subscriptions”A model goes through the owner’s subscription when its provider appears in
subscriptions, otherwise through an API key.
{ darkone.service.openclaw = { model = "anthropic/claude-sonnet-5-5"; extraModels = [ "openai/gpt-6-astra" "openrouter/moonshotai/kimi-k3" ]; subscriptions = [ "anthropic" "openai" ]; # défaut apiKeys = [ "OPENROUTER_API_KEY" ]; };}| Option | Role |
|---|---|
model | Main model, <fournisseur>/<modèle> |
extraModels | Other models, chosen in the conversation with /model |
subscriptions | Owner subscriptions : anthropic, openai |
apiKeys | API keys, by variable name |
providers | Providers not in OpenClaw, OpenAI-compatible |
Each key (apiKeys, providers.<nom>.apiKey) is stored before deployment in
the space’s secrets, under openclaw/<VARIABLE>
(just space-sops <hôte>).
OpenAI-compatible provider
Section titled “OpenAI-compatible provider”A provider not in OpenClaw, such as Nous Portal, is declared with its address, key and models :
{ darkone.service.openclaw = { providers.nous = { baseUrl = "https://inference-api.nousresearch.com/v1"; apiKey = "NOUS_API_KEY"; models = [ "Hermes-4-405B" ]; }; model = "nous/Hermes-4-405B"; };}Shared subscriptions
Section titled “Shared subscriptions”| Use | Account |
|---|---|
| Assistant (web, Matrix, scheduled tasks) | The owner’s, quota shared by members |
| A member’s Claude Code, Codex, OpenCode | Their own |
A personal subscription (ChatGPT, Claude) shared by several members falls
outside the terms of use : a team space takes a team plan or API keys
(subscriptions = [ ]).
Matrix
Section titled “Matrix”Members write to the bot @<hôte>:<domaine> in a direct, end-to-end encrypted
message. The channel only exists if the network declares the matrix
service : without it, the space works through its web interface alone.
| Element | Rule |
|---|---|
| Who is listened to | Members of the space (@<login>:<domaine>), in DM only ; other accounts are ignored |
| Rooms | Ignored : non-members would read the answers there |
| Sessions | One per member when there are several, otherwise a single one for all channels |
| Command validation | None by default (cf. Security) ; any request goes to the owner, in DM |
| Spontaneous messages | Sent to the owner, in DM |
| Encryption keys | In /var/lib/openclaw, persistent |
| Name and avatar | Those of the identity |
Identity
Section titled “Identity”darkone.service.openclaw.identity presents the assistant in the web interface
and on Matrix, where its name replaces the host’s. Nix enforces it, even with
mutableConfig.
{ darkone.service.openclaw.identity = { name = "Jarvis"; emoji = "🦉"; avatar = ./jarvis.png; # ou "https://…" };}| Avatar | Web interface | Matrix |
|---|---|---|
| png, jpg, gif or webp file | Yes (2 MB maximum) | Yes |
https:// URL | Yes | Yes |
| Path relative to the workspace | Yes | Drawn emoji |
| None | Emoji | Drawn emoji |
The name follows at deployment. The Matrix avatar is sent by
just space-init <hôte>, to be run again after a change (an evaluation
warning reminds you of this) ; then commit var/generated/spaces/.
A file must be tracked by git.
Voice conversation
Section titled “Voice conversation”The mic button in the web interface opens a voice conversation, interruptible, on both PC and phone (Android app). A real-time voice answers (OpenAI GPT-Live or Google Gemini Live) ; the space’s assistant does the work (tools, files, MCP), whatever its model.
{ darkone.service.openclaw = { talk.enable = true;
# Gemini Live au lieu de GPT-Live talk.provider = "google"; apiKeys = [ "GEMINI_API_KEY" ]; };}| Option | Default | Role |
|---|---|---|
talk.provider | openai | openai or google |
talk.model | depends on provider | Real-time model |
talk.voice | depends on provider | Voice |
talk.instructions | none | Added instructions (language, tone) |
| Provider | Access | Default model, voice |
|---|---|---|
openai (GPT-Live) | ChatGPT login, otherwise OPENAI_API_KEY | gpt-live-1-codex, cove |
google (Gemini Live) | GEMINI_API_KEY key | gemini-3.1-flash-live-preview, Kore |
The owner’s ChatGPT login is done with openclaw models auth login --provider openai, even with an assistant running Claude. The Gemini key is created on Google AI Studio 🡕 and stored like the others (see Models and subscriptions). Other GPT-Live voices : arbor, breeze, ember, juniper, maple, sol, spruce, vale ; Gemini Live offers 30 (Puck, Charon, Aoede…).
With mutableConfig, the voice conversation no longer follows Nix after the first start : after changing provider, run openclaw config unset talk on the host (see Editable configuration). At most eight conversations at a time, 30 minutes each.
Agent tools
Section titled “Agent tools”MCP servers, skills and tools are declared once per space, in
usr/machines/<hôte>/configuration.nix. The assistant and each member (Claude
Code, Codex, OpenCode) receive the same ones.
{ pkgs, ... }:{ darkone.host.ai-space = { mcp.fetch = { command = "uvx"; args = [ "mcp-server-fetch" ]; }; mcp.github = { command = "github-mcp-server"; args = [ "stdio" ]; secretEnv = [ "GITHUB_PERSONAL_ACCESS_TOKEN" ]; }; mcp.docs.url = "https://mcp.example.com/mcp"; skills.rapport = ./skills/rapport; # dossier avec SKILL.md packages = [ pkgs.uv pkgs.pandoc pkgs.github-mcp-server ]; };
darkone.service.openclaw = { workspace."AGENTS.md" = ./AGENTS.md; projects.notes = "https://forge.example.com/alice/notes.git"; };}| Option | Role |
|---|---|
darkone.host.ai-space.mcp | MCP servers, local (command, args, env, secretEnv) or remote (url, headers) |
darkone.host.ai-space.skills | Skills by name : SKILL.md content, file or folder |
darkone.host.ai-space.packages | Tools in the assistant’s and members’ PATH |
darkone.host.ai-space.enableClaude, enableCodex, enableOpenCode | Claude Code, Codex and OpenCode, enabled by default |
darkone.host.ai-space.projectsDir | Shared projects folder (default /var/lib/projects) |
darkone.service.openclaw.exec | Command policy (cf. Security) |
darkone.service.openclaw.identity | Assistant name, emoji and avatar (cf. Identity) |
darkone.service.openclaw.workspace | Assistant workspace files (AGENTS.md, SOUL.md…) |
darkone.service.openclaw.projects | Git repositories cloned once into the projects folder |
darkone.service.openclaw.transcription | Voice note transcription (cf. Transcription) |
Transcription
Section titled “Transcription”Voice notes, from Matrix or the web, are transcribed by whisper.cpp, with no external service :
| Space | Transcription |
|---|---|
| MicroVM guest | Hypervisor server, large-v3-turbo model |
| Physical machine | On the space, small model (466 Mo, CPU) |
Hypervisor server unreachable or too slow : the space transcribes by
itself with small. transcription.backend = "local" always keeps
transcription in the guest. The language is detected for each note ;
transcription.language = "fr" fixes it.
Projects and coding agents
Section titled “Projects and coding agents”The projects directory (/var/lib/projects, linked as ~/projects for each
member) is shared : any file created by a member or by the assistant
remains editable by the others. It is the assistant’s working directory ;
its instructions and memory stay in its workspace.
From the conversation (web or Matrix), the assistant hands code to Claude Code, Codex or OpenCode :
| Mode | Use |
|---|---|
/acp spawn claude (or codex, opencode) | Coding session tied to the conversation, can be resumed |
Background task (coding-agent skill) | Long work, completion reported by message |
Each tool signs in once, on the host :
| Tool | Sign-in |
|---|---|
| Claude Code | The owner’s (see Create a space) |
| Codex (session) | sudo -u openclaw -H codex login --device-auth |
| Codex (background task) | sudo -u openclaw -H env CODEX_HOME=/var/lib/openclaw/.codex-coding-agent codex login --device-auth |
| OpenCode | sudo -u openclaw -H opencode auth login |
Workflows
Section titled “Workflows”| Tool | Use |
|---|---|
| Automations | Assistant scheduled tasks (morning briefing, monitoring) |
| Lobster 🡕 | Chaining steps with approvals, resume without redoing everything |
The assistant and the interface create their own automations ; Nix can also declare some :
{ darkone.service.openclaw.automations.briefing = { schedule = "0 7 * * 1-5"; # cron, ou "every 2h" message = "Résume mon agenda et mes mails non lus."; };}| Option | Role |
|---|---|
schedule, message | When, and the request made to the assistant |
announce | Sends the answer into the conversation (default) |
model | Model specific to this task |
enable | false : disabled, then re-enableable from the interface only |
Declared automations are resynchronized on each start : a change made in the interface is overwritten, a removed declaration deletes its task. The others are never touched.
Lobster is enabled with lobster = true ; its files go through the
workspace (workspace."workflows/tri.lobster" = ./tri.lobster;), and the
assistant runs them on demand.
Member accounts
Section titled “Member accounts”Each member has a Linux account on the space, lightweight:
| Item | On the space |
|---|---|
| Home Manager profile | space-member (zsh, git, vim, tmux), instead of their own |
| Space tools | Claude Code, Codex and OpenCode, with the space’s MCP and skills (darkone.home.aiSpace) |
| Customizations | usr/users/<login>/space.nix (all their spaces), then usr/users/<login>/spaces/<host>.nix (this space), if they exist |
usr/users/<login>/default.nix | Ignored: reserved for their workstations |
| Rights | projects group, no sudo except for the openclaw CLI, whatever their profile |
Administration of the space goes through the nix account (just enter <host>).
Each member connects their own subscriptions, once: claude (then
/login), codex login --device-auth and opencode auth login. OpenCode
accepts a ChatGPT subscription or an API key, not the Claude subscription.
Access
Section titled “Access”| Item | Rule |
|---|---|
| Address | https://openclaw.<zone>.<domain> |
| Login | Kanidm SSO, restricted to the space-<host> group |
| A member’s personal device | Recognized by the tailnet, without SSO : see Android app |
| Device | Paired on first visit, without admin or approval rights (owner only, see Editable configuration) |
| Administration | openclaw CLI on the host |
| Assistant port | Reachable from the zone gateway only |
On its own, openclaw opens the assistant terminal (like openclaw tui). It runs under the service user, for the nix account and, through a sudo rule, for darkone.service.openclaw.cliUsers (default : the owner). Other members go through the web interface.
Android app
Section titled “Android app”The OpenClaw app 🡕 cannot follow the Kanidm login. The gateway therefore recognizes a member’s personal device by its tailnet identity.
-
Connect the phone
Connect the device with the member’s account, subnets accepted. Tailscale must stay active.
-
Create the pairing code
On the host :
Fenêtre de terminal openclaw qr --limitedWithout
--limited, the phone keeps a permanent admin token. -
Pair the app
Choose Scan QR or setup code. If a request stays pending :
openclaw devices list, thenopenclaw devices approve <requestId>.
Any member’s personal device thus gets through without Kanidm, browser included, with its owner’s rights : admin included if the configuration is editable. Lost device : delete it from Headscale.
Editable configuration
Section titled “Editable configuration”By default, Nix locks the assistant configuration : the web interface shows it read-only. darkone.service.openclaw.mutableConfig = true makes it editable, in the interface or via openclaw config set on the host, and gives the owner admin rights.
| Settings | Who decides |
|---|---|
| Access, Matrix channel, plugins, MCP, transcription, identity | Nix : restored on startup and on each change |
| Model, commands, voice conversation | Nix on first start, then the interface |
| Others | The interface |
Security
Section titled “Security”By default, the assistant runs its commands without validation, like
OpenClaw : the barrier is the space itself (microVM cut off from the LAN,
secrets specific to the space). Its service is also confined : it only
writes to /var/lib/openclaw and the projects folder, and sees neither the
members’ personal folders nor their processes.
darkone.service.openclaw.exec selects the policy :
| Value | Commands |
|---|---|
full (default) | All, without validation |
ask | Allowlisted ones pass, the others are submitted to the owner |
auto | A model examines those outside the allowlist and submits doubtful cases to the owner |
allowlist | Allowlisted ones only |
deny | None |
The allowlist is filled on the host :
openclaw approvals allowlist add --agent main <chemin>.