#Pls assist me in setting up 2 additional workspaces
1 messages Ā· Page 1 of 1 (latest)
Let me verify the exact workspace bits in the docs first, so I don't make up config keys.
Yep. The clean way is separate agents, not just separate sessions.
In OpenClaw, an agentId is basically one isolated brain with its own:
- workspace
- auth
- session store
So if you want sub-agents to use different workspaces, spawn them under different agent IDs. If you spawn a sub-agent without changing agentId, it stays on the same agent/workspace.
First, can you paste:
openclaw --version
And hereās the setup pattern for 2 extra workspaces:
openclaw agents add research --workspace ~/.openclaw/workspace-research
openclaw agents add coding --workspace ~/.openclaw/workspace-coding
Then in ~/.openclaw/openclaw.json:
{
agents: {
defaults: {
workspace: "~/.openclaw/workspace",
subagents: {
allowAgents: ["research", "coding"],
requireAgentId: true,
},
},
list: [
{
id: "main",
default: true,
workspace: "~/.openclaw/workspace",
},
{
id: "research",
workspace: "~/.openclaw/workspace-research",
},
{
id: "coding",
workspace: "~/.openclaw/workspace-coding",
},
],
},
}
Then restart:
openclaw gateway restart
A few important bits:
- Put role-specific instructions in each workspaceās
AGENTS.md - Put role-specific skills in each workspaceās
skills/ - Auth is also separate per agent, under
~/.openclaw/agents/<agentId>/agent/
So this gives you real separation.
Docs:
- https://docs.openclaw.ai/cli/agents
- https://docs.openclaw.ai/concepts/agent-workspace
- https://docs.openclaw.ai/tools/subagents
- https://docs.openclaw.ai/concepts/multi-agent
If you want, paste your current ~/.openclaw/openclaw.json and Iāll help you wire the two new workspaces exactly.
I would like 1 workspace for Marketing and another for Sales. Here is my .json :
"agents": {
"defaults": {
"model": {
"primary": "ollama/kimi-k2.5:cloud",
"fallbacks": [
"ollama/glm-5:cloud"
]
},
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"openrouter/anthropic/claude-3.5-sonnet": {},
"ollama/kimi-k2.5:cloud": {},
"ollama/glm-5:cloud": {}
},
"workspace": "/home/grodev/.openclaw/workspace",
"compaction": {
"mode": "safeguard",
"memoryFlush": {
"enabled": true,
"softThresholdTokens": 4000,
"prompt": "Write any lasting notes to memory/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store.",
"systemPrompt": "Session nearing compaction. Store durable memories now."
}
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
},
"list": [
{
"id": "main",
"default": true,
"model": "ollama/glm-5:cloud",
"subagents": {
"allowAgents": [
"*"
]
}
},
{
"id": "coder",
"model": "ollama/glm-5:cloud"
}
]
},
Yep, this is very doable.
For your setup, Iād add two new agents, one for marketing and one for sales, and give each its own workspace.
Also, one important detail: your current coder agent has no explicit workspace, so it currently inherits the default workspace and is not isolated from main.
Recommended agents block
"agents": {
"defaults": {
"model": {
"primary": "ollama/kimi-k2.5:cloud",
"fallbacks": [
"ollama/glm-5:cloud"
]
},
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"openrouter/anthropic/claude-3.5-sonnet": {},
"ollama/kimi-k2.5:cloud": {},
"ollama/glm-5:cloud": {}
},
"workspace": "/home/grodev/.openclaw/workspace",
"compaction": {
"mode": "safeguard",
"memoryFlush": {
"enabled": true,
"softThresholdTokens": 4000,
"prompt": "Write any lasting notes to memory/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store.",
"systemPrompt": "Session nearing compaction. Store durable memories now."
}
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8,
"requireAgentId": true
}
},
"list": [
{
"id": "main",
"default": true,
"workspace": "/home/grodev/.openclaw/workspace",
"model": "ollama/glm-5:cloud",
"subagents": {
"allowAgents": [
"coder",
"marketing",
"sales"
]
}
},
{
"id": "coder",
"workspace": "/home/grodev/.openclaw/workspace-coder",
"model": "ollama/glm-5:cloud"
},
{
"id": "marketing",
"workspace": "/home/grodev/.openclaw/workspace-marketing",
"model": "ollama/kimi-k2.5:cloud"
},
{
"id": "sales",
"workspace": "/home/grodev/.openclaw/workspace-sales",
"model": "ollama/kimi-k2.5:cloud"
}
]
}
Why I changed these bits
marketingandsalesnow each get their own isolated workspace
coderalso gets its own workspace, so it stops sharingmainrequireAgentId: truehelps prevent accidental same-workspace spawnsallowAgentsis explicit instead of["*"], which is a bit safer/cleaner
After editing config
Restart the gateway:
openclaw gateway restart
Best practice for āfunctionsā separation
If by āfunctionsā you mean specialized behavior, do this inside each workspace:
/home/grodev/.openclaw/workspace-marketing/AGENTS.md
/home/grodev/.openclaw/workspace-sales/AGENTS.md
and optionally:
/home/grodev/.openclaw/workspace-marketing/skills//home/grodev/.openclaw/workspace-sales/skills/
That gives you real separation of memory, instructions, and skills.
Easiest way to create them cleanly
Instead of only hand-editing JSON, you can also use:
openclaw agents add marketing --workspace /home/grodev/.openclaw/workspace-marketing
openclaw agents add sales --workspace /home/grodev/.openclaw/workspace-sales
That path is nice because OpenClaw will set up the workspace/bootstrap files for you.
Docs:
- https://docs.openclaw.ai/cli/agents
- https://docs.openclaw.ai/concepts/agent-workspace
- https://docs.openclaw.ai/tools/subagents
- https://docs.openclaw.ai/concepts/multi-agent
If you want, send the full openclaw.json and Iāll patch the whole thing for you, not just the agents section.
openclaw.json:
{
"meta": {
"lastTouchedVersion": "2026.3.24",
"lastTouchedAt": "2026-04-16T06:30:17.101Z"
},
"wizard": {
"lastRunAt": "2026-03-16T07:44:05.469Z",
"lastRunVersion": "2026.3.11",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"auth": {
"profiles": {
"openrouter:default": {
"provider": "openrouter",
"mode": "api_key"
}
}
},
"acp": {
"enabled": false
},
"models": {
"mode": "merge",
"providers": {
"ollama": {
"baseUrl": "http://127.0.0.1:11434",
"apiKey": "OLLAMA_API_KEY",
"api": "ollama",
"models": [
{
"id": "kimi-k2.5:cloud",
"name": "kimi-k2.5:cloud",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 128000,
"maxTokens": 8192
},
{
"id": "minimax-m2.5:cloud",
"name": "minimax-m2.5:cloud",
"reasoning": false,
"input": [
"text"
],
I only got the top of the file (meta, wizard, auth), so I canāt patch the whole JSON exactly yet.
The good news is: for this change, you only need to replace your current agents section. You can leave meta, wizard, auth, channels, etc. alone.
Use this as your agents block:
"agents": {
"defaults": {
"model": {
"primary": "ollama/kimi-k2.5:cloud",
"fallbacks": [
"ollama/glm-5:cloud"
]
},
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"openrouter/anthropic/claude-3.5-sonnet": {},
"ollama/kimi-k2.5:cloud": {},
"ollama/glm-5:cloud": {}
},
"workspace": "/home/grodev/.openclaw/workspace",
"compaction": {
"mode": "safeguard",
"memoryFlush": {
"enabled": true,
"softThresholdTokens": 4000,
"prompt": "Write any lasting notes to memory/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store.",
"systemPrompt": "Session nearing compaction. Store durable memories now."
}
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8,
"requireAgentId": true
}
},
"list": [
{
"id": "main",
"default": true,
"workspace": "/home/grodev/.openclaw/workspace",
"model": "ollama/glm-5:cloud",
"subagents": {
"allowAgents": [
"coder",
"marketing",
"sales"
]
}
},
{
"id": "coder",
"workspace": "/home/grodev/.openclaw/workspace-coder",
"model": "ollama/glm-5:cloud"
},
{
"id": "marketing",
"workspace": "/home/grodev/.openclaw/workspace-marketing",
"model": "ollama/kimi-k2.5:cloud"
},
{
"id": "sales",
"workspace": "/home/grodev/.openclaw/workspace-sales",
"model": "ollama/kimi-k2.5:cloud"
}
]
}
Then restart:
openclaw gateway restart
A couple important notes:
- You do not need
bindingsunless you want inbound chats routed directly tomarketingorsales - For spawned workers, just target
agentId: "marketing"oragentId: "sales" - Your current
coderwas sharing the default workspace, so I isolated that too
If you want, paste everything from "agents": { down to the end of the file, plus:
openclaw --version
and Iāll turn it into a full ready-to-paste openclaw.json.
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 128000,
"maxTokens": 8192
},
{
"id": "glm-5:cloud",
"name": "glm-5:cloud",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 128000,
"maxTokens": 8192
},
{
"id": "nomic-embed-text:latest",
"name": "nomic-embed-text:latest",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 2048,
"maxTokens": 8192
},
{
"id": "qwen3-coder-next:cloud",
"name": "qwen3-coder-next:cloud",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 262144,
"maxTokens": 8192
}
]
}
}
},
Looks like Discord is chunking the file, no worries š
What you pasted in acp and top-level models does not conflict with this setup.
So the move is still:
- keep your existing
meta,wizard,auth,acp,models,channels, etc. - replace only the root-level
agentsblock with the one I sent above
So the shape should look like this:
{
"meta": { ... },
"wizard": { ... },
"auth": { ... },
"acp": { ... },
"models": { ... },
"agents": {
// use the block I sent in the previous message
},
"channels": { ... }
}
After that
Restart:
openclaw gateway restart
Optional but recommended
Create the workspaces cleanly with:
openclaw agents add marketing --workspace /home/grodev/.openclaw/workspace-marketing
openclaw agents add sales --workspace /home/grodev/.openclaw/workspace-sales
That helps seed the workspace files.
One more useful detail
If you want true role separation, add:
/home/grodev/.openclaw/workspace-marketing/AGENTS.md/home/grodev/.openclaw/workspace-sales/AGENTS.md
Example:
- marketing: brand voice, campaign planning, content ideas
- sales: lead handling, objection handling, outreach drafts
If you hit an error after restarting, send:
openclaw --version
openclaw agents list
openclaw status --all
and Iāll help you debug the exact config.
"agents": {
"defaults": {
"model": {
"primary": "ollama/kimi-k2.5:cloud",
"fallbacks": [
"ollama/glm-5:cloud"
]
},
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"openrouter/anthropic/claude-3.5-sonnet": {},
"ollama/kimi-k2.5:cloud": {},
"ollama/glm-5:cloud": {}
},
"workspace": "/home/grodev/.openclaw/workspace",
"compaction": {
"mode": "safeguard",
"memoryFlush": {
"enabled": true,
"softThresholdTokens": 4000,
"prompt": "Write any lasting notes to memory/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store.",
"systemPrompt": "Session nearing compaction. Store durable memories now."
}
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
},
"list": [
{
"id": "main",
"default": true,
"model": "ollama/glm-5:cloud",
"subagents": {
"allowAgents": [
"*"
]
}
},
{
"id": "coder",
"model": "ollama/glm-5:cloud"
}
]
},
"tools": {
"profile": "full",
"exec": {
"host": "gateway",
"security": "full",
"ask": "off"
},
"subagents": {
"tools": {
"allow": [
"group:openclaw",
"group:fs",
"group:runtime"
],
"deny": [
"group:sessions",
"cron",
"gateway"
]
}
}
},
"messages": {
"ackReactionScope": "group-mentions"
},
"commands": {
"native": "auto",
"nativeSkills": "auto",
"restart": true,
"ownerDisplay": "raw"
},
"session": {
"dmScope": "per-channel-peer"
},
"hooks": {
"internal": {
"enabled": true,
"entries": {
"boot-md": {
"enabled": true
}
}
}
},
"channels": {
"discord": {
"enabled": true,
"token": "--redacted--",
"groupPolicy": "open",
"streaming": "off",
"guilds": {
"*": {
"requireMention": false
}
}
}
},
You can stop pasting the models section, that part is fine and not the blocker š
For this change, the only thing that matters is agents. Your model IDs are already there, so marketing and sales can use them.
Minimal changes
1) In agents.defaults.subagents, add:
"requireAgentId": true
So it becomes:
"subagents": {
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"controlUi": {
"allowedOrigins": [
"https://openclaw.tail3e723a.ts.net"
]
},
"auth": {
"mode": "token",
"token": "--redacted--"
},
"tailscale": {
"mode": "serve",
"resetOnExit": false
},
"nodes": {
"denyCommands": [
"camera.snap",
"camera.clip",
"screen.record",
"contacts.add",
"calendar.add",
"reminders.add",
"sms.send"
]
}
},
"maxConcurrent": 8,
"requireAgentId": true
}
2) In agents.list, add these two entries:
{
"id": "marketing",
"workspace": "/home/grodev/.openclaw/workspace-marketing",
"model": "ollama/kimi-k2.5:cloud"
},
{
"id": "sales",
"workspace": "/home/grodev/.openclaw/workspace-sales",
"model": "ollama/kimi-k2.5:cloud"
}
3) In your main agent, set:
"subagents": {
"allowAgents": [
"coder",
"marketing",
"sales"
]
}
Result
mainstays in/home/grodev/.openclaw/workspacemarketinggets/home/grodev/.openclaw/workspace-marketingsalesgets/home/grodev/.openclaw/workspace-sales
Then restart:
openclaw gateway restart
And verify:
openclaw agents list
One extra note: if you want coder isolated too, give it its own workspace, otherwise it still shares the default one.
If you want, I can send you a single full ready-to-paste agents block one more time, super compact.
"plugins": {
"load": {
"paths": []
},
"entries": {
"discord": {
"enabled": true
},
"acpx": {
"enabled": false,
"config": {
"permissionMode": "approve-all",
"nonInteractivePermissions": "fail"
}
}
},
"installs": {}
}
}
Perfect, that confirms your models block closes cleanly.
You donāt need to paste any more of the file, this is the ready-to-paste agents block:
"agents": {
"defaults": {
"model": {
"primary": "ollama/kimi-k2.5:cloud",
"fallbacks": [
"ollama/glm-5:cloud"
]
},
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"openrouter/anthropic/claude-3.5-sonnet": {},
"ollama/kimi-k2.5:cloud": {},
"ollama/glm-5:cloud": {}
},
"workspace": "/home/grodev/.openclaw/workspace",
"compaction": {
"mode": "safeguard",
"memoryFlush": {
"enabled": true,
"softThresholdTokens": 4000,
"prompt": "Write any lasting notes to memory/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store.",
"systemPrompt": "Session nearing compaction. Store durable memories now."
}
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8,
"requireAgentId": true
}
},
"list": [
{
"id": "main",
"default": true,
"workspace": "/home/grodev/.openclaw/workspace",
"model": "ollama/glm-5:cloud",
"subagents": {
"allowAgents": [
"coder",
"marketing",
"sales"
]
}
},
{
"id": "coder",
"workspace": "/home/grodev/.openclaw/workspace-coder",
"model": "ollama/glm-5:cloud"
},
{
"id": "marketing",
"workspace": "/home/grodev/.openclaw/workspace-marketing",
"model": "ollama/kimi-k2.5:cloud"
},
{
"id": "sales",
"workspace": "/home/grodev/.openclaw/workspace-sales",
"model": "ollama/kimi-k2.5:cloud"
}
]
}
Then run:
openclaw gateway restart
openclaw agents list
If that comes up clean, youāre set.
If not, send the output of:
openclaw --version
openclaw agents list
openclaw status --all
Glad we got this narrowed down. š¦
Yep, thatās the exact section you want to edit.
Make these 3 changes inside that agents block:
1) Change this:
"subagents": {
"maxConcurrent": 8
}
to this:
"subagents": {
"maxConcurrent": 8,
"requireAgentId": true
}
2) In your main agent, set:
"subagents": {
"allowAgents": [
"coder",
"marketing",
"sales"
]
}
3) Add these agent entries to list:
{
"id": "marketing",
"workspace": "/home/grodev/.openclaw/workspace-marketing",
"model": "ollama/kimi-k2.5:cloud"
},
{
"id": "sales",
"workspace": "/home/grodev/.openclaw/workspace-sales",
"model": "ollama/kimi-k2.5:cloud"
}
Optional but recommended for coder too:
{
"id": "coder",
"workspace": "/home/grodev/.openclaw/workspace-coder",
"model": "ollama/glm-5:cloud"
}
Then run:
openclaw gateway restart
openclaw agents list
So yes, youāre editing the right place now. If you want, paste just the final full agents block after you edit it and Iāll sanity-check it before you restart.
Nice, thatās enough to lock it in.
Your tools block can stay exactly as-is.
Just replace your current agents block with this:
"agents": {
"defaults": {
"model": {
"primary": "ollama/kimi-k2.5:cloud",
"fallbacks": [
"ollama/glm-5:cloud"
]
},
"models": {
"openrouter/auto": {
"alias": "OpenRouter"
},
"openrouter/anthropic/claude-3.5-sonnet": {},
"ollama/kimi-k2.5:cloud": {},
"ollama/glm-5:cloud": {}
},
"workspace": "/home/grodev/.openclaw/workspace",
"compaction": {
"mode": "safeguard",
"memoryFlush": {
"enabled": true,
"softThresholdTokens": 4000,
"prompt": "Write any lasting notes to memory/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store.",
"systemPrompt": "Session nearing compaction. Store durable memories now."
}
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8,
"requireAgentId": true
}
},
"list": [
{
"id": "main",
"default": true,
"workspace": "/home/grodev/.openclaw/workspace",
"model": "ollama/glm-5:cloud",
"subagents": {
"allowAgents": [
"coder",
"marketing",
"sales"
]
}
},
{
"id": "coder",
"workspace": "/home/grodev/.openclaw/workspace-coder",
"model": "ollama/glm-5:cloud"
},
{
"id": "marketing",
"workspace": "/home/grodev/.openclaw/workspace-marketing",
"model": "ollama/kimi-k2.5:cloud"
},
{
"id": "sales",
"workspace": "/home/grodev/.openclaw/workspace-sales",
"model": "ollama/kimi-k2.5:cloud"
}
]
}
Then:
openclaw gateway restart
openclaw agents list
So the summary is:
mainkeeps the default workspacecodergets its own workspacemarketinggets its own workspacesalesgets its own workspace- sub-agent spawns now require an explicit target agent, which avoids accidental reuse of
main
If you paste the final agents block after you save it, Iāll do one last sanity check before you restart.
Yep, the rest of that config looks fine too. Nothing in messages, commands, session, hooks, or channels.discord conflicts with the workspace split.
So at this point the only change you need is still the agents block I sent.
You should be good to:
- save
openclaw.json - run:
openclaw gateway restart
openclaw agents list
Optional, only if you want spawned Discord threads later
If you want sessions_spawn(..., thread: true) to auto-create/bind Discord threads, you can also add:
"channels": {
"discord": {
"threadBindings": {
"enabled": true,
"spawnSubagentSessions": true
}
}
}
But that part is optional. It is not needed just to give Marketing and Sales separate workspaces.
If this restart works, youāre basically done.
Glad we got this sorted. š¦
If this fixed it, please right-click the solution message ā Apps ā ā Mark Solution so Answer Overflow can index it for future folks.
Yep, the gateway block is unrelated too. No changes needed there.
At this point, you can stop pasting config. The only section that matters for your goal is still agents.
Do this now
openclaw gateway restart
openclaw agents list
openclaw status --all
If something breaks, paste the error/output, not more config chunks. Thatāll be much faster to debug.
Also, good call redacting the token, keep doing that š
Perfect, thatās the end of the file, and plugins is fine too.
So yes, nothing outside agents needs changing for the Marketing/Sales workspace split.
Final answer
Only update your agents section, then run:
openclaw gateway restart
openclaw agents list
openclaw status --all
If those come back clean, youāre done.
If thereās an issue, paste the command output and Iāll help from there.
Invalid config at /home/grodev/.openclaw/openclaw.json:
- agents.defaults.subagents: Unrecognized key: "requireAgentId"
Is this going to be an issue once I restart the gateway or is it okay not to have this set as true like you advised?
Yep, remove requireAgentId.
That key is not supported on your installed version, and if you leave it in, config validation will fail, so it will be a problem on restart.
The good news is: you do not need it for separate workspaces.
Your setup will still work fine as long as:
marketinghas its ownworkspacesaleshas its ownworkspacemain.subagents.allowAgentsincludes them (or stays["*"])- when you spawn, you explicitly target
agentId: "marketing"oragentId: "sales"
So change:
"subagents": {
"maxConcurrent": 8,
"requireAgentId": true
}
back to:
"subagents": {
"maxConcurrent": 8
}
Then retry:
openclaw gateway restart
openclaw agents list
Also, please paste:
openclaw --version
because that schema mismatch tells me your runtime version is older/different than the docs I checked.
OpenClaw 2026.3.24
Ah, that explains it. Thanks.
On OpenClaw 2026.3.24, agents.defaults.subagents.requireAgentId is not available yet. My bad, I was looking at newer docs/source than your installed schema.
For your version
- Remove
requireAgentId - Keep the separate agent
workspaceentries for:marketingsales- optionally
coder
- Keep
main.subagents.allowAgentspointing at those agents, or leave["*"]
So yes, on 2026.3.24 your setup should still work without requireAgentId.
The only practical difference is: