pub struct AgentRunOutput {
pub answer: String,
pub history: Vec<AgentMessage>,
pub total_iterations: usize,
}Expand description
Output returned by a successful AgentLoopPort::run invocation.
Using a named struct instead of a bare tuple keeps call sites self-documenting and allows new fields to be added without breaking existing destructures.
Fields§
§answer: StringThe final answer text produced by the agent.
history: Vec<AgentMessage>Full accumulated conversation history: the caller-supplied messages plus every assistant and tool-result message appended during the loop, including the final assistant reply.
Safe to pass directly as the messages argument for the next turn.
total_iterations: usizeNumber of loop iterations consumed before the agent produced its final answer. Always ≥ 1. Useful for logging and telemetry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentRunOutput
impl RefUnwindSafe for AgentRunOutput
impl Send for AgentRunOutput
impl Sync for AgentRunOutput
impl Unpin for AgentRunOutput
impl UnwindSafe for AgentRunOutput
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