pig/agent/effect
Effect types for the sans-IO agent core.
Effects are declarations of intent — the core describes what it wants done, and a runtime interprets these effects against the real world.
Two effects cover the entire agent loop:
CallProvider — send messages to the LLM
ExecuteTools — run tool calls
Types
An effect request from the pure core. The runtime interprets these.
pub type Effect {
CallProvider(
messages: List(message.Message),
tools: List(tool_definition.ToolDefinition),
)
ExecuteTools(calls: List(message.ToolCall))
}
Constructors
-
CallProvider( messages: List(message.Message), tools: List(tool_definition.ToolDefinition), )Send messages and tool definitions to the LLM provider.
-
ExecuteTools(calls: List(message.ToolCall))Execute a list of tool calls. The runtime feeds the results back as an
AgentMsg.ToolResultsmessage.