pub struct CreateSessionRequest {
pub model: String,
pub prompt: ContentInput,
pub render_metadata: Option<RenderMetadata>,
pub system_prompt: Option<String>,
pub max_tokens: Option<u32>,
pub event_tx: Option<Sender<EventEnvelope<AgentEvent>>>,
pub skill_references: Option<Vec<SkillKey>>,
pub initial_turn: InitialTurnPolicy,
pub deferred_prompt_policy: DeferredPromptPolicy,
pub build: Option<SessionBuildOptions>,
pub labels: Option<BTreeMap<String, String>>,
}Expand description
Request to create a new session and run the first turn.
Fields§
§model: StringModel name (e.g. “claude-opus-4-6”).
prompt: ContentInputInitial user prompt (text or multimodal).
render_metadata: Option<RenderMetadata>Optional normalized rendering metadata for the initial prompt.
system_prompt: Option<String>Optional system prompt override.
max_tokens: Option<u32>Max tokens per LLM turn.
event_tx: Option<Sender<EventEnvelope<AgentEvent>>>Channel for streaming events during the turn.
skill_references: Option<Vec<SkillKey>>Canonical SkillKeys to resolve and inject for the first turn.
initial_turn: InitialTurnPolicyInitial turn behavior for this session creation call.
deferred_prompt_policy: DeferredPromptPolicyHow to treat prompt when initial_turn == Defer.
build: Option<SessionBuildOptions>Optional extended build options for factory-backed builders.
labels: Option<BTreeMap<String, String>>Optional key-value labels attached at session creation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CreateSessionRequest
impl !RefUnwindSafe for CreateSessionRequest
impl Send for CreateSessionRequest
impl Sync for CreateSessionRequest
impl Unpin for CreateSessionRequest
impl UnsafeUnpin for CreateSessionRequest
impl !UnwindSafe for CreateSessionRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more