pub struct AgentOutcome {
pub status: OutcomeStatus,
pub summary: String,
pub evidence: Vec<Evidence>,
pub metrics: OutcomeMetrics,
pub timestamp: DateTime<Utc>,
}Expand description
The outcome of an agent execution loop.
Fields§
§status: OutcomeStatusThe outcome type.
summary: StringHuman-readable summary of what happened.
evidence: Vec<Evidence>Evidence supporting the outcome classification.
metrics: OutcomeMetricsMetrics from the execution.
timestamp: DateTime<Utc>When the outcome was determined.
Implementations§
Source§impl AgentOutcome
impl AgentOutcome
Sourcepub fn success(summary: &str) -> AgentOutcome
pub fn success(summary: &str) -> AgentOutcome
Create a successful outcome.
Sourcepub fn failure(summary: &str) -> AgentOutcome
pub fn failure(summary: &str) -> AgentOutcome
Create a failure outcome.
Sourcepub fn timeout(summary: &str, turns: u32, max_turns: u32) -> AgentOutcome
pub fn timeout(summary: &str, turns: u32, max_turns: u32) -> AgentOutcome
Create a timeout outcome.
Sourcepub fn give_up(reason: &str) -> AgentOutcome
pub fn give_up(reason: &str) -> AgentOutcome
Create a give-up outcome.
Sourcepub fn with_evidence(self, evidence: Evidence) -> AgentOutcome
pub fn with_evidence(self, evidence: Evidence) -> AgentOutcome
Add evidence to this outcome.
Sourcepub fn with_metrics(self, metrics: OutcomeMetrics) -> AgentOutcome
pub fn with_metrics(self, metrics: OutcomeMetrics) -> AgentOutcome
Set metrics on this outcome.
Trait Implementations§
Source§impl Clone for AgentOutcome
impl Clone for AgentOutcome
Source§fn clone(&self) -> AgentOutcome
fn clone(&self) -> AgentOutcome
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 AgentOutcome
impl Debug for AgentOutcome
Source§impl<'de> Deserialize<'de> for AgentOutcome
impl<'de> Deserialize<'de> for AgentOutcome
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentOutcome, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentOutcome, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AgentOutcome
impl Serialize for AgentOutcome
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AgentOutcome
impl RefUnwindSafe for AgentOutcome
impl Send for AgentOutcome
impl Sync for AgentOutcome
impl Unpin for AgentOutcome
impl UnsafeUnpin for AgentOutcome
impl UnwindSafe for AgentOutcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more