Broomva

Agent OS Architecture

The Life Agent Operating System — twelve 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 12 active subsystems across 139 crates, totaling over 286,062 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.3.0 with 4,510 test functions across 622 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, AnimaCustody backends
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
ChronosCircadian rhythmTemporality -- wake scheduling, trigger multiplexing, durable agendas
InferenceMotor cortexCompute contract -- InferenceBackend trait, KV cache, token streaming

Infrastructure layer

Two daemons sit outside the subsystem tree and form the internet-facing infrastructure:

ComponentRole
lifegwStateless edge gateway — TLS termination, JWT verification, Tier-2 token minting, WebSocket upgrade
lifedPrivileged supervisor daemon — substrate proxy saga (CreateAgent → OpenLagoNamespace → BindWallet → RegisterAnimaSession)

Architecture diagram

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

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

  ├── Arcan (cognition + execution — agent runtime)
  │     ├── → Praxis (tool execution — sandbox + skills + MCP)
  │     ├── → Inference (compute contract — InferenceBackend + KV cache)
  │     ├── 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

  ├── Chronos (temporality — wake scheduling + trigger multiplexing)
  │     └── chronos-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)

Internet → lifegw (TLS + JWT + rate-limit) → lifed (supervisor) → subsystem daemons

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, chronos-lago) connect subsystems to the shared persistence layer.

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, Chronos, 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.3.0.

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.

lifegw is production-deployable: TLS termination, real ES256 + Vercel JWKS verification, Tier-2 capability token minting, WebSocket bidi streaming with reconnect-by-sequence, rate limiting, and AnimaCustody routes (sign, mint, enroll passkey).

Completed subsystems

  • Arcan agent runtime (cognition loop, context compiler, multi-provider support, approval workflow)
  • Lago persistence (event journal, blob storage, BM25/graph search, redb embed)
  • Praxis tool engine (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 (AnimaCustody trait, 6 backends: InProcess, VaultTransit, AwsKms, GcpKms, TPM, HardwareWallet, WebCrypto, Remote; DID multicodec 0x1200)
  • Vigil observability (OpenTelemetry-native tracing, GenAI metrics, contract-derived spans)
  • Nous metacognition (5 eval layers, inline heuristics, LLM-as-judge, Autonomic feedback)
  • Chronos temporality (M0: WakeRouter + HeartbeatTrigger, durable agenda in M1)
  • Inference compute contract (InferenceBackend trait, InProcess backend, InMemoryKvCache, Router)
  • lifegw edge gateway (TLS 1.3, JWKS ES256, rate-limit, admin plane, AnimaCustody routes, WS bidi)

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
  • Inference hardware backends (MLX, vLLM, Groq, Cerebras) in future Spec E phases
  • Chronos M1 (real HttpTrigger + durable agenda) not yet started

Running locally

# From the life/ repository root

# Topology A — direct (development)
cargo run -p arcand              # Arcan agent runtime (port 3000)
cargo run -p autonomicd          # Autonomic homeostasis (port 3002)
cargo run -p haimad              # Haima finance (port 3003)
cargo run -p chronosd            # Chronos wake scheduler (port 3004)

# Topology B — lifegw + lifed proxy (staging / production)
cargo run -p lifegw              # Edge gateway (TLS, port 443 / 8443)
cargo run -p lifed               # Supervisor daemon (UDS)

# With a real LLM provider:
ANTHROPIC_API_KEY=... cargo run -p arcand
# Or point Claude Code at lifegw directly:
ANTHROPIC_BASE_URL=https://localhost:8443 claude

Workspace validation

cargo fmt --workspace && cargo clippy --workspace && cargo test --workspace

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