⚠️ MAJOR VERSION UPDATE: This is a complete rewrite of Amico (V2)
Amico V2 is a platform-agnostic runtime for AI agents built in Rust. As a framework, it provides a platform for developers to develop their business logic - just like web frameworks like Axum or Rocket.
For detailed architecture design, see ARCHITECTURE.md.
Amico V2 is a complete redesign from the ground up, incorporating modern AI agent framework patterns and best practices:
Amico V2 consists of four layers:
┌─────────────────────────────────────────┐
│ Application / Event Handlers │ ← Your business logic
├─────────────────────────────────────────┤
│ Workflows Layer (Presets) │ ← Tool loop agents, ReAct, etc.
├─────────────────────────────────────────┤
│ Runtime Layer │ ← Workflow execution
├─────────────────────────────────────────┤
│ Models Layer │ ← Model abstractions
├─────────────────────────────────────────┤
│ System Layer │ ← Tools, side-effects, I/O
└─────────────────────────────────────────┘
amico-models): Abstracts AI models by capability (language, image, video, speech, embedding)amico-system): Defines how agents interact with the world through tools and side-effectsamico-runtime): Executes workflows on different runtime types (long-lived or short-lived)amico-workflows): Preset workflow patterns (tool loops, ReAct, chain-of-thought, etc.)Box or Arcimpl Future, not Pin<Box<dyn Future>>amico: The main entry crate that ties everything togetheramico-models: Model abstractions categorized by capabilityamico-system: System layer for tools and side-effectsamico-runtime: Runtime layer for executing workflowsamico-workflows: Preset workflow patternsuse amico::{
EventHandler, EventRouter,
runtime::Runtime,
workflows::ToolLoopAgent,
};
// Define your event handler
struct MyAgentHandler {
agent: ToolLoopAgent<MyModel, MyTools, MyContext>,
}
impl EventHandler<MessageEvent> for MyAgentHandler {
type Context = AgentContext;
type Response = MessageResponse;
type Error = HandlerError;
async fn handle(&self, event: MessageEvent, context: &Self::Context)
-> Result<Self::Response, Self::Error>
{
let response = self.agent
.execute(context, event.content)
.await?;
Ok(MessageResponse::from(response))
}
}
// Create runtime and register handlers
async fn main() {
let runtime = create_runtime();
let mut router = EventRouter::new();
// Register event handlers
router.register("message", MyAgentHandler::new());
router.register("timer", TimerHandler::new());
// Start runtime
runtime.start().await.unwrap();
}
V1 is completely deprecated and not compatible with V2.
V2 is a total rewrite that keeps some good concepts from V1 (event-based architecture, platform-agnostic design) while:
V2 is currently in design phase. The architecture and traits are defined, but implementations are placeholders. We're building the conceptual framework first before implementing functionality.
Amico is released under the MIT License OR the Apache-2.0 License.
All images under images/ are licensed under a
Creative Commons Attribution 4.0 International License.
See LICENSE-CC-BY
Contributions are welcome! Please read our contributing guidelines before submitting a pull request.
$ claude mcp add amico \
-- python -m otcore.mcp_server <graph>