pub enum AgentMessage {
System(String),
User(String),
Assistant(String),
ToolUse(ToolUseRequest),
ToolResult {
id: String,
output: ToolOutput,
},
}Expand description
Provider-neutral message supplied to or produced by an agent turn.
Provider adapters lower this representation to their wire payloads inside the application. The shared contract never exposes those payloads.
Variants§
System(String)
System or harness guidance.
User(String)
User input for the current or an earlier turn.
Assistant(String)
Completed assistant text.
ToolUse(ToolUseRequest)
An assistant tool-use request.
ToolResult
A completed application-owned tool result.
Fields
§
output: ToolOutputApplication-owned result returned by the tool executor.
Trait Implementations§
Source§impl Clone for AgentMessage
impl Clone for AgentMessage
Source§fn clone(&self) -> AgentMessage
fn clone(&self) -> AgentMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentMessage
impl Debug for AgentMessage
impl Eq for AgentMessage
Source§impl PartialEq for AgentMessage
impl PartialEq for AgentMessage
impl StructuralPartialEq for AgentMessage
Auto Trait Implementations§
impl Freeze for AgentMessage
impl RefUnwindSafe for AgentMessage
impl Send for AgentMessage
impl Sync for AgentMessage
impl Unpin for AgentMessage
impl UnsafeUnpin for AgentMessage
impl UnwindSafe for AgentMessage
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