pig/agent/msg
Agent message type for the sans-IO core.
Messages drive the state machine. They represent both user inputs and runtime responses fed back into the core:
UserPrompt— a new prompt to processProviderResponded— the LLM’s response (or error)ToolResults— tool execution outcomes
Types
Messages that drive the agent state machine.
pub type AgentMsg {
UserPrompt(String)
ProviderResponded(Result(message.Message, error.AiError))
ToolResults(
List(#(message.ToolCall, Result(json.Json, tool.ToolError))),
)
}
Constructors
-
UserPrompt(String)A new user prompt. Starts or continues the conversation.
-
ProviderResponded(Result(message.Message, error.AiError))The LLM provider’s response, delivered by the runtime after executing a
CallProvidereffect. -
ToolResults( List(#(message.ToolCall, Result(json.Json, tool.ToolError))), )Tool execution outcomes, delivered by the runtime after executing an
ExecuteToolseffect.