From 155fafe7f9eb7900b2e561972798bfff96be6a88 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Sun, 5 Apr 2026 13:06:30 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@760c4be438fad2da2e2678c345ee7399b40c0b74 --- .openclaw-sync/source.json | 4 ++-- docs/concepts/system-prompt.md | 12 ++++++++++++ docs/plugins/sdk-provider-plugins.md | 7 +++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 1ec580da2..0029b476b 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -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" } diff --git a/docs/concepts/system-prompt.md b/docs/concepts/system-prompt.md index 246244478..7a9136877 100644 --- a/docs/concepts/system-prompt.md +++ b/docs/concepts/system-prompt.md @@ -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: diff --git a/docs/plugins/sdk-provider-plugins.md b/docs/plugins/sdk-provider-plugins.md index af2a2ff79..a951ec44d 100644 --- a/docs/plugins/sdk-provider-plugins.md +++ b/docs/plugins/sdk-provider-plugins.md @@ -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).