#what is the best way to create a new role based agent?

1 messages Β· Page 1 of 1 (latest)

tacit chasm
#

I want to create a new employee agent, and I don't know what's the correct way to create them. Give me bootstart instructions, preferrably through CLI commands

low fogBOT
#

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

velvet hillBOT
weak bloomBOT
#

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:

  1. 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

  2. If you mean Discord role-based routing
    Create the agent first, then add a binding in ~/.openclaw/openclaw.json like:

{
#
  bindings: [
    {
      agentId: "employee",
      match: {
        channel: "discord",
        guildId: "YOUR_GUILD_ID",
        roles: ["ROLE_ID"],
      },
    },
  ],
}

Then restart: