Expand description
Runtime engine for executing individual AI agents.
The crate owns the agent execution loop: it prepares model requests, processes model turns, dispatches tool calls, enforces authorization policies, and records lifecycle events. It also defines the contracts that connect model adapters, tools, and the host application.
The runtime deliberately does not own provider-specific APIs, durable conversation storage, scheduling, or service-level orchestration. Those concerns belong to the model, persistence, and service crates respectively; this crate focuses on executing one agent run with trusted host context.
Structs§
- Agent
- Configuration for an agent.
- Agent
Definition - Agent
Registry - Agent
Runtime - Allow
List Policy - Allows execution of explicitly configured tools.
- Authorization
Error - Error explaining why a tool invocation was denied.
- Cancellation
Token - Shared cancellation signal for an agent run.
- Collecting
Event Sink - An event sink that stores events in memory.
- Family
Context - Trusted family information resolved by the platform for an authenticated user.
- Family
Member Context - One member of a family roster verified for the authenticated user.
- Model
Adapter - Adapts an agent-models conversation client to the runtime interface.
- Model
Request - Input sent to the model.
- Model
Turn - Response received from the model.
- Routed
Model Turn - A model response together with the provider-qualified identity that produced it.
- RunEvent
- RunFailure
- RunResult
- Tool
Call - A tool invocation requested by the model.
- Tool
Context - Trusted execution metadata supplied by the platform, never by the model.
- Tool
Definition - Description of a tool exposed to the model.
- Tool
Registry - In-memory registry of executable tools.
Enums§
- Authorization
- Result of an authorization decision.
- Error
Category - Stable error classes for runtime decisions and observability.
- Message
- A message in the conversation.
- Model
Error - Model
Failure Category - Model
Routing Event - Events emitted while a router evaluates compatible model candidates.
- RunEvent
Kind - RunStatus
- Runtime
Error - Tool
Error
Traits§
- Agent
Model - Interface used by the agent runtime to interact with a model.
- Event
Sink - Receives runtime events as they occur.
- Model
Router - Selects and invokes a model for one agent turn.
- Model
Routing Event Sink - Receives routing lifecycle events without exposing provider error payloads.
- Policy
Engine - Determines whether an agent is allowed to execute a tool call.
- Tool
- An executable tool.
- Tool
Dispatcher - Executes tools requested by the model.