Architecture
All 8 crates are built on iii-engine using the iii-sdk, connecting via WebSocket to register functions and triggers. Every component follows the same pattern:The 8 Crates
| Crate | Purpose | LOC | Functions | Endpoints |
|---|---|---|---|---|
| realm | Multi-tenant isolation domains | ~280 | 7 | 7 REST |
| hierarchy | Agent org structure (cycle-safe DFS) | ~250 | 5 | 5 REST |
| directive | Hierarchical goal alignment | ~280 | 5 | 5 REST |
| mission | Task lifecycle with state machine | ~350 | 7 | 7 REST |
| ledger | Budget enforcement (soft/hard limits) | ~300 | 4 | 4 REST + 1 PubSub |
| council | Governance with SHA-256 audit chain | ~450 | 6 | 6 REST + 1 PubSub |
| pulse | Scheduled agent invocation | ~250 | 4 | 4 REST |
| bridge | External runtime adapters (6 types) | ~300 | 5 | 5 REST |
Key Features
Multi-Tenant Isolation
Realms provide complete isolation with export/import capabilities and secret scrubbing.
Organizational Hierarchy
Cycle-safe org charts with capability search and chain-of-command resolution.
Goal Alignment
Hierarchical directives with ancestry tracing and optimistic concurrency control.
Task Management
State machine-driven missions with atomic checkout and comment threads.
Budget Enforcement
Soft/hard limits with per-agent/model/provider spend tracking and alerts.
Governance
Proposal-based governance with merkle-chained audit trail and agent overrides.
Scheduled Invocation
Cron-based agent activation with context-aware ticks and budget gating.
Runtime Adapters
Bridge to 6 external runtimes: Process, HTTP, ClaudeCode, Codex, Cursor, OpenCode.
Usage Example
Starting Workers
Via CLI
Manual
REST API
All endpoints are exposed via iii-engine’s REST API module on port 3111:PubSub Integration
Two functions subscribe to topics for reactive processing:Design Principles
Function-Based Architecture
Every capability is a pure function registered on the iii-engine bus. No frameworks, no classes, no inheritance.
State via iii-engine
All state is stored using
state::set, state::get, state::list functions. No direct database access.Event-Driven Communication
Workers publish lifecycle events to topics. Other workers can subscribe and react.
Fail-Safe Defaults
Missing budget? Allow by default. Missing directive? Continue. The system degrades gracefully.
Next Steps
Realm
Learn about multi-tenant isolation
Hierarchy
Build organizational structures
Directive
Align agent goals
Mission
Manage tasks and workflows
Ledger
Track and enforce budgets
Council
Govern your agent fleet
Pulse
Schedule agent invocations
Bridge
Connect external runtimes