feat(agents): add provider-owned system prompt contributions

This commit is contained in:
Peter Steinberger
2026-04-05 14:05:35 +01:00
parent 1a7c2a9bc8
commit 760c4be438
15 changed files with 413 additions and 59 deletions

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: