chore(sync): mirror docs from openclaw/openclaw@760c4be438

This commit is contained in:
openclaw-docs-sync[bot] 2026-04-05 13:06:30 +00:00
parent 6010b2df0a
commit 155fafe7f9
3 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{
"repository": "openclaw/openclaw",
"sha": "987f4bba803b407c2dedeceed978b54b55332c53",
"syncedAt": "2026-04-05T12:31:51.414Z"
"sha": "760c4be438fad2da2e2678c345ee7399b40c0b74",
"syncedAt": "2026-04-05T13:06:30.048Z"
}

View File

@ -12,6 +12,18 @@ OpenClaw builds a custom system prompt for every agent run. The prompt is **Open
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:
- replace a small set of 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
Use provider-owned contributions for model-family-specific tuning. Keep legacy
`before_prompt_build` prompt mutation for compatibility or truly global prompt
changes, not normal provider behavior.
## Structure
The prompt is intentionally compact and uses fixed sections:

View File

@ -513,6 +513,13 @@ API key auth, and dynamic model resolution.
| 42 | `validateReplayTurns` | Strict replay-turn validation before the embedded runner |
| 43 | `onModelSelected` | Post-selection callback (e.g. telemetry) |
Prompt tuning note:
- `resolveSystemPromptContribution` lets a provider inject cache-aware
system-prompt guidance for a model family. Prefer it over
`before_prompt_build` when the behavior belongs to one provider/model
family and should preserve the stable/dynamic cache split.
For detailed descriptions and real-world examples, see
[Internals: Provider Runtime Hooks](/plugins/architecture#provider-runtime-hooks).
</Accordion>