You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/(core)/prompts.mdx
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,22 @@ The channel system prompt is the most complex, assembled from multiple dynamic c
124
124
125
125
{{ worker_capabilities }}
126
126
127
+
{{ system_prompt_cache_boundary }}
128
+
129
+
{%- if available_channels %}
130
+
{{ available_channels }}
131
+
{%- endif %}
132
+
133
+
{%- if working_memory %}
134
+
{{ working_memory }}
135
+
{%- endif %}
136
+
137
+
{%- if knowledge_synthesis %}
138
+
## Knowledge Context
139
+
140
+
{{ knowledge_synthesis }}
141
+
{%- endif %}
142
+
127
143
{%- if conversation_context %}
128
144
## Conversation Context
129
145
@@ -137,6 +153,35 @@ The channel system prompt is the most complex, assembled from multiple dynamic c
137
153
{%- endif %}
138
154
```
139
155
156
+
## Prompt Cache Boundary
157
+
158
+
The channel prompt includes a cache boundary after the stable instruction prefix and before volatile runtime context. Anthropic requests split the system prompt at that marker. The stable prefix receives `cache_control`. Status, working memory, knowledge context, channel activity, and conversation context do not.
159
+
160
+
Other providers strip the marker before sending instructions.
161
+
162
+
Keep stable sections above the boundary:
163
+
164
+
- identity context
165
+
- base channel rules
166
+
- adapter guidance
167
+
- skills
168
+
- worker capabilities
169
+
170
+
Keep volatile sections below it:
171
+
172
+
- available channels
173
+
- org and project context
174
+
- working memory
175
+
- channel activity
176
+
- participant context
177
+
- knowledge context
178
+
- conversation context
179
+
- current status
180
+
- message coalescing hints
181
+
- backfilled transcript data
182
+
183
+
The `token_usage` table records `cache_read_tokens` and `cache_write_tokens`. Use those fields to check whether prompt-cache changes are paying off.
0 commit comments