BroomVA

Agent OS Architecture

The Life Agent Operating System — ten subsystems modeled after biological primitives, written in Rust.

Life Agent OS

Life is an Agent Operating System written in Rust. It provides the runtime, persistence, regulation, finance, and networking infrastructure for autonomous AI agents. The name reflects the ambition: creating artificial life from computational primitives.

The system is organized as a Rust workspace with 10 subsystems, totaling over 130,000 lines of Rust. All crates use Rust 2024 Edition with MSRV 1.85 (the Spaces WASM module uses Rust 2021 Edition as required by SpacetimeDB).

Current metrics: v0.2.0 (Stabilization Phase) with over 4,800 test functions across 210 test files. All tests pass.

Biological analogy

Each subsystem maps to a biological system. This is not a metaphor for marketing -- the architecture genuinely follows biological design principles where specialized systems communicate through well-defined interfaces and maintain homeostasis through feedback loops.

SubsystemBiological AnalogRole
aiOSDNAKernel contract -- canonical types, event taxonomy, trait interfaces
AnimaSoulIdentity -- cryptographic keys, beliefs, policy manifests
ArcanBrain + nervous systemAgent runtime -- cognition, execution, LLM provider calls
LagoBone marrow + blood cellsPersistence -- event journal, blob storage, knowledge index
PraxisHands + motor systemTool execution -- sandboxed commands, filesystem, MCP bridge
AutonomicAutonomic nervous systemHomeostasis -- three-pillar regulation (operational, cognitive, economic)
NousPrefrontal cortexMetacognition -- real-time quality evaluation, LLM-as-judge
HaimaCirculatory systemFinance -- x402 payments, wallet management, per-task billing
SpacesSocial/hive behaviorNetworking -- distributed agent communication via SpacetimeDB
VigilSenses + perceptionObservability -- OpenTelemetry traces, GenAI metrics

Architecture diagram

aiOS (kernel contract — types, traits, event taxonomy)

  ├── Anima (identity — soul, keypairs, beliefs, policy)
  │     └── anima-lago bridge → Lago

  ├── Arcan (cognition + execution — agent runtime)
  │     ├── → Praxis (tool execution — sandbox + skills + MCP)
  │     ├── arcan-lago bridge
  │     │     └── Lago (persistence — event journal + blob store)
  │     └── arcan-spaces bridge
  │           └── Spaces (networking — distributed agent communication)

  ├── Autonomic (homeostasis — stability regulation)
  │     └── autonomic-lago bridge → Lago

  ├── Nous (metacognition — quality evaluation + LLM-as-judge)
  │     ├── nous-middleware → Arcan (inline evaluators)
  │     └── nous-lago bridge → Lago (async evaluators)

  ├── Haima (finance — x402 payments + per-task revenue)
  │     └── haima-lago bridge → Lago

  └── Vigil (observability — OTel tracing + GenAI metrics)

All subsystems communicate through the aios-protocol contract defined in aiOS. Events flow through Lago's append-only journal. Bridge crates (anima-lago, arcan-lago, autonomic-lago, haima-lago, nous-lago) connect subsystems to the shared persistence layer. Agent identity originates from Anima -- it provides the cryptographic keypairs (Ed25519 for auth, secp256k1 for economics) and the policy manifests that constrain agent behavior.

The kernel contract (aiOS)

aiOS defines the canonical types and traits that all other subsystems depend on:

  • AgentStateVector -- the complete homeostatic state of an agent at a point in time
  • OperatingMode -- six modes that govern agent behavior:
pub enum OperatingMode {
    Explore,   // High uncertainty — gathering information, read-only tools preferred
    Execute,   // Default productive mode — executing tools, making progress
    Verify,    // High side-effect pressure — validating before committing
    Recover,   // Error streak >= threshold — rollback, change strategy
    AskHuman,  // Pending approvals or human input needed
    Sleep,     // Progress >= 98% or awaiting next signal
}
  • BudgetState -- resource budgets (tokens, time, cost) with consumption tracking
  • EventKind -- the taxonomy of events that flow through the system:
CategoryEvent types
Input/sensingUserMessage, ExternalSignal
Session lifecycleSessionCreated, SessionResumed, SessionClosed
CognitionAssistantMessage, ToolCall, ToolResult
MemoryMemoryStored, MemoryRetrieved
ApprovalApprovalRequested, ApprovalGranted, ApprovalDenied
CustomAny subsystem-specific event (Autonomic, Haima, etc.)
  • Capability -- the permission model for what an agent can do
  • SoulProfile -- the agent's personality, goals, and constraints
  • Observation -- sensory input with provenance metadata

The kernel defines an 8-phase tick lifecycle that every agent execution follows:

  1. Perceive -- gather observations from the environment
  2. Orient -- update the world model and context
  3. Decide -- select an operating mode and plan
  4. Act -- execute the plan (LLM call, tool use, etc.)
  5. Observe -- collect results and feedback
  6. Learn -- update memory and knowledge
  7. Regulate -- check homeostatic constraints (Autonomic)
  8. Report -- emit events and metrics (Vigil)

Current state

Life is in v0.2.0 (Stabilization Phase).

What works end-to-end

The core agent loop is fully functional. A user sends a chat message, Arcan loads the session from the Lago journal, reconstructs the state, calls an LLM provider (Anthropic, OpenAI-compatible, or Mock), executes tools through the Praxis sandbox, persists all events to redb, and streams the response via multi-format SSE. Sessions are fully replayable from the event journal.

Completed features

  • Memory system (5 event types, operating-mode observer, MemoryProjection, governed tools)
  • Context compiler (typed blocks, per-block budgets, deterministic assembly)
  • Approval workflow (ApprovalGate, async pause/resume, auto-timeout)
  • Multi-provider support (Anthropic, Mock, OpenAI-compatible with retry)
  • Blob storage (SHA-256 + zstd, wired to file endpoints)
  • Default policy rules (5 rules, 3 roles, 2 hooks)
  • CLI commands (session, log, cat, branch, init)
  • AI SDK v6 streaming (UiPart enum, boundary signals, Vercel format)
  • Praxis tool engine (90 tests -- sandbox, filesystem, hashline editing, SKILL.md, MCP bridge)
  • Autonomic homeostasis (economic modes, hysteresis gates, RuleSet evaluation)
  • Haima finance (x402 protocol, secp256k1 wallet, per-task billing, Lago bridge)
  • Spaces networking (11 tables, 24 reducers, 5-tier RBAC, SpacetimeDB 2.0)
  • Anima identity (AgentSelf composite, dual keypair derivation, PolicyManifest, Lago genesis events)
  • Vigil observability (OpenTelemetry-native tracing, GenAI metrics, contract-derived spans)
  • Nous metacognition (5 eval layers, inline heuristics, LLM-as-judge, Autonomic feedback)

Known gaps

  • Branching not yet exposed (Lago supports it, Arcan defaults to "main")
  • No OS-level sandbox isolation (soft sandbox only)
  • Network isolation declared but not enforced
  • No conformance test suite across aiOS/Arcan/Lago
  • Chronos/Aegis/Mnemo not yet started

Running locally

Each subsystem runs as an independent daemon:

# From the life/ repository root

# Start the Arcan agent runtime (port 3000)
cd arcan && cargo run -p arcan
# With a real LLM provider:
ANTHROPIC_API_KEY=... cargo run -p arcan

# Start the Autonomic homeostasis controller (port 3002)
cd autonomic && cargo run -p autonomicd

# Start the Haima finance engine (port 3003)
cd haima && cargo run -p haimad

# Lago runs embedded within Arcan via arcan-lago bridge
# Spaces requires a SpacetimeDB instance:
cd spaces/spacetimedb && spacetime publish my-space

Cross-project validation

(cd arcan && cargo fmt && cargo clippy --workspace && cargo test --workspace) && \
(cd lago && cargo fmt && cargo clippy --workspace && cargo test --workspace) && \
(cd autonomic && cargo fmt && cargo clippy --workspace -- -D warnings && cargo test --workspace) && \
(cd spaces && cargo fmt && cargo clippy --workspace -- -D warnings && cargo check)

Running as a managed deployment

Instead of operating the infrastructure yourself, you can deploy a managed Life instance through the BroomVA platform. The platform handles provisioning, persistence, monitoring, and scaling.

On this page