Skip to main content

System prompt

WednesdayAI assembles the agent’s system prompt from a set of named sections at run time. The default prompt is comprehensive; you can slim it down with a preset, toggle individual sections, inject custom content, and control which project context files are included. All configuration is under agents.defaults.systemPrompt (shared across agents) or agents.<agentId>.systemPrompt (per-agent override). Changes take effect when the gateway restarts. Restart: systemctl --user restart openclaw-gateway.

Presets

The fastest way to change the prompt’s size and scope is a preset:
// ~/.openclaw/openclaw.json
{
  agents: {
    defaults: {
      systemPrompt: {
        preset: "lean",   // "default" | "lean" | "minimal"
      },
    },
  },
}
PresetEffect
"default"All sections enabled. Full-featured context, longer prompt.
"lean"Disables documentation, runtime, model aliases. Compacts tooling and skills sections. Uses progressive skill rendering. Good balance of capability and token cost.
"minimal"Disables documentation, runtime, model aliases, reply tags, messaging, voice, reactions, silent replies, heartbeats. Tooling renders names only. Skills compact + progressive. Lowest token cost.

Per-agent override

Named agents can override the shared default. The per-agent config merges over agents.defaults.systemPrompt:
{
  agents: {
    defaults: {
      systemPrompt: { preset: "lean" },
    },
    assistant: {
      systemPrompt: {
        preset: "default",   // this agent uses the full prompt
      },
    },
  },
}

Section toggles

Individual sections can be turned off or customised without changing the preset. Use the sections map with the section name as the key:
{
  agents: {
    defaults: {
      systemPrompt: {
        preset: "default",
        sections: {
          documentation: "off",    // remove the slash-command reference
          modelAliases: "off",     // remove the model alias list
          heartbeats: "off",       // disable heartbeat task list injection
        },
      },
    },
  },
}

Section catalogue

SectionMode typeContent
identityStandardAgent name, personality, and identity context
toolingGeneratedTool definitions and calling instructions — "compact" reduces detail, "names" lists only tool names
toolCallStyleStandardHow the agent should format and sequence tool calls
safetyStandardSafety and behaviour guidelines
cliQuickReferenceStandardSlash-command cheat sheet (/new, /reset, /model, etc.)
skillsGeneratedLoaded skill descriptions — "compact" condenses, "names" lists names only; progressive: true renders on demand
memoryStandardMemory read/write instructions
selfUpdateStandardSelf-update capability instructions
modelAliasesGeneratedModel name-to-provider alias mappings
workspaceStandardWorkspace directory and file layout
documentationStandardDocumentation access and usage instructions — disabled in lean/minimal presets
sandboxStandardSandbox mode restrictions and warnings
authorizedSendersStandardWho is authorised to give the agent instructions
timeStandardCurrent date and time
workspaceFilesNoticeStandardNotice about workspace file availability
replyTagsStandardReply formatting tag instructions
messagingStandardMessaging-specific formatting rules (disabled in minimal)
voiceStandardVoice mode formatting rules (disabled in minimal)
groupContextStandardGroup chat context and mention awareness
reactionsStandardReaction handling instructions (disabled in minimal)
reasoningFormatStandardReasoning and thinking format instructions
projectContextConfig objectProject context files — see Project context files
silentRepliesStandardWhen to suppress outbound replies (disabled in minimal)
heartbeatsStandardHeartbeat task list (injected during heartbeat runs)
runtimeRuntimeRuntime and model info — "minimal" trims detail; disabled in lean/minimal presets
Mode type key:
TypeAccepted values
Standard"default" | "off" | "prepend" | "append" | "replace"
Generated"default" | "compact" | "names" | "off"
Runtime"default" | "minimal" | "off"
Config objectProjectContextSectionConfig — see project context files section

Project context files

These files are read from the agent workspace directory and injected into the system prompt:
FileDefault modePurpose
AGENTS.mdinlineWorkspace context and session startup instructions
SOUL.mdinlineAgent personality and core values
IDENTITY.mdinline (max 4 000 chars)Agent name, creature, vibe, emoji, avatar
USER.mdmanifestUser profile — name, timezone, context
TOOLS.mdmanifestLocal environment notes — devices, SSH hosts
HEARTBEAT.mdrunKindPeriodic task list (injected during heartbeat runs only)
File mode values:
ModeEffect
"inline"Full file content injected into the prompt (bounded by maxChars if set)
"manifest"File path and size listed; content is not injected (avoids bloating the prompt for large files)
"runKind"Injected only during heartbeat-triggered runs, not during interactive chat
"off"File skipped entirely
Default per-file limit: 20 000 characters. Hard ceiling on total prompt source reads: 8 MiB. Missing optional files are silently skipped. Leave HEARTBEAT.md empty (or absent) to skip heartbeat API calls. To change a file’s mode, use the projectContext.files config:
{
  agents: {
    defaults: {
      systemPrompt: {
        sections: {
          projectContext: {
            files: {
              "SOUL.md": { mode: "off" },
              "TOOLS.md": { mode: "inline", maxChars: 2000 },
            },
          },
        },
      },
    },
  },
}

Prompt cache

The prompt is split into a stable (cached) region and a volatile region at build time. The cache boundary controls where the split happens:
{
  agents: {
    defaults: {
      systemPrompt: {
        cache: {
          boundary: "auto",   // "auto" (default) | "off"
        },
      },
    },
  },
}
"auto" lets the runtime choose the optimal cache boundary for the current provider. Set "off" to disable prompt caching entirely (increases token cost, may help debugging).

Injecting content from a plugin

Plugin authors can inject content into the system prompt at run time via the before_prompt_build lifecycle hook — without touching admin config. See Hooks for the hook API; the return value accepts systemPrompt (appended after the built sections) and prependContext (inserted before the user turn).