Expand description
§Acton Core (acton-core)
This crate provides the foundational components for the Acton asynchronous agent system, built on top of Tokio. It establishes a robust, message-passing framework with clear separation of concerns for agent state, runtime management, communication, and lifecycle.
§Key Concepts
- Agents (
ManagedAgent): Core computational units wrapping user-defined state and logic, managed by the runtime. - Handles (
AgentHandle): External references for interacting with agents (sending messages, stopping, supervising). - Messaging: Asynchronous communication via Tokio MPSC channels, using
messages implementing the
ActonMessagetrait. - Broker (
AgentBroker): Central publish-subscribe mechanism for topic-based message distribution. - Lifecycle & Supervision: Type-state pattern (
Idle,Started) for agents, lifecycle hooks, and hierarchical supervision. - Runtime (
AgentRuntime): Manages the overall system, including agent creation and shutdown. - Traits: Core interfaces (
AgentHandleInterface,Broker,Subscriber, etc.) define the framework’s capabilities.
This crate primarily defines the internal building blocks and core traits.
The acton-reactive crate builds upon acton-core to provide a more
user-friendly API for developing reactive applications.
Modules§
- prelude
- A prelude module for conveniently importing the most commonly used items.