class Riffer::Agent::Outcome

How a run ended โ€” the single place to read whether the agent completed normally and, if not, why. detail carries the specifics when there are any: the tripwire reason, the interrupt reason, the providerโ€™s raw finish value, or the structured output parse/validation error.

response = agent.generate("Analyze this")
case response.outcome.reason
when :completed then puts response.structured_output
when :invalid_structured_output then warn response.outcome.detail
end