Expand description
§Acton-AI: Agentic AI Framework
An agentic AI framework where each agent is an actor, leveraging acton-reactive’s supervision, pub/sub, and fault tolerance to create resilient, concurrent AI systems.
§Architecture
- Agent: Individual AI agents with reasoning loops
- LLM Provider: Manages streaming LLM API calls with rate limiting
- Tool Registry: Registers and executes tools via supervised child actors
- MCP Client: Consumes tools from external Model Context Protocol servers,
one supervised actor per connection (see
mcp) - Memory Store: Persistence via Turso/libSQL
- Checkpoints: Resumable turns — see
checkpoint
§Quick Start (High-Level API)
The simplest way to use acton-ai is via the ActonAI facade:
ⓘ
use acton_ai::prelude::*;
#[tokio::main]
async fn main() -> Result<(), ActonAIError> {
let runtime = ActonAI::builder()
.app_name("my-app")
.ollama("qwen2.5:7b")
.launch()
.await?;
runtime
.prompt("What is the capital of France?")
.system("Be concise.")
.on_token(|t| print!("{t}"))
.collect()
.await?;
println!();
Ok(())
}§Advanced Usage (Low-Level API)
For full control over the actor system:
ⓘ
use acton_ai::prelude::*;
#[tokio::main]
async fn main() {
let mut app = ActonApp::launch_async().await;
let provider = LLMProvider::spawn(&mut app, "default", ProviderConfig::ollama("qwen2.5:7b")).await;
let mut agent = Agent::create(&mut app);
let agent_handle = agent.start().await;
agent_handle.send(InitAgent::default()).await;
app.shutdown_all().await.unwrap();
}Re-exports§
pub use schemars;pub use serde_json;
Modules§
- accounting
- Token and cost accounting.
- agent
- Agent actor module.
- audit
- Tamper-evident audit trail for model turns and tool invocations.
- checkpoint
- Checkpoint and resume for the prompt loop.
- cli
- Command-line interface for acton-ai.
- config
- Configuration management for acton-ai.
- conversation
- Managed conversation abstraction for multi-turn interactions.
- error
- Custom error types for the Acton-AI framework.
- extract
- Typed structured output: schema generation and answer validation.
- facade
- High-level facade for ActonAI.
- fips
- Process-wide TLS crypto provider selection.
- instructions
- Discovery and layering of cross-vendor
AGENTS.mdinstruction files. - introspection
- Live introspection: ask a running process what it is doing, and tell it to stop taking new work.
- llm
- LLM provider module.
- logging
- Journald-based logging for Acton-AI.
- mcp
- MCP (Model Context Protocol) client support.
- memory
- Memory and persistence module for Acton-AI.
- messages
- Message types for inter-actor communication.
- policy
- The tool-approval policy gate.
- prelude
- Prelude module for convenient imports
- prompt
- Fluent prompt builder for LLM requests.
- skills
- Agent Skills module.
- stream
- Stream handling for LLM responses.
- telemetry
- OpenTelemetry export: traces over the prompt loop, metrics for tokens, latency, and reliability.
- tools
- Tool system for the Acton-AI framework.
- types
- Core type definitions for the Acton-AI framework.