Architecture

rho is organized as a layered workspace where dependencies flow downward only.

┌─────────────────────────────────────────────────┐
│                   rho (binary)                   │  ← Headless JSON-RPC 2.0 agent
├─────────────────────────────────────────────────┤
│            rho-tools      rho-memory             │  ← Built-in tools / Knowledge base
├─────────────────────────────────────────────────┤
│            rho-highlight                          │  ← Tree-sitter syntax analysis
├─────────────────────────────────────────────────┤
│                   rho-core                       │  ← Agent kernel (loop, types, traits, data model)
├─────────────────────────────────────────────────┤
│                   rho-ai                         │  ← Unified LLM provider abstraction
└─────────────────────────────────────────────────┘

rho-ai is the lowest layer; it depends only on external libraries. rho-core depends on rho-ai for the LlmService trait. Every other crate eventually depends on rho-core.

rho-tools, rho-memory, and rho-highlight are all siblings sitting directly on rho-core. rho-tools additionally depends on rho-memory and rho-highlight; the others each depend only on rho-core.

See also: