Architecture
A layered agent stack, split into crates you can adopt one at a time.
RustyAI is organised as a dependency graph rather than a framework blob. Hover any crate below to trace what it depends on and the role it plays in the API.
Hover a crate to highlight its dependencies and API role.
Composability over monoliths
A service that only needs typed agent messaging should not compile a planner. Each crate is usable on its own with a minimal dependency surface.
Layered dependencies
Dependencies only ever point downward: coordination depends on transport, transport depends on the agent foundation. No cycles, no surprise coupling.
Stable foundation, evolving edges
agent-core changes slowly and deliberately. Higher layers such as patterns and cognition can iterate without destabilising everything below.
One facade when you want it
The rustyai crate re-exports the whole stack behind a single prelude for applications that would rather not manage six dependencies.
Layers
What lives where.
| Crate | Layer | Depends on | Key APIs |
|---|---|---|---|
| agent-core | Level 0 — Foundation | — | Agent, AgentId, AgentContext, AgentState, LifecycleHooks |
| cognition | Level 1 — Reasoning | agent-core | BeliefBase, Desire, Intention, Planner, UtilityFn |
| messaging | Level 1 — Transport | agent-core | AclMessage, Performative, Mailbox, Router, RequestReply |
| patterns | Level 2 — Coordination | messaging, agent-core | Hierarchy, Swarm, Market, Coalition, Blackboard |
| runtime | Level 2 — Execution | agent-core, messaging | Runtime, Supervisor, RestartPolicy, HealthCheck, Scheduler |
| rustyai | Level 3 — Facade | patterns, runtime, cognition, messaging, agent-core | prelude::*, AgentBuilder, RustyAI |
Explore the crates.
Every crate has its own page with purpose, dependency level, and a code sketch.