Architecture

Ironclad compiles to a single static binary. Every subsystem runs in one OS process on one async runtime (tokio), sharing one SQLite database.

Rust 2024
Language
11
Workspace Crates
28
SQLite Tables
~32,000
Lines of Code

Dependency Graph

C4 System Context

Crate Map

CratePurpose
ironclad-coreShared types (SurvivalTier, ApiFormat, ModelTier, RiskLevel, SkillKind), unified config parsing, personality system, error types
ironclad-dbSQLite persistence via rusqlite — 28 tables (incl. FTS5), WAL mode, migration system, embedding storage
ironclad-llmLLM client pipeline — format translation (4 API formats), circuit breaker, in-flight dedup, heuristic model router, 3-level semantic cache, tier-based prompt adaptation
ironclad-agentAgent core — ReAct loop state machine, tool system (trait-based), policy engine, 4-layer injection defense, HMAC trust boundaries, 5-tier memory system, dual-format skill loader, sandboxed script runner
ironclad-walletEthereum wallet (alloy-rs), x402 payment protocol (EIP-3009), treasury policy engine, DeFi yield engine (Aave/Compound on Base)
ironclad-scheduleUnified cron/heartbeat scheduler — DB-backed with lease-based mutual exclusion, wake signaling via mpsc channels
ironclad-channelsChat adapters (Telegram Bot API, WhatsApp Cloud API, Discord, WebSocket) + zero-trust Agent-to-Agent protocol (ECDH session keys, AES-256-GCM)
ironclad-plugin-sdkPlugin trait, manifest parser, script runner, plugin registry with auto-discovery and hot-reload
ironclad-browserHeadless browser automation via Chrome DevTools Protocol (CDP) — navigate, click, type, screenshot, evaluate
ironclad-serverHTTP API (axum, 41 routes), embedded dashboard SPA, CLI (24 commands), WebSocket push, migration engine, 12-step bootstrap
ironclad-testsIntegration test suite covering cross-crate workflows

Workspace Layout

ironclad/
├── Cargo.toml                  # Workspace root (resolver = "3")
├── README.md
├── banner.txt                  # ASCII robot logo
├── install.sh                  # Interactive installer
├── justfile                    # 29 dev recipes
├── crates/
│   ├── ironclad-core/          # Shared types, config, errors
│   ├── ironclad-db/            # SQLite persistence (28 tables)
│   ├── ironclad-llm/           # LLM client + format translation
│   ├── ironclad-agent/         # Agent loop + tools + policy
│   ├── ironclad-wallet/        # Ethereum + x402 + yield
│   ├── ironclad-schedule/      # Heartbeat + cron
│   ├── ironclad-channels/      # Chat adapters + A2A
│   ├── ironclad-server/        # HTTP API, CLI, dashboard
│   ├── ironclad-plugin-sdk/    # Plugin registry
│   ├── ironclad-browser/       # CDP automation
│   └── ironclad-tests/         # Integration tests
├── docs/                       # Architecture docs (20 files)
├── registry/                   # Bundled skills + providers
├── migrations/                 # SQLite migration files
└── tools/                      # Dev tooling