pub struct AgentProcessor { /* private fields */ }Expand description
Processes frontend messages through the LLM agent.
The processor maintains per-thread sessions for conversation isolation and emits AG-UI events via the EventBridge during processing.
Implementations§
Source§impl AgentProcessor
impl AgentProcessor
Sourcepub fn new(
message_rx: Receiver<AgentMessage>,
event_bridge: EventBridge,
config: ProcessorConfig,
) -> Self
pub fn new( message_rx: Receiver<AgentMessage>, event_bridge: EventBridge, config: ProcessorConfig, ) -> Self
Creates a new agent processor.
§Arguments
message_rx- Receiver for messages from frontendevent_bridge- Bridge for emitting AG-UI eventsconfig- Processor configuration
Sourcepub fn with_defaults(
message_rx: Receiver<AgentMessage>,
event_bridge: EventBridge,
) -> Self
pub fn with_defaults( message_rx: Receiver<AgentMessage>, event_bridge: EventBridge, ) -> Self
Creates a processor with default configuration.
Sourcepub fn session_count(&self) -> usize
pub fn session_count(&self) -> usize
Gets the current session count.
Sourcepub fn config(&self) -> &ProcessorConfig
pub fn config(&self) -> &ProcessorConfig
Gets the configuration.
Auto Trait Implementations§
impl Freeze for AgentProcessor
impl !RefUnwindSafe for AgentProcessor
impl Send for AgentProcessor
impl Sync for AgentProcessor
impl Unpin for AgentProcessor
impl UnsafeUnpin for AgentProcessor
impl !UnwindSafe for AgentProcessor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.