Skip to main content

Module subagents

Module subagents 

Source
Expand description

Background sub-agents as kernel processes.

KernelBuilder::subagents turns them on: the kernel hosts a DurableSubagents whose runs are processes of its background queue, and Kernel::subagents returns it.

ConcernIn a kernel
A sub-agent’s runA process of kind ProcessKind::Subagent, spawned through the process table: a freeze refuses it, its partition’s quotas and spend cap admit it, ps and top list it with its parent
The run that tells the parentA process of kind triggered:subagent whose parent is the sub-agent’s run
SteeringKernel::steer on the replica that runs the turn
CancelProcessTable::kill
StatusKernelEvent::Subagent on the bus at every change; a WebhookSink filtered to EventKind::Subagent delivers each as a signed webhook
RestartKernel::start runs DurableSubagents::reconcile, so a parent is told about a sub-agent that finished while the kernel was killed

A tool built before the kernel reaches it through a SubagentHandle, bound by KernelBuilder::subagent_handle.

Structs§

SubagentHandle
A handle on a kernel’s sub-agent host that does not keep the kernel alive, bound when the kernel is built with it: an agent’s sub-agent tools exist before the kernel that hosts the agent. Until bound, and after the kernel is gone, every operation fails with subagent.unavailable.

Constants§

SUBAGENT_LABEL
The label of a sub-agent’s processes that holds its id.
SUBAGENT_NAME_LABEL
The label of a sub-agent’s processes that holds its name.
SUBAGENT_NOTICE_SOURCE
The source of the processes that tell a parent about its sub-agent: triggered:subagent.