pub enum LoopAction {
CallLLM {
context: RenderedContext,
tools: Vec<ToolSchema>,
},
ExecuteTools {
calls: Vec<ToolCall>,
},
RequestApproval {
requests: Vec<ApprovalRequest>,
},
SpawnWorkflow {
nodes: Vec<WorkflowSpawnInfo>,
budget: Option<WorkflowBudget>,
},
PreemptSubAgents {
agent_ids: Vec<String>,
reason: String,
},
PersistMemory {
memory: MemoryRecord,
},
QueryMemory {
query: MemoryQuery,
requested_k: usize,
},
SpoolLargeResult {
call_id: String,
tool: String,
output: String,
original_size: u32,
preview_size: u32,
},
ArchivePageOut {
turn: u32,
action: KernelPressureAction,
summary: Option<String>,
archived: Vec<Message>,
tier: String,
},
Done {
result: LoopResult,
},
EvaluateMilestone {
phase_id: String,
criteria: Vec<String>,
verifier: Option<MilestoneVerifier>,
required_evidence: Vec<String>,
},
AwaitingResume,
}Expand description
Actions the state machine outputs — SDK layer executes the I/O.
Variants§
CallLLM
Structured context ready for a provider call.
context.system_text → provider system param.
context.turns → provider messages array (strictly alternating).
tools → tool schemas (skill / memory / knowledge / user tools).
ExecuteTools
RequestApproval
Host-owned approval effect. The kernel remains suspended until the host returns the correlated result through the ABI.
Fields
requests: Vec<ApprovalRequest>SpawnWorkflow
Host-owned workflow orchestration effect. The kernel has reserved the batch but records no spawn fact until the correlated result arrives.
PreemptSubAgents
Host-owned cancellation of in-flight child agents.
PersistMemory
Fields
memory: MemoryRecordQueryMemory
SpoolLargeResult
ArchivePageOut
Fields
action: KernelPressureActionDone
Fields
result: LoopResultEvaluateMilestone
Kernel requests the SDK to evaluate the current milestone phase.
The SDK should assess criteria against the agent’s output using the
specified verifier, then feed back LoopEvent::MilestoneResult { result }.
Fields
verifier: Option<MilestoneVerifier>AwaitingResume
Kernel is suspended awaiting a non-approval internal continuation.
Trait Implementations§
Source§impl Clone for LoopAction
impl Clone for LoopAction
Source§fn clone(&self) -> LoopAction
fn clone(&self) -> LoopAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more