Prompt Slots
Prompt slots are session options that shape the agent's system prompt declaratively. Use them for host-level behavior — persona, coding standards, output style — that should not live inside each user prompt. The slots layer on top of the agent's built-in instructions, so core tool behavior (reading, writing, running commands) is preserved.
There are four slots:
Basic usage
Set any subset of the slots when you open a session. They apply to every turn of that session.
Each slot in turn
The four slots compose independently. A persona-only session, a reviewer with strict guidelines, and a session that appends a freeform instruction all use the same option set.
Slots customize personality and house rules; they do not disable tools or change the
agent's core loop. Keep task-specific requests in the send message and reserve the slots
for behavior that should hold across every turn of the session.
A runnable version ships at crates/code/sdk/node/examples/skills/test_prompt_slots.ts.