System prompt
기준일: 2026-07-26
공식 기준: System prompt
System prompt 문서는 OpenClaw 공식 문서(concepts/system-prompt)를 한국어로 정리한 가이드입니다. What the OpenClaw system prompt contains and how it is assembled 명령·설정 키·코드 예시는 공식 문서를 그대로 보존하며, 해석과 절차 안내는 한국어로 제공합니다. 최종 동작은 설치된 CLI 버전과 공식 원문을 확인하세요.
핵심 요약
What the OpenClaw system prompt contains and how it is assembled
한국어 가이드 범위: concepts/system-prompt 경로의 설정·명령·제약·예시를 학습용으로 재구성합니다.
문서 구성
공식 문서의 주요 섹션은 다음과 같습니다.
- Structure
- Prompt modes
- Prompt snapshots
- Workspace bootstrap injection
- Time handling
- Skills
- Documentation
- 관련 문서
상세 내용
본문
OpenClaw builds its own system prompt for every agent run; there is no runtime default prompt.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
buildAgentSystemPromptrenders the prompt from explicit inputs. It stays a pure renderer and does not read global config directly.resolveAgentSystemPromptConfigresolves config-backed prompt knobs (owner display, TTS hints, model aliases, memory citation mode, sub-agent delegation mode) for a specific agent.- Runtime adapters (embedded, CLI, command/export previews, compaction) gather live facts (tools, sandbox state, channel capabilities, context files, provider prompt contributions) and call the configured prompt facade.
- replace one of three named core sections:
interaction_style,tool_call_style,execution_bias - inject a stable prefix above the prompt cache boundary
- inject a dynamic suffix below the prompt cache boundary
Structure
The prompt is compact, with fixed sections:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- Tooling: structured-tool source-of-truth reminder plus runtime tool-use guidance. When the experimental
update_plantool is enabled (tools.experimental.planTool), its own tool description adds: use it only for non-trivial multi-step work, keep at most one stepin_progress, and skip it for simple one-step work. - Execution Bias: act in-turn on actionable requests, continue until done or blocked, recover from weak tool results, check mutable state live, and verify before finalizing.
- Safety: short guardrail reminder against power-seeking behavior or bypassing oversight.
- Skills (when available): tells the model how to load skill instructions on demand.
- OpenClaw Control: prefer the
gatewaytool for config/restart work; do not invent CLI commands. - OpenClaw Self-Update: inspect config safely with
config.schema.lookup, patch withconfig.patch, replace the full config withconfig.apply, and runupdate.runonly on explicit user request. The agent-facinggatewaytool refuses to rewritetools.exec.mode. - Workspace: working directory (
agents.defaults.workspace). - Documentation: local docs/source path and when to read them.
- Workspace Files (injected): notes that bootstrap files are included below.
- Sandbox (when enabled): sandboxed runtime, sandbox paths, elevated-exec availability.
- Current Date & Time: time zone only (cache-stable; the live clock comes from
session_status). - Assistant Output Directives: compact attachment, voice-note, and reply-tag syntax.
- Heartbeats: heartbeat prompt and ack behavior, when heartbeats are enabled for the default agent.
- Runtime: host, OS, node, model, repo root (when detected), thinking level (one line).
- Reasoning: current visibility level plus the
/reasoningtoggle hint. - use cron for future follow-up (
check back later, reminders, recurring work) instead ofexecsleep loops,yieldMsdelay tricks, or repeatedprocesspolling - use
exec/processonly for commands that start now and continue in the background - when automatic completion wake is enabled, start the command once and rely on the push-based wake path
- use
processfor logs, status, input, or intervention on a running command - for larger tasks, prefer
sessions_spawn; sub-agent completion is push-based and auto-announces back to the requester - do not poll
subagents list/sessions_listin a loop just to wait for completion
Prompt modes
OpenClaw renders smaller system prompts for sub-agents. The runtime sets a promptMode per run (not user-facing config):
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
full(default): all sections above.minimal: used for sub-agents; omits the memory prompt section (bundled as Memory Recall), OpenClaw Self-Update, Model Aliases, User Identity, Assistant Output Directives, Messaging, Silent Replies, and Heartbeats. Tooling, Safety, Skills (when supplied), Workspace, Sandbox, Current Date & Time (when known), Runtime, and injected context stay available.none: returns only the base identity line.
Prompt snapshots
OpenClaw keeps committed prompt snapshots for the Codex runtime happy path under test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/. They render selected app-server thread/turn params plus a reconstructed model-bound prompt layer stack for Telegram direct, Discord group, and heartbeat turns: a pinned Codex gpt-5.5 model prompt fixture, the Codex happy-path permission developer text, OpenClaw developer instructions, turn-scoped collaboration-mode instructions when OpenClaw provides them, user turn input, and references to dynamic tool specs.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
Workspace bootstrap injection
Bootstrap files are resolved from the active workspace and routed to the prompt surface matching their lifetime:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
AGENTS.mdSOUL.mdTOOLS.mdIDENTITY.mdUSER.mdHEARTBEAT.mdBOOTSTRAP.md(only on brand-new workspaces)MEMORY.mdwhen present
| Limit | Config key | Default |
|---|---|---|
| Per-file max characters | agents.defaults.bootstrapMaxChars |
20000 |
| Total across all files | agents.defaults.bootstrapTotalMaxChars |
60000 |
Truncation warning (off|once|always) |
agents.defaults.bootstrapPromptTruncationWarning |
always |
Time handling
The Current Date & Time section appears only when the user timezone is known, and only includes the time zone (no dynamic clock or time format) to keep the prompt cache-stable.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
agents.defaults.userTimezoneagents.defaults.timeFormat(auto|12|24)
Skills
When eligible skills exist, OpenClaw injects a compact list (`formatSkillsForPrompt`) with the **file path** and a content-derived `sha256:...` marker per skill. The prompt instructs the model to use `read` to load the SKILL.md at the listed location (workspace, managed, or bundled), and to re-read a skill when its differs from a previous turn. If no skills are eligible, the Skills section is omitted.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
| Scope | Skills prompt budget | Runtime excerpt budget |
|---|---|---|
| Global | skills.limits.maxSkillsPromptChars |
agents.defaults.contextLimits.* |
| Per-agent | agents.entries.*.skillsLimits.maxSkillsPromptChars |
agents.entries.*.contextLimits.* |
<available_skills>
<skill>
<name>...</name>
<description>...</description>
<location>...</location>
<version>sha256:...</version>
</skill>
</available_skills>
Documentation
The Documentation section points to local docs when available (docs/ in a Git checkout or the bundled npm package docs), falling back to https://docs.openclaw.ai otherwise. It also lists the OpenClaw source location: Git checkouts expose the local source root, package installs get the GitHub source URL with instructions to review source there when docs are incomplete or stale.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
관련 문서
주요 항목:
- Agent runtime
- Agent workspace
- Context engine
실습 체크리스트
- 공식 문서와 로컬 버전을 대조합니다:
https://docs.openclaw.ai/concepts/system-prompt - 관련 CLI는
openclaw --help및 하위 명령--help로 옵션을 확인합니다. - 설정 변경 시
openclaw config/openclaw doctor로 유효성을 검사합니다. - Gateway·채널·플러그인 변경 후에는 필요 시 Gateway를 재시작합니다.
자주 쓰는 명령·설정 예시
<available_skills>
<skill>
<name>...</name>
<description>...</description>
<location>...</location>
<version>sha256:...</version>
</skill>
</available_skills>
관련 링크
이 가이드는 공식 문서를 한국어 학습용으로 재구성한 것입니다. 옵션 기본값·플래그 이름은 설치 버전에 따라 달라질 수 있습니다.