#custom slash command
1 messages · Page 1 of 1 (latest)
Short answer: not as an arbitrary Discord custom slash command in openclaw.json on 2026.4.15.
What is supported:
- Route a Discord channel/thread to a specific agent via
bindings[] - Then native slash commands in that conversation resolve on that agent, not
main
The relevant bits are:
- Discord slash commands run as
agent:<agentId>:discord:slash:<userId> - They carry the routed conversation target session
- Routing is config-driven, not
AGENTS.md-driven
Example:
{
agents: {
list: [
{ id: "main", default: true },
{
id: "codex",
runtime: {
type: "acp",
acp: {
agent: "codex",
backend: "acpx",
mode: "persistent",
cwd: "/workspace/openclaw"
}
},
systemPromptOverride: "You are the coding agent."
}
]
},
bindings: [
{
agentId: "codex",
match: {
channel: "discord",
accountId: "default",
peer: { kind: "channel", id: "222222222222222222" }
}
}
]
}
If you want a persistent ACP binding, use:
{
bindings: [
{
type: "acp",
agentId: "codex",
match: {
channel: "discord",
accountId: "default",
peer: { kind: "channel", id: "222222222222222222" }
},
acp: { label: "codex-main" }
}
]
}
One important nuance:
AGENTS.mdis not how routing happens- but it can still affect the target agent prompt if that agent’s workspace has bootstrap files
skipBootstraponly stops auto-creation, it does not disable existing file injection- if you want zero workspace-file dependence, use a clean dedicated workspace and/or
agents.list[].systemPromptOverride
So the real answer is:
- No generic
openclaw.jsonfeature for “register/mycmd-> agent X” on Discord - Yes deterministic slash-command-to-agent routing via
bindings[]/type: "acp"bindings
Docs: