Expand description
Agent runtime — run agents as managed, isolatable units (provision/start/stop/health). Agent runtime — a place to run agents as managed, isolatable units.
The AgentRuntime port is a platform capability: it provisions, starts,
stops, health-checks, and serves back the output of agent instances,
independently of how each agent serves requests once running
(AgentServer is that per-agent leaf). This is the keystone of Pillar 3 — a future control-plane
and the Terraform provider drive a real backend through this port instead of
a single in-process fan-out.
Per the hexagonal rules this lives in the platform layer (never in the pure
a2a-rs protocol crate): a capability port plus a first-class adapter.
LocalProcessRuntime supervises agents as child a2a run OS processes
(dev/test, no Docker); a ContainerRuntime (Docker/Podman) and the
control-plane service are later drop-ins behind the same port — which is why
every method returns Result even though the local adapter rarely fails.
Identity is shared with the registry: a runtime instance
and its registry entry use the same AgentId, so the two compose at the
control-plane edge.
A runtime also answers whether it outlives the supervisor
(AgentRuntime::recover → Recovered). That is what separates a backend
a control plane can be restarted over — containers, whose engine keeps the
record — from one whose state dies with the process.
Structs§
- Agent
Spec - What to run and how to reach it — the unit of deployment a runtime manages.
- Container
Hardening - What
ContainerRuntimeasks the engine to enforce on each agent. - Container
Runtime - An
AgentRuntimethat runs each agent in its own container via adocker/podmanCLI (shelled out throughtokio::process, so no Docker API dependency — the engine binary is the only requirement). - EnvAllowlist
- The environment variables a deployed agent config is permitted to reference
via
${VAR}— least privilege over the deploying process’s secrets. - InMemory
Agent Runtime - An
AgentRuntimethat tracks lifecycle state in a map without spawning any processes. - Local
Process Runtime - An
AgentRuntimethat runs each agent as a childa2a run --config <path>OS process. - Runtime
Status - A managed agent’s id, current
RuntimeHealth, and endpoint.
Enums§
- Recovered
- The outcome of asking a backend what it is already running
(
AgentRuntime::recover,ControlPlane::recover). - Runtime
Error - Errors a runtime operation can return.
- Runtime
Health - Liveness of a managed agent instance.
Traits§
- Agent
Runtime - The capability the platform needs to run agents: provision, start, stop,
health-check, and list managed instances. One trait per capability (hex rule
2); implemented by
LocalProcessRuntimetoday, a container or control-plane adapter later.