#what is the best way to create a new role based agent?
1 messages Β· Page 1 of 1 (latest)
What does openclaw --version show? Command surface moved a bit over time.
On current builds, the correct way is to create a real separate agent with openclaw agents add, not by hand-building folders.
Simplest path
openclaw agents add employee
That gives the new agent its own:
- workspace
- sessions
- auth store
- identity/bootstrap files
If you want a fully CLI/non-interactive setup:
openclaw agents add employee \
--workspace ~/.openclaw/workspace-employee \
--model openai/gpt-5.4 \
--non-interactive
Then trigger first run / bootstrap:
openclaw agent --agent employee --message "Hey, introduce yourself and bootstrap."
Useful checks:
openclaw agents list --bindings
openclaw models status --agent employee
A few important gotchas:
-
Auth is per-agent
If the new agent says βNo API key foundβ, it usually means its auth store is empty:
~/.openclaw/agents/employee/agent/auth-profiles.json -
If you mean Discord role-based routing
Create the agent first, then add a binding in~/.openclaw/openclaw.jsonlike:
{
bindings: [
{
agentId: "employee",
match: {
channel: "discord",
guildId: "YOUR_GUILD_ID",
roles: ["ROLE_ID"],
},
},
],
}
Then restart: