pub struct RunRequest {
pub run_id: RunId,
pub session_id: Option<SessionId>,
pub turn_id: Option<TurnId>,
pub agent_id: AgentId,
pub source: SourceRef,
pub input: String,
pub output_contract: Option<OutputContract>,
}Expand description
Holds run request application-layer state or configuration. Use it with the documented coordinator methods; run, journal, event, provider, or port effects are called out on those methods rather than on construction.
Fields§
§run_id: RunIdRun identifier used for lineage, filtering, replay, and dedupe.
session_id: Option<SessionId>Optional host-provided session identifier for grouping related turns. When present, the runtime copies it into journal and event envelopes.
turn_id: Option<TurnId>Optional host-provided turn identifier for the user message or loop turn this run answers. When absent, the runtime may derive a deterministic turn id for traceability.
agent_id: AgentIdAgent identifier used for lineage, filtering, and ownership checks.
source: SourceRefSource label or ref for this item; it is metadata and does not fetch content by itself.
input: StringInput used by this record or request.
output_contract: Option<OutputContract>Optional output contract value. When absent, callers should use the documented default or skip that optional behavior.
Implementations§
Source§impl RunRequest
impl RunRequest
Sourcepub fn text(
run_id: RunId,
agent_id: AgentId,
source: SourceRef,
input: impl Into<String>,
) -> Self
pub fn text( run_id: RunId, agent_id: AgentId, source: SourceRef, input: impl Into<String>, ) -> Self
Builds the text value. This is data construction and performs no I/O, journal append, event publication, or process work.
Sourcepub fn with_output_contract(self, output_contract: OutputContract) -> Self
pub fn with_output_contract(self, output_contract: OutputContract) -> Self
Returns this value with its output contract setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn with_session_id(self, session_id: SessionId) -> Self
pub fn with_session_id(self, session_id: SessionId) -> Self
Returns this value with a session id attached for trace grouping. This is data construction only; hosts still own conversation storage.
Sourcepub fn with_turn_id(self, turn_id: TurnId) -> Self
pub fn with_turn_id(self, turn_id: TurnId) -> Self
Returns this value with a turn id attached for question-scoped tracing. This is data construction only and does not start or resume a run.
Sourcepub fn with_session_turn(self, session_id: SessionId, turn_id: TurnId) -> Self
pub fn with_session_turn(self, session_id: SessionId, turn_id: TurnId) -> Self
Returns this value with session and turn lineage attached together. This is a thin convenience over the explicit builder methods.
Sourcepub fn typed_text<T: TypedOutputModel>(
run_id: RunId,
agent_id: AgentId,
source: SourceRef,
input: impl Into<String>,
) -> Self
pub fn typed_text<T: TypedOutputModel>( run_id: RunId, agent_id: AgentId, source: SourceRef, input: impl Into<String>, ) -> Self
Builds the typed text value with the documented defaults. This uses only local coordinator state and performs no hidden host work.
Trait Implementations§
Source§impl Clone for RunRequest
impl Clone for RunRequest
Source§fn clone(&self) -> RunRequest
fn clone(&self) -> RunRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RunRequest
impl Debug for RunRequest
impl Eq for RunRequest
Source§impl PartialEq for RunRequest
impl PartialEq for RunRequest
Source§fn eq(&self, other: &RunRequest) -> bool
fn eq(&self, other: &RunRequest) -> bool
self and other values to be equal, and is used by ==.