Prompt System
AgentFlow standardizes model-visible context around four names:| Name | What it is | Examples |
|---|---|---|
prompt_blocks | Reusable prompt/context definitions, plus inline request-time blocks | role, tool_guidance, crm_context, available_skills, selected_account |
system_context | Hidden model-only context attached to the current user turn | resolved mentions, KB snippets, attachments, page/selection context, inline turn blocks |
system_reminders | Hidden current-turn reminders supplied by the system | automatic archival memory recall, bounded current-run reminders |
system_events | Durable system-authored facts/actions between turns | artifact actions, artifact summaries, conversation compaction notices |
Assembly Diagram
Recommended assembly order:- Cached system conversation prompt blocks
- Conversation history, including prior hidden context and system events
- Active user text plus hidden current-turn
system_contextandsystem_reminders
Prompt Blocks
A prompt block is the developer-facing primitive for reusable prompt text.body. Dynamic blocks are local AgentFlow functions that return body text at runtime. Inline blocks are request-time bodies supplied by an SDK/client.
AgentFlow validates, wraps, caches, orders, and injects the rendered body:
body for prompt text. Do not use content, template, source, kind, remote renderer URLs, or uploaded code bundles.
Placement
message controls where the block is injected:
message | Placement |
|---|---|
system | System message |
user | Active user-message envelope |
scope controls cadence:
scope | Cadence |
|---|---|
conversation | Stable conversation/session context |
turn | Current model request |
mode controls freshness:
mode | Behavior |
|---|---|
cached | Cache when eligible |
real_time | Build for the current request |
message="system", scope="conversation", mode="cached". Most current-screen or selected-record context is message="user", scope="turn", mode="real_time".
System Context
system_context is hidden context for the model, attached to a user turn. It is not the user’s visible message.
Examples:
context_refs, KB retrieval snippets, attachments, page/selection context, and inline turn prompt blocks. It persists with the turn for replay, but normal chat UIs should render conversation_parts.content, not the hidden model input.
System Reminders
Thesystem_reminders envelope holds hidden current-turn context that should read like reminders from the system rather than evidence or source material.
Example:
memory_policy.archival_mode="auto". Core memory remains a cached conversation prompt block; explicit memory-tool results remain tool results.
System Events
system_events are durable system-authored facts that happened between user turns. They are part of conversation history and should replay on future turns.
Examples:
Progressive Disclosure
Catalog prompt blocks should introduce what is available without loading full content:| Catalog | Prompt block |
|---|---|
| Knowledge bases | available_knowledge_bases |
| Skills | available_skills |
| Artifacts | available_artifacts |
| Future assets/files | available_assets or available_files |
| Future memory | memory index/catalog block |

