pub struct AgentPipeline { /* private fields */ }Expand description
The main agent pipeline for processing requests
Implementations§
Source§impl AgentPipeline
impl AgentPipeline
Sourcepub async fn generate_requirement_breakdown_specs(
cfg: AppConfig,
source: RequestSource,
session_id: Option<&str>,
requirements: &str,
) -> Result<Vec<RequirementBreakdownTaskSpec>, String>
pub async fn generate_requirement_breakdown_specs( cfg: AppConfig, source: RequestSource, session_id: Option<&str>, requirements: &str, ) -> Result<Vec<RequirementBreakdownTaskSpec>, String>
Generate a typed requirement breakdown using the shared core pipeline.
Sourcepub fn default_auto_tracked_execution_specs(
message: &str,
) -> Vec<RequirementBreakdownTaskSpec>
pub fn default_auto_tracked_execution_specs( message: &str, ) -> Vec<RequirementBreakdownTaskSpec>
Build the default tracked execution specs used when LLM planning is unavailable.
Sourcepub fn new(config: AppConfig) -> Self
pub fn new(config: AppConfig) -> Self
Create a new pipeline using the default runtime configuration merged with
persisted user pipeline settings from AppConfig.
Sourcepub fn with_config(config: AppConfig, pipeline_config: PipelineConfig) -> Self
pub fn with_config(config: AppConfig, pipeline_config: PipelineConfig) -> Self
Create a pipeline with custom configuration
Sourcepub fn with_knowledge(
self,
store: &'static KnowledgeStore,
settings: &'static KnowledgeSettingsManager,
) -> Self
pub fn with_knowledge( self, store: &'static KnowledgeStore, settings: &'static KnowledgeSettingsManager, ) -> Self
Set the knowledge store and settings manager for this pipeline
Sourcepub fn with_provider_optimized_config(config: AppConfig) -> Self
pub fn with_provider_optimized_config(config: AppConfig) -> Self
Create a pipeline with configuration optimized for the current LLM provider
This automatically sets the context token limit based on the provider’s capabilities and applies user settings from AppConfig.pipeline.
Note: For model-specific limits, prefer [with_model_optimized_config].
Create a pipeline with a shared capabilities cache for dynamic limit discovery.
This allows the pipeline to learn model limits from errors and API discovery, sharing that knowledge across pipeline instances.
Sourcepub fn capabilities_cache(&self) -> &ModelCapabilitiesCache
pub fn capabilities_cache(&self) -> &ModelCapabilitiesCache
Get a reference to the capabilities cache for learning model limits.
Sourcepub async fn process_streaming(
&self,
request: AgentRequest,
tx: Sender<StreamChunk>,
cancel_token: CancellationToken,
) -> Result<AgentResponse, AppError>
pub async fn process_streaming( &self, request: AgentRequest, tx: Sender<StreamChunk>, cancel_token: CancellationToken, ) -> Result<AgentResponse, AppError>
Process a request with streaming response
This is the main entry point for streaming LLM interactions. It handles context reduction, tool filtering, and the agentic loop.
Sourcepub async fn process_blocking(
&self,
request: AgentRequest,
) -> Result<AgentResponse, AppError>
pub async fn process_blocking( &self, request: AgentRequest, ) -> Result<AgentResponse, AppError>
Process a request without streaming (blocking)
Auto Trait Implementations§
impl !Freeze for AgentPipeline
impl !RefUnwindSafe for AgentPipeline
impl Send for AgentPipeline
impl Sync for AgentPipeline
impl Unpin for AgentPipeline
impl !UnwindSafe for AgentPipeline
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
§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].