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.
| Concern | In a kernel |
|---|---|
| A sub-agent’s run | A 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 parent | A process of kind triggered:subagent whose parent is the sub-agent’s run |
| Steering | Kernel::steer on the replica that runs the turn |
| Cancel | ProcessTable::kill |
| Status | KernelEvent::Subagent on the bus at every change; a WebhookSink filtered to EventKind::Subagent delivers each as a signed webhook |
| Restart | Kernel::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§
- Subagent
Handle - 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.