Expand description
Core runtime engine for Common Agent Runtime.
The runtime loop:
- Receive a proposal (batch of actions from a model)
- Build a DAG from state_dependencies
- Execute each level (concurrent if no ABORT actions, sequential otherwise)
- Validate, execute with idempotency + timeout + retry, commit
- On abort: rollback state to pre-proposal snapshot
Re-exports§
pub use agent_basics::entries as agent_basic_entries;pub use agent_capability::AgentCapabilityRegistry;pub use builtin_agents::agent_metadata;pub use builtin_agents::format_capability_payload;pub use builtin_agents::register_builtins;pub use builtin_agents::BuiltinAgent;pub use builtin_agents::CapabilityPayloadError;pub use builtin_agents::BUILTIN_AGENTS;pub use authz::AllowAllPermissions;pub use authz::AuthzDecision;pub use authz::AuthzPipeline;pub use authz::AuthzResult;pub use authz::AuthzStage;pub use authz::PermissionHandler;pub use authz::Restriction;pub use cache::ResultCache;pub use capabilities::CapabilitySet;pub use checkpoint::Checkpoint;pub use mcp::McpServer;pub use mcp::McpServerConfig;pub use mcp::McpToolExecutor;pub use mcp::McpToolInfo;pub use rate_limit::RateLimit;pub use rate_limit::RateLimiter;pub use registry::ToolEntry;pub use registry::ToolPermission;pub use registry::ToolRegistry;pub use registry::ToolSource;pub use subprocess::SubprocessTool;pub use subprocess::SubprocessToolExecutor;
Modules§
- agent_
basics - agent_
capability - Agent capability registry — maps capability id → agents that implement it.
- authz
- Authorization pipeline for tool execution.
- builtin_
agents - Built-in agent vocabulary — single source of truth across FFI surfaces.
- cache
- Cross-proposal result cache for tool call results.
- capabilities
- Per-agent capability permissions for the Common Agent Runtime.
- checkpoint
- Checkpoint and resume support for the Common Agent Runtime.
- mcp
- MCP (Model Context Protocol) server integration.
- rate_
limit - Token bucket rate limiter for tool calls with backpressure support.
- registry
- Canonical tool registry — single source of truth for tool identity.
- subprocess
- Subprocess tool executor — runs tools as external processes via stdin/stdout JSON-RPC.
Structs§
- Cost
Budget - Budget constraints for proposal execution.
- Failed
Action Summary - Summary of a failed action, included in ReplanContext.
- Replan
Config - Configuration for the replan loop.
- Replan
Context - Context provided to the replan callback so the model can generate an alternative.
- Runtime
- Common Agent Runtime — deterministic execution layer.
Constants§
- CANCELED_
PREFIX - Prefix on the
errorfield of anActionResultthat distinguishes “the user pulled the plug” from “earlier abort cascaded.” TheActionStatusitself isSkippedin both cases (introducing a new variant ripples through every IR consumer + FFI binding); the prefix lets callers like the A2A bridge tell the cases apart without string-matching a magic literal.
Traits§
- Replan
Callback - Callback trait for replanning failed proposals. Implement this to let the runtime ask the model for an alternative plan when a proposal aborts.
- Tool
Executor - Trait for tool execution. Implement this to provide tools to the runtime.
Functions§
- format_
tool_ result - Format a tool result for feeding back to a model.