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 optional effects.

Three variants:

Types

Result of a single state transition in the agent loop.

pub type StepResult(msg) {
  Done(state: state.AgentState, message: message.Message)
  Continue(
    state: state.AgentState,
    effects: List(effect.Effect(msg)),
  )
  Failed(state: state.AgentState, error: error.AiError)
}

Constructors

Search Document