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.

crate graph · hover to trace dependencies
agent-coreFoundationcognitionReasoningmessagingTransportpatternsCoordinationruntimeExecutionrustyaiFacadeFoundation

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.

CrateLayerDepends onKey APIs
agent-coreLevel 0 — Foundation—Agent, AgentId, AgentContext, AgentState, LifecycleHooks
cognitionLevel 1 — Reasoningagent-coreBeliefBase, Desire, Intention, Planner, UtilityFn
messagingLevel 1 — Transportagent-coreAclMessage, Performative, Mailbox, Router, RequestReply
patternsLevel 2 — Coordinationmessaging, agent-coreHierarchy, Swarm, Market, Coalition, Blackboard
runtimeLevel 2 — Executionagent-core, messagingRuntime, Supervisor, RestartPolicy, HealthCheck, Scheduler
rustyaiLevel 3 — Facadepatterns, runtime, cognition, messaging, agent-coreprelude::*, AgentBuilder, RustyAI

Explore the crates.

Every crate has its own page with purpose, dependency level, and a code sketch.