pub enum RunState {
Idle,
BuildingContext,
CallingModel,
StreamingModel,
ProcessingResponse,
ExecutingTools,
WaitingApproval,
Compacting,
Demoting,
Finished,
Aborted,
}Expand description
The state of a single agent run.
Variants§
Idle
Initial state, ready to accept a user message.
BuildingContext
Building the context (system prompt, history, RAG) for the model call.
CallingModel
Waiting for the model to respond (non-streaming).
StreamingModel
Receiving streaming chunks from the model.
ProcessingResponse
Processing the completed model response.
ExecutingTools
Executing tool calls requested by the model.
WaitingApproval
Waiting for human approval of a tool call.
Compacting
Compacting conversation memory.
Demoting
Demoting old messages to long-term storage.
Finished
Run completed successfully.
Aborted
Run was aborted due to an error or cancellation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunState
impl<'de> Deserialize<'de> for RunState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RunState
impl StructuralPartialEq for RunState
Auto Trait Implementations§
impl Freeze for RunState
impl RefUnwindSafe for RunState
impl Send for RunState
impl Sync for RunState
impl Unpin for RunState
impl UnsafeUnpin for RunState
impl UnwindSafe for RunState
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