pig/agent/step_result
Step result type for the sans-IO core.
The outcome of a single state transition — what happened after processing a message. Carries the new state and at most one effect.
Three variants:
Done— the agent produced a final answerContinue— the agent needs more work (inference, tools)Failed— an unrecoverable error occurred
Types
Result of a single state transition in the agent loop.
pub type StepResult {
Done(state: state.AgentState, message: message.Message)
Continue(state: state.AgentState, effect: effect.Effect)
Failed(state: state.AgentState, error: error.AiError)
}
Constructors
-
Done(state: state.AgentState, message: message.Message)The agent produced a final answer. No further effects needed.
-
Continue(state: state.AgentState, effect: effect.Effect)The agent needs more work. Contains the next effect for the runtime.
-
Failed(state: state.AgentState, error: error.AiError)An unrecoverable error occurred.