#where to set systemprompt for discord bot / channel?

1 messages · Page 1 of 1 (latest)

bright grove
#

I want to enable a system prompt for the discord bot.
How to set a systemprompt for discord, per channel or for DMs to the bot ?

sinful craneBOT
#

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

glass gorgeBOT
#

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/tone
  • AGENTS.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:

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