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. Slots only change the edges of the system prompt: the runtime contract, the repository-tool contract, and the safety boundaries are always kept, so core tool behavior (reading, writing, running commands) is preserved.

There are five text slots (Node.js / Python names shown; Rust uses the SystemPromptSlots::with_* builders and Go uses the PromptSlots fields):

SlotEffect on the system prompt
role / roleReplaces the default identity line.
guidelines / guidelinesAdded to the Guidelines section.
responseStyle / response_styleReplaces the default Response Format section.
outputLanguage / output_languagePins user-facing replies to a BCP-47 tag such as zh-CN.
extra / extraAppended verbatim at the end.

Rust's SystemPromptSlots also has with_style, which forces one of the built-in prompt styles.

Basic usage

Set any subset of the slots when you open a session. They apply to every turn of that session.

Rust
Node.js
Python
Go
Rust
use a3s_code_core::{Agent, SessionOptions, SystemPromptSlots};
#[tokio::main]
async fn main() -> a3s_code_core::Result<()> {
let agent = Agent::new("agent.acl").await?;
let slots = SystemPromptSlots::default()
.with_role("release-readiness reviewer")
.with_guidelines(
"Find blockers before improvements. Require command evidence for done claims.",
)
.with_response_style("concise, findings first");
let session = agent
.session_builder("/repo")
.options(SessionOptions::new().with_prompt_slots(slots))
.build()
.await?;
let result = session.send("Is this repo ready to ship?", None).await?;
println!("{}", result.text);
session.close().await;
agent.close().await;
Ok(())
}

Each slot in turn

The 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.

Rust
Node.js
Python
Go

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 sdk/node/examples/skills/test_prompt_slots.ts.