pub struct AgentRequest {
pub input: String,
pub history: Vec<Message>,
pub system_prompt: Option<String>,
pub streaming: bool,
pub max_iterations: Option<usize>,
pub metadata: RequestMetadata,
pub resume_from: Option<PausedExecutionState>,
}Expand description
A request to be processed by the agent pipeline
Fields§
§input: StringThe user’s input text (transcribed if from voice)
history: Vec<Message>Conversation history (role, content pairs)
system_prompt: Option<String>Optional system prompt override
streaming: boolWhether to use streaming response
max_iterations: Option<usize>Optional override for the maximum tool execution iterations.
When None, the pipeline uses its configured default (or runs unbounded
when iteration budgeting is disabled).
metadata: RequestMetadataRequest metadata
resume_from: Option<PausedExecutionState>Optional paused execution state to resume from.
When set, the pipeline will reconstruct the conversational context from the paused state and continue the agentic loop from where it left off.
Implementations§
Source§impl AgentRequest
impl AgentRequest
Sourcepub fn new(input: impl Into<String>) -> AgentRequest
pub fn new(input: impl Into<String>) -> AgentRequest
Create a new request with minimal configuration
Sourcepub fn with_history(self, history: Vec<Message>) -> AgentRequest
pub fn with_history(self, history: Vec<Message>) -> AgentRequest
Set conversation history
Sourcepub fn with_system_prompt(self, prompt: impl Into<String>) -> AgentRequest
pub fn with_system_prompt(self, prompt: impl Into<String>) -> AgentRequest
Set system prompt
Sourcepub fn with_streaming(self, streaming: bool) -> AgentRequest
pub fn with_streaming(self, streaming: bool) -> AgentRequest
Set streaming mode
Sourcepub fn with_max_iterations(self, max_iterations: usize) -> AgentRequest
pub fn with_max_iterations(self, max_iterations: usize) -> AgentRequest
Override the maximum number of agentic-loop iterations for this request.
Sourcepub fn with_source(self, source: RequestSource) -> AgentRequest
pub fn with_source(self, source: RequestSource) -> AgentRequest
Set request source
Sourcepub fn with_session(self, session_id: impl Into<String>) -> AgentRequest
pub fn with_session(self, session_id: impl Into<String>) -> AgentRequest
Set session ID
Sourcepub fn with_directive(self, directive_id: impl Into<String>) -> AgentRequest
pub fn with_directive(self, directive_id: impl Into<String>) -> AgentRequest
Set directive ID for targeted memory retrieval and coordination.
Sourcepub fn with_task(self, task_id: impl Into<String>) -> AgentRequest
pub fn with_task(self, task_id: impl Into<String>) -> AgentRequest
Set active task ID for targeted memory retrieval and coordination.
Sourcepub fn with_agent(self, agent_id: impl Into<String>) -> AgentRequest
pub fn with_agent(self, agent_id: impl Into<String>) -> AgentRequest
Set agent ID for targeted memory retrieval and coordination.
Set retrieval tags for targeted memory loading.
Sourcepub fn with_allowed_tools(self, tools: Vec<String>) -> AgentRequest
pub fn with_allowed_tools(self, tools: Vec<String>) -> AgentRequest
Set allowed tools (for orchestrator/delegated tasks)
Sourcepub fn with_tools_enabled(self, enabled: bool) -> AgentRequest
pub fn with_tools_enabled(self, enabled: bool) -> AgentRequest
Enable or disable tool execution for this request.
Setting this to false ensures the pipeline will not attempt to execute
tools (even if the model asks) for this request.
Sourcepub fn with_reflection_enabled(self, enabled: bool) -> AgentRequest
pub fn with_reflection_enabled(self, enabled: bool) -> AgentRequest
Enable or disable experiential reflection for this request.
Sourcepub fn with_workspace(self, workspace: impl Into<PathBuf>) -> AgentRequest
pub fn with_workspace(self, workspace: impl Into<PathBuf>) -> AgentRequest
Set workspace directory for sandboxed operations
Sourcepub fn with_session_llm_config(
self,
provider: impl Into<String>,
model: impl Into<String>,
) -> AgentRequest
pub fn with_session_llm_config( self, provider: impl Into<String>, model: impl Into<String>, ) -> AgentRequest
Set session LLM configuration (for agent awareness)
Sourcepub fn with_permission_level(self, level: PermissionLevel) -> AgentRequest
pub fn with_permission_level(self, level: PermissionLevel) -> AgentRequest
Set session permission level for tool execution
Sourcepub fn with_permission_level_str(self, level: &str) -> AgentRequest
pub fn with_permission_level_str(self, level: &str) -> AgentRequest
Set session permission level from string (for backwards compatibility)
Sourcepub fn with_resume_state(self, state: PausedExecutionState) -> AgentRequest
pub fn with_resume_state(self, state: PausedExecutionState) -> AgentRequest
Attach a paused execution state so the pipeline resumes from that point.
Trait Implementations§
Source§impl Clone for AgentRequest
impl Clone for AgentRequest
Source§fn clone(&self) -> AgentRequest
fn clone(&self) -> AgentRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AgentRequest
impl RefUnwindSafe for AgentRequest
impl Send for AgentRequest
impl Sync for AgentRequest
impl Unpin for AgentRequest
impl UnwindSafe for AgentRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].