Skip to main content

Architecture Overview

This document provides a high-level overview of Radium's architecture, including core components, data flows, and system design principles.

System Architectureโ€‹

Radium is built as a modular, Rust-based platform with multiple interfaces and a unified orchestration engine.

High-Level Componentsโ€‹

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Client Applications โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ CLI โ”‚ TUI โ”‚ Desktop โ”‚ Web โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ โ”‚ โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Radium Core (gRPC Server) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ”‚ โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Orchestratorโ”‚ โ”‚ Planning โ”‚ โ”‚ Memory โ”‚
โ”‚ Engine โ”‚ โ”‚ System โ”‚ โ”‚ System โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Agent System โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ”‚ โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Gemini โ”‚ โ”‚ Claude โ”‚ โ”‚ OpenAI โ”‚
โ”‚ Engine โ”‚ โ”‚ Engine โ”‚ โ”‚ Engine โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Core Componentsโ€‹

Radium Coreโ€‹

The core backend (crates/radium-core) provides:

  • gRPC Server: Unified API for all client applications
  • Agent Orchestration: Multi-agent coordination and task routing
  • Planning System: Autonomous plan generation and execution
  • Memory System: Plan-scoped memory storage and retrieval
  • Context Management: Context gathering from multiple sources
  • Policy Engine: Fine-grained tool execution control

Orchestration Engineโ€‹

The orchestration engine (crates/radium-orchestrator) provides:

  • Intelligent Routing: Automatic agent selection based on task analysis
  • Multi-Agent Coordination: Coordinate multiple agents for complex workflows
  • Model Agnostic: Works with any AI provider
  • Result Synthesis: Combine results from multiple agents

Agent Systemโ€‹

The agent system manages:

  • Agent Discovery: Automatic discovery from configuration files
  • Agent Execution: Execute agents with their configured models
  • Agent Memory: Store and retrieve agent outputs
  • Agent Configuration: TOML-based agent configuration

Engine Abstractionโ€‹

The engine abstraction layer provides:

  • Unified Interface: Consistent API across AI providers
  • Provider Support: Gemini, Claude, OpenAI, self-hosted models
  • Model Selection: Intelligent model selection via persona system
  • Fallback Chains: Automatic fallback to alternative models

Data Flowโ€‹

Agent Execution Flowโ€‹

User Request
โ†“
Orchestrator (analyzes request)
โ†“
Agent Selection
โ†“
Context Gathering (memory, files, sources)
โ†“
Agent Execution (via engine abstraction)
โ†“
Result Processing
โ†“
Memory Storage
โ†“
Response to User

Planning Flowโ€‹

Goal/Specification
โ†“
Plan Generator (AI-powered)
โ†“
Plan Validation (multi-stage)
โ†“
Dependency Graph (DAG construction)
โ†“
Workflow Generation
โ†“
Plan Execution
โ†“
Result Storage

Architecture Patternsโ€‹

Modular Monorepoโ€‹

Radium uses a modular monorepo structure:

  • Crates: Rust libraries for core functionality
  • Apps: Client applications (CLI, TUI, Desktop)
  • Packages: TypeScript packages for web/desktop

Extension Systemโ€‹

The extension system enables:

  • Component Packaging: Package prompts, MCP servers, commands, hooks
  • Distribution: Share components via marketplace
  • Discovery: Automatic discovery of installed extensions
  • Integration: Seamless integration with core system

Policy Engineโ€‹

The policy engine provides:

  • Rule-Based Control: TOML-based policy rules
  • Context Awareness: Different policies for different contexts
  • Approval Modes: Yolo, AutoEdit, Ask modes
  • Session Constitutions: Temporary rules for specific sessions

Future Architecture: Component Ecosystemโ€‹

Radium is evolving toward a composable intelligence infrastructure:

Component Foundry Patternโ€‹

  • Standardized Interfaces: Consistent component patterns
  • Validation Framework: Automated quality checks
  • Composition Rules: Guidelines for combining components
  • Version Management: Semantic versioning

Status: ๐Ÿ“‹ Planned Learn more: Roadmap: Component Foundry

Global Component Graphโ€‹

  • Component Discovery: Find components across ecosystem
  • Relationship Tracking: Track component dependencies
  • Composition Engine: Automatic component composition
  • Distributed Graph: Support for federated graphs

Status: ๐Ÿ“‹ Planned Learn more: Roadmap: Global Component Graph

Autonomous Assemblyโ€‹

  • Goal-Driven Composition: Systems compose based on goals
  • Constraint Satisfaction: Respect technical and policy constraints
  • Dynamic Reconfiguration: Adapt as needs change
  • Self-Healing: Automatic remediation (DACR)

Status: ๐Ÿ”ฎ Future Learn more: Roadmap: Vision

Detailed Architecture Documentsโ€‹

Core Systemsโ€‹

System Designโ€‹

Design Principlesโ€‹

Performanceโ€‹

  • Rust-Based: Memory safety and performance
  • Concurrent Execution: Parallel agent execution
  • Efficient Caching: Context and result caching
  • Optimized Models: Cost-effective model selection

Safetyโ€‹

  • Policy Engine: Fine-grained control
  • Sandboxing: Safe execution environment
  • Approval Modes: User control over operations
  • Error Handling: Graceful failure and recovery

Extensibilityโ€‹

  • Extension System: Easy component addition
  • Plugin Architecture: Custom integrations
  • Engine Abstraction: Add new AI providers
  • Hook System: Custom behavior injection

Composabilityโ€‹

  • Component-Based: Reusable components
  • Modular Design: Independent modules
  • Standard Interfaces: Consistent APIs
  • Version Management: Compatibility tracking

Technology Stackโ€‹

Backendโ€‹

  • Rust: Core language for performance and safety
  • gRPC: Inter-service communication
  • Tokio: Async runtime
  • Serde: Serialization

Frontendโ€‹

  • TypeScript: Web and desktop applications
  • React: Web UI components
  • Tauri: Desktop application framework
  • Ratatui: Terminal UI library

AI Integrationโ€‹

  • Google Gemini: Via API
  • Anthropic Claude: Via API
  • OpenAI GPT: Via API
  • Self-Hosted: Ollama, vLLM, LocalAI

Roadmap & Evolutionโ€‹

Radium's architecture is evolving toward:

  1. Component Foundry: Systematic component creation and validation
  2. Global Component Graph: Ecosystem-wide component discovery
  3. Autonomous Assembly: Self-composing systems
  4. KOR Protocol: Component exchange protocol
  5. DAO Governance: Community-driven development

Learn more: Roadmap


Want to dive deeper? Explore the detailed architecture documents or check the Technical Architecture Roadmap.