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:

SlotPurpose
role / roleThe persona the agent adopts.
guidelines / guidelinesStandards and rules the agent must follow.
responseStyle / response_styleHow the agent should format its replies.
extra / extraFreeform instructions appended verbatim.

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

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.