#where to set systemprompt for discord bot / channel?
1 messages · Page 1 of 1 (latest)
In OpenClaw the “system prompt” isn’t a Discord setting — it’s per agent, and it’s built from the agent’s workspace bootstrap files (notably SOUL.md, AGENTS.md, USER.md, MEMORY.md). Docs: https://docs.openclaw.ai/concepts/system-prompt
So you’ve got two practical options:
A) One system prompt for the whole Discord bot (DMs + channels)
Put your stable instructions into your agent workspace files:
SOUL.md→ persona/toneAGENTS.md→ operating rules / tool discipline (“always ask before exec”, “be terse”, etc.)USER.md→ user-specific prefs
Discord docs even call this out (“If you need shared context in every channel, put the stable instructions in AGENTS.md or USER.md”): https://docs.openclaw.ai/channels/discord
You can inspect what’s currently injected with /context detail (shows system prompt size + injected files).
B) Different “system prompts” per Discord channel / per DM
There isn’t a channels.discord.*.systemPrompt knob right now. The intended way is:
- Create multiple agents, each with its own workspace (and its own
SOUL.md/AGENTS.mdetc.) - Route specific Discord conversations to those agents via
bindings
Docs: https://docs.openclaw.ai/channels/channel-routing and https://docs.openclaw.ai/concepts/multi-agent
Example openclaw.json idea:
{
agents: {
list: [
{ id: "dm", default: true, workspace: "~/.openclaw/workspace-dm" },
{ id: "support", workspace: "~/.openclaw/workspace-support" },
],
},
bindings: [
// Route ONE guild channel to the "support" agent
{
agentId: "support",
match: {
channel: "discord",
peer: { kind: "channel", id: "123456789012345678" } // Discord Channel ID
}
},
// Route DMs from a specific user to the "dm" agent
{
agentId: "dm",
match: {
channel: "discord",