Expand description
Agent lifecycle state machine and execution loop.
This crate provides the building blocks required by MXP-native agents: lifecycle
management, message routing, and a lightweight scheduler backed by tokio.
Structs§
- Agent
Kernel - Core runtime that wires lifecycle, scheduler, and MXP handlers.
- Agent
Record - Snapshot of an agent returned by discovery calls.
- Call
Executor - Executes MXP
Callmessages by invoking registered tools and the configuredModelAdapter. - Call
Outcome - Outcome of processing a call message.
- Collecting
Sink - Sink used during testing to capture outcomes.
- Composite
Audit Emitter - Fan-out emitter that broadcasts audit events to multiple sinks.
- Composite
Policy Observer - Composite observer that forwards decisions to a collection of observers.
- Discover
Request - Agent discovery request payload.
- Discover
Response - Discovery response payload.
- Error
Response - Error payload used for protocol error responses.
- Governance
Audit Emitter - Sends audit events to a remote governance agent using MXP transport.
- Handler
Context - Context provided to message handlers.
- Heartbeat
Request - Heartbeat request emitted by agents.
- Heartbeat
Response - Heartbeat acknowledgement returned to agents.
- Kernel
Message Handler - Handler implementation that wires the call executor into the MXP handler trait.
- Kernel
Message Handler Builder - Builder for
KernelMessageHandlerthat automates tool registration and optional components. - Lifecycle
- Lifecycle state manager.
- MxpAudit
Observer - Observer that emits MXP audit events for deny/escalate outcomes.
- MxpRegistry
Client - MXP-backed registry client that speaks directly to the MXP Nexus registry service.
- Register
Request - Registration payload emitted by agents.
- Register
Response - Successful registration acknowledgement.
- Registration
Config - Configuration for registration and heartbeat maintenance.
- Scheduler
Config - Maximum number of concurrent tasks allowed per agent.
- Task
Scheduler - Lightweight wrapper around
tokio::spawnthat enforces per-agent concurrency. - Tool
Invocation Result - Result describing an executed tool invocation.
- Tracing
Audit Emitter - Tracing-based audit emitter that logs MXP audit events.
- Tracing
Call Sink - Sink implementation that logs to tracing.
- Tracing
Policy Observer - Observer that emits decisions to the tracing system.
Enums§
- Agent
State - Discretely states an agent can occupy during its lifetime.
- Handler
Error - Errors that can occur during message handling.
- Kernel
Error - Errors emitted by
AgentKerneloperations. - Lifecycle
Error - Errors emitted by the lifecycle controller.
- Lifecycle
Event - Events that trigger lifecycle transitions.
- Registry
Error - Errors surfaced by registry integration.
- Scheduler
Error - Errors produced by the scheduler.
- Wire
Agent Status - Simplified agent status representation.
Traits§
- Agent
Message Handler - Trait implemented by agent-specific MXP message handlers.
- Agent
Registry - Trait implemented by discovery/registry backends.
- Audit
Emitter - Emits MXP audit events when policy decisions deny or escalate requests.
- Call
Outcome Sink - Observer trait used to capture call outcomes (for logging, metrics, etc.).
- Policy
Observer - Observer invoked whenever a policy decision is produced.
Type Aliases§
- Handler
Result - Result alias for handler operations.
- Kernel
Result - Result alias for kernel operations.
- Lifecycle
Result - Result alias used for lifecycle operations.
- Registry
Result - Result alias for registry operations.
- Scheduler
Result - Result alias for scheduler operations.