pub enum Event {
Show 14 variants
NewTask {
sub_id: SubmissionId,
agent_id: Option<AgentID>,
prompt: String,
},
TaskStarted {
sub_id: SubmissionId,
agent_id: AgentID,
task_description: String,
},
TaskComplete {
sub_id: SubmissionId,
result: TaskResult,
},
TaskError {
sub_id: SubmissionId,
error: String,
},
AgentMessage {
sub_id: SubmissionId,
message: AgentMessage,
},
ToolCallStarted {
tool_name: String,
args: String,
},
ToolCallCompletedSimple {
tool_name: String,
success: bool,
},
ToolCallRequested {
id: String,
tool_name: String,
arguments: String,
},
ToolCallCompleted {
id: String,
tool_name: String,
result: Value,
},
ToolCallFailed {
id: String,
tool_name: String,
error: String,
},
TurnStarted {
turn_number: usize,
max_turns: usize,
},
TurnCompleted {
turn_number: usize,
final_turn: bool,
},
Warning {
message: String,
},
Error {
sub_id: SubmissionId,
error: String,
},
}
Expand description
Protocol events represent the various events that can occur during agent execution
Variants§
NewTask
A new task has been submitted to an agent
TaskStarted
A task has started execution
TaskComplete
A task has been completed
TaskError
A task encountered an error
AgentMessage
An agent message to the user
ToolCallStarted
Tool call has started
ToolCallCompletedSimple
Tool call has completed (simple)
ToolCallRequested
Tool call requested (with ID)
ToolCallCompleted
Tool call completed (with ID and result)
ToolCallFailed
Tool call has failed
TurnStarted
A turn has started
TurnCompleted
A turn has completed
Warning
A warning message
Error
An error occurred during task execution
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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