Expand description
§IronClad 🛡️
Secure-by-Design Autonomous AI Agent
IronClad is a Rust-based autonomous agent that treats the LLM as an untrusted component (“The Dreamer”) and enforces strict policies (“The Governor”) on all actions.
§Architecture
The system is built around a “Three-Ring” security architecture:
- The Dreamer (LLM): Generates intentions and commands but has no direct system access
- The Governor: Validates and gates all LLM outputs through a Traffic Light policy
- The Executor (Sandbox): Runs approved commands in isolated environments
§Key Features
- Multi-Provider LLM Support: Ollama (local), OpenAI, and Anthropic
- Sandboxed Execution: Docker or WSL backends for command isolation
- Traffic Light Policy: Commands classified as Green/Yellow/Red/Blocked
- MCP Integration: Model Context Protocol for extensible tools
- Audit Logging: Complete audit trail in SQLite
- Telegram Integration: Remote control via Telegram bot
- Pulse Scheduler: Autonomous cron job execution
- Web Dashboard: Localhost web interface for observability and management
- RAG Knowledge Base: Local codebase indexing for context-aware responses
§Quick Start
use ironclad_ai_agent::config::AppConfig;
use ironclad_ai_agent::audit::AuditLogger;
use ironclad_ai_agent::vault::Vault;
use ironclad_ai_agent::llm;
use std::path::Path;
#[tokio::main]
async fn main() -> ironclad_ai_agent::error::Result<()> {
// Load configuration
let config = AppConfig::load(Path::new("settings.toml"))?;
// Initialize audit logger
let audit = AuditLogger::new(Path::new("audit.db")).await?;
// Load API keys from environment
let vault = Vault::load();
// Create LLM provider
let provider = llm::create_provider(&config, &vault)?;
Ok(())
}§Modules
audit: Audit logging and event trackingconfig: Configuration managementdashboard: Localhost web dashboard for observabilityerror: Error types and Result aliasgovernor: Security policy engine and intent parsingintegrations: External integrations (Telegram, Playwright, STT)llm: LLM providers and orchestratormcp: Model Context Protocol clientmemory: Chat history persistenceplanner: Task planning and context managementpulse: Job scheduler for autonomous tasksrag: RAG knowledge base for codebase indexingreact: Constrained ReAct (Thought-Action-Observation) harnesssandbox: Execution backends (Docker, WSL)security: Path validation and workspace boundary enforcementskills: Tool/skill systemsubprocess: Subprocess orchestration for CLI agent managementtui: Terminal user interfacevault: API key management and secret scrubbing
Modules§
- api
- audit
- Audit logging subsystem — the “Black Box” recorder.
- bootstrap
- Bootstrapping logic for IronClad.
- collab
- Multi-instance collaboration (
collab_workspace). - config
- Application configuration.
- dashboard
- Localhost Web Dashboard for Observability & Management.
- error
- Custom error types for IronClad.
- governor
- The Governor — intent parser and permission gate.
- integrations
- llm
- LLM provider abstraction and implementations.
- mcp
- Model Context Protocol (MCP) integration.
- memory
- Memory management for chat history and sessions.
- metrics
- Simple metrics tracking for the Orchestrator.
- planner
- Planner module — context management and three-file enforcement.
- plugin
- IronClad Dynamic & In-Process Plugin Subsystem.
- prelude
- Re-export commonly used types for convenience
- pulse
- Pulse scheduler for autonomous task execution.
- rag
- RAG (Retrieval-Augmented Generation) Knowledge Base Module.
- react
- sandbox
- Sandbox execution backends.
- security
- Security utilities for path validation and workspace boundary enforcement.
- skills
- Skills system for tool execution.
- subprocess
- Subprocess orchestration engine for IronClad.
- swarm
- Asynchronous Multi-Agent Swarm module.
- telemetry
- tui
- TUI module — Terminal User Interface for IronClad.
- vault
- The Vault — secure API key management.
Functions§
- floor_
char_ boundary - Return the largest byte index ≤
indexthat falls on a UTF-8 char boundary. - safe_
truncate - Truncate a string slice to at most
max_byteswithout splitting a UTF-8 code point.