Phase 2 · Stabilization

Build Autonomous Systems in Rust.

RustyAI gives developers the primitives to build agents that think, communicate, coordinate, and execute — with Rust's memory safety and high-performance async runtime.

Rust · Tokio · Open Source · MIT / Apache-2.0

agent society · topologytokio runtime
Agent ABDIFIPA MessagingAgent BAgent CAgent DCoordinationTokio Runtime
agent://A → broadcast(Request) → [B, C, D] · latency budget 10µs

Cognition

Agents that don't just respond. They reason.

The cognition crate implements a BDI loop: beliefs are asserted and revised, inference derives new facts, goals are ranked by utility, plans are synthesised, and intentions are committed to and executed.

  1. Beliefs

    belief base · certainty scoring · revision

  2. Reasoning

    forward-chaining inference

  3. Desires / Goals

    utility functions · goal selection

  4. Planning

    STRIPS-style planning

  5. Intentions

    intention stack · commitment

  6. Actions

    effects executed on the runtime

cognition.rs
use rustyai::prelude::*;
let mut mind = Cognition::new();
mind.beliefs.assert("shard_hot", 0.86);
mind.beliefs.revise("shard_hot", Evidence::Observed);
mind.desires.push(Goal::new("rebalance").utility(|b| {
b.certainty("shard_hot") * 0.8
});
let plan = mind.plan()?;
mind.intentions.commit(plan);

Built for Rust

The agent stack, without the overhead.

Agent systems are long-lived, concurrent, and failure-prone. Rust removes an entire class of runtime surprises before the first agent spawns.

  • ›Memory safety
  • ›Compile-time concurrency
  • ›Zero-cost abstractions
  • ›Native async
  • ›Low overhead
  • ›Predictable execution

Design targets

< 1 ms

agent spawn latency

< 10 µs

message passing

100k+/s

message throughput

~50 KB

baseline memory per agent

These are design targets that guide the framework's implementation, not independently verified benchmark results.

Architecture

Deliberately split into independently usable crates.

Take the facade, or depend only on the layer you need.

crate graph · hover to trace dependencies
agent-coreFoundationcognitionReasoningmessagingTransportpatternsCoordinationruntimeExecutionrustyaiFacadeFoundation

Hover a crate to highlight its dependencies and API role.

main.rs
use rustyai::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
let agent = AgentBuilder::new("researcher")
.with_belief("rust_is_fast")
.with_goal("find_solution")
.build();
Runtime::new().spawn(agent).run().await
}

Start with one agent.

Install the facade crate, spawn an agent, and grow into a full society when you need it.