{
  "title": "System Prompt",
  "content": "OpenClaw builds a custom system prompt for every agent run. The prompt is **OpenClaw-owned** and does not use the p-coding-agent default prompt.\n\nThe prompt is assembled by OpenClaw and injected into each agent run.\n\nThe prompt is intentionally compact and uses fixed sections:\n\n* **Tooling**: current tool list + short descriptions.\n* **Safety**: short guardrail reminder to avoid power-seeking behavior or bypassing oversight.\n* **Skills** (when available): tells the model how to load skill instructions on demand.\n* **OpenClaw Self-Update**: how to run `config.apply` and `update.run`.\n* **Workspace**: working directory (`agents.defaults.workspace`).\n* **Documentation**: local path to OpenClaw docs (repo or npm package) and when to read them.\n* **Workspace Files (injected)**: indicates bootstrap files are included below.\n* **Sandbox** (when enabled): indicates sandboxed runtime, sandbox paths, and whether elevated exec is available.\n* **Current Date & Time**: user-local time, timezone, and time format.\n* **Reply Tags**: optional reply tag syntax for supported providers.\n* **Heartbeats**: heartbeat prompt and ack behavior.\n* **Runtime**: host, OS, node, model, repo root (when detected), thinking level (one line).\n* **Reasoning**: current visibility level + /reasoning toggle hint.\n\nSafety 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.\n\nOpenClaw can render smaller system prompts for sub-agents. The runtime sets a\n`promptMode` for each run (not a user-facing config):\n\n* `full` (default): includes all sections above.\n* `minimal`: used for sub-agents; omits **Skills**, **Memory Recall**, **OpenClaw\n  Self-Update**, **Model Aliases**, **User Identity**, **Reply Tags**,\n  **Messaging**, **Silent Replies**, and **Heartbeats**. Tooling, **Safety**,\n  Workspace, Sandbox, Current Date & Time (when known), Runtime, and injected\n  context stay available.\n* `none`: returns only the base identity line.\n\nWhen `promptMode=minimal`, extra injected prompts are labeled **Subagent\nContext** instead of **Group Chat Context**.\n\n## Workspace bootstrap injection\n\nBootstrap files are trimmed and appended under **Project Context** so the model sees identity and profile context without needing explicit reads:\n\n* `AGENTS.md`\n* `SOUL.md`\n* `TOOLS.md`\n* `IDENTITY.md`\n* `USER.md`\n* `HEARTBEAT.md`\n* `BOOTSTRAP.md` (only on brand-new workspaces)\n\nLarge files are truncated with a marker. The max per-file size is controlled by\n`agents.defaults.bootstrapMaxChars` (default: 20000). Missing files inject a\nshort missing-file marker.\n\nInternal hooks can intercept this step via `agent:bootstrap` to mutate or replace\nthe injected bootstrap files (for example swapping `SOUL.md` for an alternate persona).\n\nTo inspect how much each injected file contributes (raw vs injected, truncation, plus tool schema overhead), use `/context list` or `/context detail`. See [Context](/concepts/context).\n\nThe system prompt includes a dedicated **Current Date & Time** section when the\nuser timezone is known. To keep the prompt cache-stable, it now only includes\nthe **time zone** (no dynamic clock or time format).\n\nUse `session_status` when the agent needs the current time; the status card\nincludes a timestamp line.\n\n* `agents.defaults.userTimezone`\n* `agents.defaults.timeFormat` (`auto` | `12` | `24`)\n\nSee [Date & Time](/date-time) for full behavior details.\n\nWhen eligible skills exist, OpenClaw injects a compact **available skills list**\n(`formatSkillsForPrompt`) that includes the **file path** for each skill. The\nprompt instructs the model to use `read` to load the SKILL.md at the listed\nlocation (workspace, managed, or bundled). If no skills are eligible, the\nSkills section is omitted.\n\nThis keeps the base prompt small while still enabling targeted skill usage.\n\nWhen available, the system prompt includes a **Documentation** section that points to the\nlocal OpenClaw docs directory (either `docs/` in the repo workspace or the bundled npm\npackage docs) and also notes the public mirror, source repo, community Discord, and\nClawHub ([https://clawhub.com](https://clawhub.com)) for skills discovery. The prompt instructs the model to consult local docs first\nfor OpenClaw behavior, commands, configuration, or architecture, and to run\n`openclaw status` itself when possible (asking the user only when it lacks access).",
  "code_samples": [
    {
      "code": "<available_skills>\n  <skill>\n    <name>...</name>\n    <description>...</description>\n    <location>...</location>\n  </skill>\n</available_skills>",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h2",
      "text": "Structure",
      "id": "structure"
    },
    {
      "level": "h2",
      "text": "Prompt modes",
      "id": "prompt-modes"
    },
    {
      "level": "h2",
      "text": "Workspace bootstrap injection",
      "id": "workspace-bootstrap-injection"
    },
    {
      "level": "h2",
      "text": "Time handling",
      "id": "time-handling"
    },
    {
      "level": "h2",
      "text": "Skills",
      "id": "skills"
    },
    {
      "level": "h2",
      "text": "Documentation",
      "id": "documentation"
    }
  ],
  "url": "llms-txt#system-prompt",
  "links": []
}