Overview
Every time the main agent is invoked, the runtime compiles a system prompt from up to 15 sections. Most sections are automatic — the runtime builds them from env state, loaded plugins, and live session data. You are only responsible for three fields inconfig.prompt. Everything else is handled for you.
The 15 sections
Sections appear in this fixed order. “Always present” means the section is included on every turn regardless of configuration; “conditional” means the section only appears when a specific condition is met.| # | Section | Present |
|---|---|---|
| 1 | Oracle section — identity preamble | Always |
| 2 | Capabilities note — config.prompt.capabilities text | Conditional |
| 3 | Capability block — Tier-1 plugin manifest list | Conditional |
| 4 | Operating principles — 7 standard bullets + optional style | Always |
| 5 | Working with files — file-handling guidance | Always |
| 6 | What you know about the user — memory context (6 slots) | Conditional |
| 7 | Current time — {currentTime} ({timezone}) | Always |
| 8 | Current entity — {DID} | Conditional |
| 9 | Available user secrets | Conditional |
| 10 | User preferences | Conditional |
| 11 | Operational mode — general / editor / task / entity | Always |
| 12 | Composio context — Composio tool context | Conditional |
| 13 | Editor section — editor plugin state | Conditional |
| 14 | Slack formatting constraints — Slack output rules | Conditional |
| 15 | Degraded services — failed-init notices | Conditional |
Section details
1. Oracle section The identity preamble. Ifconfig.prompt.opening is set, it is used verbatim. Otherwise the runtime generates a fallback from the other top-level fields: "You are {name}, an AI agent operated by {org}. {description}." (shorter variants when org or description are absent). See the createOracleApp config reference for the exact fallback logic.
2. Capabilities note
Rendered if config.prompt.capabilities is non-empty. Appears immediately above the plugin capability block. No header is added by the runtime — include your own heading in the field value if you want one.
3. Capability block
Auto-generated list of all loaded plugins with visibility='always' (Tier-1). Each entry includes the plugin name and its manifest description. The runtime enforces a 5,000-token soft budget on this block — if the combined manifest text would exceed that, lower-priority entries are trimmed. You never write this section; the runtime builds it from the loaded plugin set.
4. Operating principles
Always present. Contains 7 hardcoded bullets covering tool use, safety, honesty, and task handling. If config.prompt.communicationStyle is non-empty, it is injected here as an additional paragraph after those bullets. If communicationStyle is absent, the section still appears — just without the custom style block.
5. Working with files
Always present. Hardcoded guidance on how the agent should handle file uploads, attachments, and generated file output.
6. What you know about the user
Conditional on the memory plugin being loaded and at least one context slot being populated. Contains up to 6 slots fetched by UserContextFetcher before the agent is compiled: identity, work, goals, interests, relationships, recent. See How memory reaches the prompt for the pre-fetch details.
7. Current time
Always present. Stamped at agent-compile time with the user’s wall-clock time and resolved timezone.
8. Current entity
Conditional on state.currentEntityDid being set in the agent state. Surfaces the active entity DID so the agent can route entity-aware tool calls correctly.
9. Available user secrets
Conditional on the secrets service having entries for the current user. Lists secret names (not values) so the agent can reference them by name in tool calls.
10. User preferences
Conditional on the user-preferences plugin being loaded and the user having saved preferences. May include agentName, language, tone, formality, and customInstructions.
11. Operational mode
Always present, but content varies. The runtime selects one of four mode descriptions — general, editor, task, or entity — based on which plugins are active and the current session state.
12. Composio context
Conditional on the Composio plugin loading successfully. Auto-injected Composio account and connection context so the agent knows which third-party integrations are available for the current user.
13. Editor section
Conditional on the editor plugin being active in the current session. Describes the active document, cursor position, and editor affordances.
14. Slack formatting constraints
Conditional on the session client being Slack. Appends Slack-specific formatting rules to prevent the agent from using markdown that Slack does not render correctly (e.g. tables).
15. Degraded services
Appended after the main prompt when one or more plugins fail their init. Lists the failed services and tells the agent not to attempt their tools for this turn.
The 5,000-token capability block budget
Section 3 (the Tier-1 capability block) is the only section subject to a token budget. If the combined manifest text of allvisibility='always' plugins exceeds 5,000 tokens, the runtime trims lower-priority plugins from the block. The trimmed plugins are still loaded and their tools are still callable — they simply don’t appear in the capability summary at the top of the prompt. To keep a plugin’s description in the block reliably, keep its manifest description concise.
What you actually need to write in config.ts
Only three things — all optional:| Field | What to write | What happens if you skip it |
|---|---|---|
config.prompt.opening | A paragraph describing the oracle’s identity, purpose, and domain expertise. | Runtime generates a generic fallback from name, org, description. |
config.prompt.communicationStyle | One or two paragraphs on tone, vocabulary, and response style. | The operating-principles section appears without a custom style block. |
config.prompt.capabilities | A short section (with your own heading) listing what the oracle can do. | The capability-notes section is omitted; only the auto-generated plugin list appears. |
config.ts, instruct the agent to fetch them, or account for them in your opening paragraph.
Minimal config.ts example
Related
createOracleApp config
Full reference for config.prompt fields and fallback logic.
Memory plugin
How UserContextFetcher pre-loads memory into section 6.
Visibility tiers
What controls which plugins appear in the capability block.
Plugin anatomy
How plugins declare the manifest text that feeds section 3.