Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
OpenClaw builds a custom system prompt for every agent run. The prompt is OpenClaw-owned and does not use the pi-coding-agent default prompt.
The prompt is assembled by OpenClaw and injected into each agent run.
Provider plugins can contribute cache-aware prompt guidance without replacing the full OpenClaw-owned prompt. The provider runtime can:
interaction_styletool_call_styleexecution_biasUse provider-owned contributions for model-family-specific tuning. Keep legacy
before_prompt_buildThe OpenAI GPT-5 family overlay keeps the core execution rule small and adds model-specific guidance for persona latching, concise output, tool discipline, parallel lookup, deliverable coverage, verification, missing context, and terminal-tool hygiene.
The prompt is intentionally compact and uses fixed sections:
config.schema.lookupconfig.patchconfig.applyupdate.rungatewaytools.exec.asktools.exec.securitytools.bash.*agents.defaults.workspaceOpenClaw keeps large stable content, including Project Context, above the internal prompt cache boundary. Volatile channel/session sections such as Control UI embed guidance, Messaging, Voice, Group Chat Context, Reactions, Heartbeats, and Runtime are appended below that boundary so local backends with prefix caches can reuse the stable workspace prefix across channel turns. Tool descriptions should likewise avoid embedding current channel names when the accepted schema already carries that runtime detail.
The Tooling section also includes runtime guidance for long-running work:
check back laterexecyieldMsprocessexecprocessprocesssessions_spawnsubagents listsessions_listWhen the experimental
update_planin_progressSafety guardrails in the system prompt are advisory. They guide model behavior but do not enforce policy. Use tool policy, exec approvals, sandboxing, and channel allowlists for hard enforcement; operators can disable these by design.
On channels with native approval cards/buttons, the runtime prompt now tells the agent to rely on that native approval UI first. It should only include a manual
/approveOpenClaw can render smaller system prompts for sub-agents. The runtime sets a
promptModefullminimalnoneWhen
promptMode=minimalFor channel auto-reply runs, OpenClaw can omit the generic Silent Replies section when the direct/group chat context already includes the resolved conversation-specific
NO_REPLYBootstrap files are trimmed and appended under Project Context so the model sees identity and profile context without needing explicit reads:
AGENTS.mdSOUL.mdTOOLS.mdIDENTITY.mdUSER.mdHEARTBEAT.mdBOOTSTRAP.mdMEMORY.mdAll of these files are injected into the context window on every turn unless a file-specific gate applies.
HEARTBEAT.mdagents.defaults.heartbeat.includeSystemPromptSectionMEMORY.mdLarge files are truncated with a marker. The max per-file size is controlled by
agents.defaults.bootstrapMaxCharsagents.defaults.bootstrapTotalMaxCharsagents.defaults.bootstrapPromptTruncationWarningoffoncealwaysonceSub-agent sessions only inject
AGENTS.mdTOOLS.mdInternal hooks can intercept this step via
agent:bootstrapSOUL.mdIf you want to make the agent sound less generic, start with SOUL.md Personality Guide.
To inspect how much each injected file contributes (raw vs injected, truncation, plus tool schema overhead), use
/context list/context detailThe system prompt includes a dedicated Current Date & Time section when the user timezone is known. To keep the prompt cache-stable, it now only includes the time zone (no dynamic clock or time format).
Use
session_statusmodel=defaultConfigure with:
agents.defaults.userTimezoneagents.defaults.timeFormatauto1224See Date & Time for full behavior details.
When eligible skills exist, OpenClaw injects a compact available skills list (
formatSkillsForPromptreadEligibility includes skill metadata gates, runtime environment/config checks, and the effective agent skill allowlist when
agents.defaults.skillsagents.list[].skillsPlugin-bundled skills are eligible only when their owning plugin is enabled. This lets tool plugins expose deeper operating guides without embedding all of that guidance directly in every tool description.
text<available_skills> <skill> <name>...</name> <description>...</description> <location>...</location> </skill> </available_skills>
This keeps the base prompt small while still enabling targeted skill usage.
The skills list budget is owned by the skills subsystem:
skills.limits.maxSkillsPromptCharsagents.list[].skillsLimits.maxSkillsPromptCharsGeneric bounded runtime excerpts use a different surface:
agents.defaults.contextLimits.*agents.list[].contextLimits.*That split keeps skills sizing separate from runtime read/injection sizing such as
memory_getThe system prompt includes a Documentation section. When local docs are available, it points to the local OpenClaw docs directory (
docs/The same section also includes the OpenClaw source location. Git checkouts expose the local source root so the agent can inspect code directly. Package installs include the GitHub source URL and tell the agent to review source there whenever the docs are incomplete or stale. The prompt also notes the public docs mirror, community Discord, and ClawHub (https://clawhub.ai) for skills discovery. It tells the model to consult docs first for OpenClaw behavior, commands, configuration, or architecture, and to run
openclaw statusgatewayconfig.schema.lookupdocs/gateway/configuration.mddocs/gateway/configuration-reference.md© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine