Architecture

Built in Rust with six independent layers. Every piece has a single responsibility, every boundary is clearly defined, and nothing depends on anything it shouldn't.

L6
Presentation
clawreform-cliclawreform-desktop
L5
API + Dashboard
clawreform-api
L4
Kernel
clawreform-kernel
L3
Services
clawreform-runtimeclawreform-channelsclawreform-wireclawreform-skillsclawreform-migrate
L2
Storage
clawreform-memory
L1
Foundation
clawreform-types
Agent Spawner
agent-spawn
Message Dispatcher
dispatcher
LLM Router
llm-router
Tool Runner
tool-runner
Output Evaluator
evaluator
Budget Enforcer
budget-enforcer
Audit Registry
registry
Skill Loader
skill-loader
Channel Multiplexer
channel-mux
Wire Protocol (OFP)
wire-ofp
KV Memory Store
memory-kv
Checkpoint Manager
checkpoint

Nothing gets in without a stamp.

Every message passes through eight checkpoints before the agent sees it. Click any stage to see what's being checked.

RBAC Check
rbac
Channel Policy
channel-policy
Quota Gate
quota
Registry Lookup
registry
Dispatch
dispatch
LLM Loop
llm-loop
Cost Accounting
cost
Response
response

Agents wake up, work, rest, and clock out.

Every agent follows the same four-step cycle. Click a state to see where it can go next, or click a transition to see what happens.

Spawn
Creating
Activate
Running
Processing
Shutdown
Terminated
Stopped
Suspended
Paused
Resume
Decommission

Key design decisions

KernelHandle trait — Defined in clawreform-runtime, implemented on ClawReFormKernel in clawreform-kernel. This inverts the dependency so the runtime can call kernel methods without importing the kernel crate.
AppState bridge — The API layer wraps the kernel in an AppState struct with Arc pointers. Routes never touch the kernel directly — they go through typed accessor methods.
Config as types — Every config field lives in clawreform-types with serde defaults, making the binary usable with zero configuration files on first run.