pub struct AgentHandle {
pub input_tx: Sender<AgentInput>,
pub state_rx: Receiver<AgentRunState>,
pub cancel_token: CancellationToken,
}Expand description
Handle to a persistent agent thread.
Returned by AgentLoop::run_persistent. Allows the caller to send
new messages to the running agent and cancel execution.
Fields§
§input_tx: Sender<AgentInput>Send new messages to the running agent. The agent will process them as new user turns after completing the current turn.
state_rx: Receiver<AgentRunState>Final run state (sent once when the agent completes).
cancel_token: CancellationTokenCancel the running agent.
Auto Trait Implementations§
impl !RefUnwindSafe for AgentHandle
impl !UnwindSafe for AgentHandle
impl Freeze for AgentHandle
impl Send for AgentHandle
impl Sync for AgentHandle
impl Unpin for AgentHandle
impl UnsafeUnpin for AgentHandle
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