#Pls assist me in setting up 2 additional workspaces

1 messages Ā· Page 1 of 1 (latest)

slow monolith
#

I want to separate functions for my sub-agents into separate workspaces, can you assist me?

grand ravenBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> āœ… Mark Solution

sudden berryBOT
sharp etherBOT
#

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/
slow monolith
#

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"
}
]
},

sharp etherBOT
#

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

  • marketing and sales now each get their own isolated workspace
#
  • coder also gets its own workspace, so it stops sharing main
  • requireAgentId: true helps prevent accidental same-workspace spawns
  • allowAgents is 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
slow monolith
#

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"
],

sharp etherBOT
#

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 bindings unless you want inbound chats routed directly to marketing or sales
  • For spawned workers, just target agentId: "marketing" or agentId: "sales"
  • Your current coder was 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.

slow monolith
#

"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
}
]
}
}
},

sharp etherBOT
#

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 agents block 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.

slow monolith
#

"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
}
}
}
},

sharp etherBOT
#

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": {
slow monolith
#

"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"
]
}
},

sharp etherBOT
#
  "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

  • main stays in /home/grodev/.openclaw/workspace
  • marketing gets /home/grodev/.openclaw/workspace-marketing
  • sales gets /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.

slow monolith
#

"plugins": {
"load": {
"paths": []
},
"entries": {
"discord": {
"enabled": true
},
"acpx": {
"enabled": false,
"config": {
"permissionMode": "approve-all",
"nonInteractivePermissions": "fail"
}
}
},
"installs": {}
}
}

sharp etherBOT
#

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:

  • main keeps the default workspace
  • coder gets its own workspace
  • marketing gets its own workspace
  • sales gets 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:

  1. save openclaw.json
  2. 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.

slow monolith
#

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?
sharp etherBOT
#

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:

  • marketing has its own workspace
  • sales has its own workspace
  • main.subagents.allowAgents includes them (or stays ["*"])
  • when you spawn, you explicitly target agentId: "marketing" or agentId: "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.

slow monolith
#

OpenClaw 2026.3.24

sharp etherBOT
#

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 workspace entries for:
    • marketing
    • sales
    • optionally coder
  • Keep main.subagents.allowAgents pointing at those agents, or leave ["*"]

So yes, on 2026.3.24 your setup should still work without requireAgentId.

The only practical difference is: