Expand description
The environment data a system-prompt template renders, and the built-in default template that renders it.
The runtime exposes what it knows as data and the shape lives in a template, so the same knobs an operator has (loops, conditions, limits, field access) are the ones the built-in default uses. Nothing the default renders is reachable only from Rust.
§The ordering is a cache decision, not a taste one
Providers cache on the literal prefix of a request, so a section that changes between turns invalidates the cache for everything after it. The default template is therefore ordered by VOLATILITY:
- persona + instruction — change only on reload
- workflows, services, streams, subagent templates — configuration
- skills catalogue — configuration, plus per-context bodies
- peers, signals, memory — live state, changing turn to turn
A custom template that puts {{#each signals.waiting}} near the top will
still work; it will just miss the cache on most turns, which on a busy
instance is real money.
Constants§
- DEFAULT_
TEMPLATE - The built-in template. It is written in the same language an operator
gets, and
agentd --context-templateprints it — so overriding starts from a copy rather than from a guess.