Skip to main content

Module managed

Module managed 

Source
Expand description

The managed form of the kernel (spec 3.2 §7.13, §10 M1; feature managed).

The kernel hosts a user’s or a team’s agents on their own infrastructure; the managed runtime (adk-managed) hosts tenants. They share the durable stores and the harness:

ItemWhat it is
KernelDefPartitions and their coordinator, driver manifests, the proactivity policy and wake sets, as a block under the KERNEL_DEF_METADATA_KEY metadata key of a ManagedAgentDef, beside the harness’s adk.harness
TenantKernelOne kernel over one tenant’s ManagedStores: the tenant’s definitions as targets, their wake sets as triggers, their proactivity policy, the tenant’s approval service waking parked processes
KernelResolverThe AgentResolver the tenant’s runtime is built with: it hosts each definition carrying a kernel block on the tenant’s kernel
PartitionAgentResolver, PartitionHostOne agent per partition a definition declares — one harness per partition — over the tenant’s partition table (spec 3.2 §7.8)
ManagedKernelsA host’s tenants, one kernel each, refusing a tenant whose stores another holds
DRIVER_MOUNT_TOOL_NAMEThe inbox tool name of a driver mount a definition asks for: a person approves it before the tenant’s supervisor mounts it (spec 3.2 §7.7)

A definition comes from a tenant, so its kernel block cannot widen what the operator allows: its agent is built by the operator’s resolver, a driver is never unsandboxed and mounts only with a person’s approval, a wake set never takes the queue a person’s turn holds, and the consolidation tick is off unless the block turns it on (§13 Q1). adk-managed is Experimental, so this module is too.

§Example

use adk_kernel::Wake;
use adk_kernel::managed::{KernelDef, KERNEL_DEF_METADATA_KEY, WakeSetDef};
use adk_managed::types::{ManagedAgentDef, ModelRef};

let def = KernelDef::new()
    .with_wake_set(WakeSetDef::new("orders", [Wake::Webhook { hook: "orders".into() }], "Triage the new orders."))
    .apply_to(ManagedAgentDef::new("triage", ModelRef::Shorthand("claude-sonnet-5-5".into())));
let block = &def.metadata.as_ref().unwrap()[KERNEL_DEF_METADATA_KEY];
assert!(block.contains(r#""hook":"orders""#));

Re-exports§

pub use def::CROSS_PARTITION_VALUES;
pub use def::DEFAULT_WAKE_USER;
pub use def::KERNEL_DEF_METADATA_KEY;
pub use def::KernelDef;
pub use def::PartitionDef;
pub use def::WakeOverlap;
pub use def::WakeSetDef;

Structs§

KernelDef
The kernel part of a hosted definition: partitions and their coordinator, drivers, the proactivity policy and wake sets (spec 3.2 §7.8, §7.13, §10 M1).
KernelResolver
Resolves managed definitions for a TenantKernel (spec 3.2 §7.13, §10 M1): an AgentResolver for DefaultManagedAgentRuntime::with_agent_resolver.
ManagedKernels
The tenants a host runs, one kernel each (spec 3.2 §7.13).
PartitionDef
A partition of a hosted definition, as plain data in the partition record’s shape (spec 3.2 §7.8).
PartitionHost
The partition a PartitionAgentResolver builds an agent for (spec 3.2 §7.8).
TenantKernel
One kernel over one tenant’s ManagedStores: the managed form of the kernel (spec 3.2 §7.13, §10 M1).
TenantKernelBuilder
Builds TenantKernel (spec 3.2 §7.13, §10 M1).
WakeSetDef
A wake set of a hosted definition: wakes that each start a governed run of the definition’s agent with input (spec 3.2 §7.4, §7.13).

Constants§

CROSS_PARTITION_VALUES
The values of PartitionDef::cross_partition, as the partition record names them (spec 3.2 §7.8).
DEFAULT_WAKE_USER
The user a wake set’s processes run for when it names none (spec 3.2 §7.13).
DRIVER_MOUNT_TOOL_NAME
The approval-inbox tool name of a driver mount a hosted definition asks for (spec 3.2 §7.7): the proposal waits in the tenant’s inbox as an ApprovalRequest with this tool_name, the DriverProposal as args_redacted and allowed_actions = [Approve, Reject].
KERNEL_DEF_METADATA_KEY
The ManagedAgentDef::metadata key a KernelDef travels under, beside the harness’s adk.harness (spec 3.2 §7.13, §10 M1).

Traits§

PartitionAgentResolver
Builds the agent of one partition of a hosted definition (spec 3.2 §7.8, §7.13): one harness per partition, built with the partition’s mode, class and tenant, memory scope, drivers and crossing policy over the tenant’s partition table. adk-harness’s HarnessResolver implements it.