Prompt ng Sistema¶
Bumubuo ang OpenClaw ng isang custom system prompt para sa bawat agent run. Ang prompt ay pagmamay-ari ng OpenClaw at hindi gumagamit ng default prompt ng p-coding-agent.
Ang prompt ay binubuo ng OpenClaw at ini-inject sa bawat agent run.
Estruktura¶
Ang prompt ay sinadyang compact at gumagamit ng mga fixed na seksyon:
- Tooling: kasalukuyang listahan ng tools + maiikling paglalarawan.
- Safety: maikling paalala ng guardrail para iwasan ang power-seeking behavior o pag-bypass ng oversight.
- Skills (kapag available): nagsasabi sa model kung paano i-load ang mga instruksyon ng skill on demand.
- OpenClaw Self-Update: kung paano patakbuhin ang
config.applyatupdate.run. - Workspace: gumaganang direktoryo (
agents.defaults.workspace). - Documentation: lokal na path papunta sa OpenClaw docs (repo o npm package) at kung kailan ito babasahin.
- Workspace Files (injected): nagpapahiwatig na ang mga bootstrap file ay kasama sa ibaba.
- Sandbox (kapag naka-enable): nagpapahiwatig ng sandboxed runtime, mga sandbox path, at kung available ang elevated exec.
- Current Date & Time: oras na lokal sa user, timezone, at time format.
- Reply Tags: opsyonal na reply tag syntax para sa mga suportadong provider.
- Heartbeats: heartbeat prompt at ack behavior.
- Runtime: host, OS, node, model, repo root (kapag na-detect), thinking level (isang linya).
- Reasoning: kasalukuyang antas ng visibility + hint para sa /reasoning toggle.
Ang mga safety guardrail sa system prompt ay gabay lamang. Ginagabayan nila ang asal ng modelo ngunit hindi sila nagpapatupad ng patakaran. Gumamit ng tool policy, exec approvals, sandboxing, at mga allowlist ng channel para sa mahigpit na pagpapatupad; maaaring i-disable ang mga ito ng mga operator ayon sa disenyo.
Mga mode ng Prompt¶
Maaaring mag-render ang OpenClaw ng mas maliliit na system prompt para sa mga sub-agent. Itinatakda ng runtime ang isang
promptMode for each run (not a user-facing config):
full(default): kasama ang lahat ng seksyon sa itaas.minimal: ginagamit para sa mga sub-agent; inaalis ang Skills, Memory Recall, OpenClaw Self-Update, Model Aliases, User Identity, Reply Tags, Messaging, Silent Replies, and Heartbeats. Tooling, Safety, Workspace, Sandbox, Current Date & Time (when known), Runtime, and injected context stay available.none: ibinabalik lamang ang base identity line.
Kapag promptMode=minimal, ang mga extra na injected prompt ay nilalabel bilang Subagent
Context sa halip na Group Chat Context.
Pag-inject ng bootstrap sa Workspace¶
Ang mga bootstrap file ay tine-trim at idinadagdag sa ilalim ng Project Context para makita ng model ang identity at profile context nang hindi na nangangailangan ng tahasang pagbasa:
AGENTS.mdSOUL.mdTOOLS.mdIDENTITY.mdUSER.mdHEARTBEAT.mdBOOTSTRAP.md(para lamang sa mga bagong-bagong workspace)
Large files are truncated with a marker. The max per-file size is controlled by
agents.defaults.bootstrapMaxChars (default: 20000). Missing files inject a
short missing-file marker.
Maaaring saluhin ng mga internal hook ang hakbang na ito sa pamamagitan ng agent:bootstrap para baguhin o palitan
ang mga injected na bootstrap file (halimbawa, pagpapalit ng SOUL.md ng alternatibong persona).
To inspect how much each injected file contributes (raw vs injected, truncation, plus tool schema overhead), use /context list or /context detail. See Context.
Time handling¶
The 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).
Gamitin ang session_status kapag kailangan ng agent ang kasalukuyang oras; kasama sa status card
ang isang timestamp line.
I-configure gamit ang:
agents.defaults.userTimezoneagents.defaults.timeFormat(auto|12|24)
Tingnan ang Date & Time para sa kumpletong detalye ng behavior.
Skills¶
When eligible skills exist, OpenClaw injects a compact available skills list
(formatSkillsForPrompt) that includes the file path for each skill. The
prompt instructs the model to use read to load the SKILL.md at the listed
location (workspace, managed, or bundled). If no skills are eligible, the
Skills section is omitted.
<available_skills>
<skill>
<name>...</name>
<description>...</description>
<location>...</location>
</skill>
</available_skills>
Pinananatiling maliit nito ang base prompt habang pinapagana pa rin ang target na paggamit ng skill.
Documentation¶
When available, the system prompt includes a Documentation section that points to the
local OpenClaw docs directory (either docs/ in the repo workspace or the bundled npm
package docs) and also notes the public mirror, source repo, community Discord, and
ClawHub (https://clawhub.com) for skills discovery. The prompt instructs the model to consult local docs first
for OpenClaw behavior, commands, configuration, or architecture, and to run
openclaw status itself when possible (asking the user only when it lacks access).