RavenClaws 1.0.0

Lightweight, secure Rust agent framework with multi-provider LLM support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# πŸ¦β€β¬› RavenClaws β€” The Ultimate AI Agentic Worker

**Secure Β· Small Β· Efficient Β· Robust Β· Simple. Built in Rust.**

🌐 [**https://ravenclaws.io**](https://ravenclaws.io)

[![License](https://img.shields.io/badge/license-AGPLv3%20%2B%20Commercial-blue.svg)](LICENSING.md)
[![CI](https://github.com/egkristi/RavenClaws/actions/workflows/build.yml/badge.svg)](.github/workflows/build.yml)
[![Verification](https://img.shields.io/badge/verification-114%20checks-brightgreen)](docs/guides/verification.md)
[![Binary](https://img.shields.io/badge/binary-~5.2MB-blue)]()
[![Library](https://img.shields.io/badge/library-crates.io-blue)](https://crates.io/crates/ravenclaws)
[![Status](https://img.shields.io/badge/status-v0.9.6-brightgreen)](ROADMAP.md)

RavenClaws is a lightweight, secure Rust agent framework with multi-provider LLM
support. One static binary, zero runtime dependencies β€” no Python, no Node, no JVM.

> **Status: v0.9.6 (2026-06-02).** HTTP agent execution API (`/chat`, `/execute`, `/tools`, `/tasks/{id}`, `/health/deep`),
> MCP TOML config section (`[mcp]`), multi-MCP-client support via `[[mcp.servers]]`,
> swarm profile TOML shorthand (`[swarm.profiles.name]`), config hot-reload (SIGHUP),
> eval harness tool call assertions (`ToolCalled`, `ToolNotCalled`), server mode docs.
> The provider layer (6 providers), one-shot execution (`--exec`),
> reproducible multi-arch builds, verification + supply-chain pipeline, agent loop, tool-use, MCP client,
> retry/fallback chains, token budgets, native Anthropic integration, **swarm mode**, **supervisor mode**,
> **RavenFabric mesh client**, **MCP server**, **HTTP server mode**, **autonomous heartbeat agent**,
> **long-horizon task persistence**, **scheduling/triggers**, **inter-agent communication bus**,
> **swarm health & telemetry**, **library crate** (on crates.io), and **eval harness** all work today.
> This README marks βœ… built vs. πŸ“‹ planned β€” honestly. Trust is a feature; we don't inflate it.

| Footprint | Security | Providers | Deployment |
|---|---|---|---|
| **~5.2 MB binary** | **Memory-safe Rust** | **5 providers** | **Binary Β· Docker Β· K8s** |
| **0 runtime deps** | **Signed images + SBOM** | **Multi-model** | **472 unit tests + 114 verification checks** |
| **Library crate** | **18 modules** | **crates.io** | **AGPLv3 + Commercial** |

---

## Vision

RavenClaws aims to be the **ultimate AI agentic assistant and worker** β€” and the
**preferred alternative** to the field: Nemoclaw, Hermes Agent, TrustClaw, ZeroClaw,
PicoClaw, NanoClaw, Claude Cowork, Manus, Perplexity Computer, Kimi Claw, and Vellum.

We don't aim to win by out-featuring them. We win by refusing to compromise on five
pillars at once:

- **Secure** β€” memory-safe Rust (`unsafe` forbidden), fail-closed, no creds in config, verified supply chain.
- **Small** β€” one static binary (~5 MB), distroless image, lean dependency tree.
- **Efficient** β€” native performance, low memory, fast cold start, streaming everywhere.
- **Robust** β€” graceful degradation, provider fallback, deterministic config, verified across 4 deployment targets.
- **Simple** β€” one command to run, sensible defaults, no external services required for single-agent use.

See the **[ROADMAP](ROADMAP.md)** for how we get from here to there.

---

## Why RavenClaws?

### Small & efficient

- **~5.2 MB** stripped release binary (measured) β€” no interpreter, no runtime image baggage.
- **Single static binary** β€” no Python, no Node, no JVM, zero runtime dependencies.
- Native Rust with `lto` + `panic=abort`. Design targets (benchmarked toward v1.0 via the [verification suite]docs/guides/verification.md): **< 50 ms** cold start, **< 20 MB** RSS, **< 15 MB** binary across all targets.

### Secure & trustworthy

- **Memory-safe Rust** β€” whole classes of memory-corruption bugs eliminated at compile time.
- **No credentials in config** β€” environment variables and Kubernetes Secrets only.
- **Hardened containers** β€” distroless, non-root, read-only root filesystem, dropped capabilities, seccomp.
- **Verified supply chain** β€” multi-arch images signed with **Cosign**, **SBOM** (Syft) and build **provenance** attestation, plus **CodeQL**, **cargo-audit**, **cargo-deny**, **Trivy**, **Hadolint**, **Kubescape**, and **OSSF Scorecard** in CI.
- **TLS enforced** by default for non-local endpoints.
- **Deny-by-default tool policy** β€” `PolicyEngine` validates all tool calls against shell/path/network allow-lists.
- **Sandboxed tool execution** β€” workdir jail, resource limits, and timeouts via `Sandbox`.
- **Tamper-evident audit log** β€” HMAC-SHA256 chained, structured JSON trail of every tool call.

### Multi-provider, multi-model

- **LiteLLM** β€” OpenAI-compatible proxy fronting 100+ models.
- **OpenAI** β€” native GPT-4o, o-series, and more.
- **OpenRouter** β€” unified API for many hosted models.
- **Ollama** β€” local, private, air-gapped models.
- **Anthropic** β€” direct Claude API (Sonnet, Opus, Haiku) with native tool use.
- **Multi-model mode** β€” round-robin + intelligent fallback chains with circuit breaker (v0.5.1+).

### Verified across every target

- **452 Rust unit tests** across **18 modules** (incl. `mockito`-backed provider request/response/error paths for all 5 providers, plus RavenFabric, swarm, heartbeat, eval, and scheduler tests), runnable anywhere via `cargo test`.
- Plus a **114-check verification suite** (`scripts/verify.sh`) spanning **10 modules** across **4 deployment targets** β€” local binary, Docker, cross-compiled Linux, and Kubernetes β€” including security, performance, LLM quality, swarm, and eval checks.
- *Note:* the 114 verification checks are **system/integration level** (shell-orchestrated, requiring live services such as LiteLLM/Docker/kubectl).

---

## Documentation

- **[Getting Started Guide]docs/guides/getting-started.md** β€” install, configure, and run your first agent
- **[Configuration Reference]docs/guides/configuration.md** β€” all config options, env vars, and CLI flags
- **[Swarm Mode Guide]docs/guides/swarm-mode.md** β€” multi-agent orchestration with flat and hierarchical topologies
- **[MCP Integration Guide]docs/guides/mcp-integration.md** β€” connect to MCP servers or expose tools via MCP
- **[Heartbeat Mode Guide]docs/guides/heartbeat-mode.md** β€” autonomous long-running agents
- **[Server Mode Guide]docs/guides/server-mode.md** β€” HTTP API, endpoints, deployment, config hot-reload
- **[Examples]examples/README.md** β€” runnable Rust examples using the library API
- **[Migration Guide]docs/guides/migration.md** β€” upgrading between versions (v0.1 β†’ v1.0)
- **[API Reference]https://docs.rs/ravenclaws** β€” full rustdoc API documentation

## Quick Start

### 30 seconds to your first agent

```bash
# Build from source (requires Rust)
git clone https://github.com/egkristi/RavenClaws
cd RavenClaws
cargo build --release

# Run with any provider
export LITELLM_API_KEY="your-key"
export RAVENCLAWS__LLM__ENDPOINT="http://localhost:4000"
./target/release/ravenclaws --exec "Summarize the latest release notes"

# …or run a one-shot task and exit
./target/release/ravenclaws --exec "Summarize the latest release notes"
```

> **Note:** Pre-built binaries publish automatically on tagged releases. See the [GitHub Releases]https://github.com/egkristi/RavenClaws/releases page for downloads.

### Use as a library

RavenClaws is published on [crates.io](https://crates.io/crates/ravenclaws) as both a binary and library crate.
Add it to your `Cargo.toml`:

```toml
[dependencies]
ravenclaws = "0.9"
```

Then use the library API in your Rust project:

```rust,no_run
use ravenclaws::{Config, ChatMessage, create_client, LLMProviderTrait};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Load configuration from file/env
    let config = Config::load()?;

    // Create an LLM client
    let mut client = create_client(&config.llm)?;

    // Send a chat request
    let response = client
        .chat(&[ChatMessage {
            role: "user".to_string(),
            content: "Hello! What can you do?".to_string(),
        }])
        .await?;

    println!("{}", response.content);
    Ok(())
}
```

The library exposes all 18 modules with a stable public API:

| Module | Purpose |
|---|---|
| `ravenclaws::agent` | Agent implementations, agent loop, conversation memory |
| `ravenclaws::llm` | LLM provider abstraction + 5 client implementations |
| `ravenclaws::config` | Configuration structs, TOML/env loading, validation |
| `ravenclaws::tools` | Tool abstraction, registry, 5 built-in tools |
| `ravenclaws::policy` | Deny-by-default policy engine |
| `ravenclaws::sandbox` | Sandboxed execution (workdir jail, resource limits) |
| `ravenclaws::audit` | Tamper-evident audit log (HMAC-SHA256 chained) |
| `ravenclaws::mcp` | MCP client + server (JSON-RPC 2.0 over stdio) |
| `ravenclaws::swarm` | Swarm orchestration, worker profiles, health monitoring |
| `ravenclaws::heartbeat` | Autonomous heartbeat agent |
| `ravenclaws::background` | Background task manager with disk persistence |
| `ravenclaws::scheduler` | Scheduling & triggers (cron, webhook, file-watch) |
| `ravenclaws::server` | HTTP server mode (health, readiness, metrics, agent execution API) |
| `ravenclaws::telemetry` | OpenTelemetry tracing (OTLP gRPC/stdout) |
| `ravenclaws::ravenfabric` | RavenFabric mesh client |
| `ravenclaws::eval` | Eval harness with assertions, run traces, tool call assertions |
| `ravenclaws::error` | Unified error types |

### Docker

```bash
docker run --rm -it \
  -e LITELLM_API_KEY="your-key" \
  -e RAVENCLAWS__LLM__ENDPOINT="http://litellm:4000" \
  ghcr.io/egkristi/ravenclaws:latest
```

### Docker Compose (with LiteLLM)

```bash
docker compose up -d
docker compose logs -f ravenclaws
```

### Kubernetes

```bash
kubectl apply -f k8s/deployment.yaml
kubectl -n ravenclaws get pods
kubectl -n ravenclaws logs -l app.kubernetes.io/name=ravenclaws
```

> Server mode (`--serve`) provides a full HTTP API with `/health`, `/ready`, `/metrics`,
> `/health/deep`, `/chat`, `/execute`, `/tasks/{id}`, `/tools`, and `/tools/{name}` endpoints.
> Supports graceful shutdown, config hot-reload (SIGHUP), and configurable port.
> See the [Server Mode Guide]docs/guides/server-mode.md for details.

## Configuration

### Environment variables

| Variable | Description | Default |
|---|---|---|
| `RAVENCLAWS__LLM__PROVIDER` | Provider: litellm, openrouter, ollama, openai, anthropic, openai-compatible | `litellm` |
| `RAVENCLAWS__LLM__ENDPOINT` | LLM endpoint URL | (provider-dependent) |
| `RAVENCLAWS__LLM__MODEL` | Default model | `gpt-4o-mini` |
| `LITELLM_API_KEY` | API key for LiteLLM/OpenRouter/OpenAI | (required for cloud) |
| `RAVENCLAWS__LLMS` | JSON array for multi-model config | β€” |
| `RAVENCLAWS__RAVENFABRIC__ENDPOINT` | RavenFabric endpoint (optional) | β€” |
| `RAVENCLAWS__SECURITY__REQUIRE_TLS` | Enforce TLS | `true` |
| `RAVENCLAWS__RUNTIME__MAX_AGENTS` | Max concurrent agents | `10` |
| `RUST_LOG` | Log level | `info` |

### Single provider mode

**LiteLLM:**
```toml
[llm]
provider = "litellm"
endpoint = "http://litellm:4000"
model = "gpt-4o-mini"
timeout_secs = 30
```

**Ollama (local, no API key):**
```toml
[llm]
provider = "ollama"
endpoint = "http://localhost:11434"
model = "llama3.1"
timeout_secs = 60
```

**OpenRouter:**
```toml
[llm]
provider = "openrouter"
model = "anthropic/claude-sonnet-4-20250514"
```

**Anthropic (Native, v0.5.3+):**
```toml
[llm]
provider = "anthropic"
model = "claude-sonnet-4-20250514"
# No endpoint needed β€” uses https://api.anthropic.com
```

**OpenAI:**
```toml
[llm]
provider = "openai"
model = "gpt-4o"
```

**OpenAI-Compatible (vLLM, llama.cpp, LM Studio, TGI, Groq, Together AI, etc.):**
```toml
[llm]
provider = "openai-compatible"
endpoint = "http://localhost:8000/v1"
model = "meta-llama/Llama-3.1-8B-Instruct"
# No API key required for local inference; set via env var for cloud:
# export RAVENCLAWS__LLM__API_KEY="your-key"
```

### Multi-model mode

Configure several providers at once (basic round-robin today):

```toml
[[llms]]
provider = "ollama"
endpoint = "http://ollama:11434"
model = "llama3.1"

[[llms]]
provider = "openrouter"
model = "anthropic/claude-sonnet-4-20250514"

[[llms]]
provider = "anthropic"
model = "claude-sonnet-4-20250514"

[[llms]]
provider = "openai"
model = "gpt-4o"
```

### Full config example

```toml
[llm]
provider = "litellm"
endpoint = "http://litellm:4000"
model = "gpt-4o-mini"
timeout_secs = 30

# RavenFabric for remote execution and mesh coordination (v0.6.1)
[ravenfabric]
endpoint = "http://ravenfabric:8080"
remote_exec = true
allowed_hosts = ["litellm", "ravenfabric"]

[security]
require_tls = true
token_lifetime_secs = 3600   # agent sessions auto-terminate after 1 hour (0 = unlimited)
audit_log = true             # surface present; enforcement on roadmap (v0.4)

[runtime]
workdir = "/workspace"
max_agents = 10
health_interval_secs = 60
```

## Agent modes

| Mode | Status | Description |
|---|---|---|
| `single` | βœ… **Working** | Sends prompt to LLM, logs response (agent loop with ReAct planning) |
| `single` (multi-model) | βœ… **Working** | Iterates all configured providers, logs each response |
| `--exec "<task>"` | βœ… **Working** | One-shot task execution with streaming, then exit |
| `--no-final-required` | βœ… **v0.9.4** | Don't require `FINAL:` marker β€” any non-tool-call response completes the loop |
| `--repl` | βœ… **Working** | Interactive REPL with `/exit`, `/reset` commands |
| `--require-approval` | βœ… **v0.8** | Human-in-the-loop approval for sensitive tool calls |
| `--serve` | βœ… **v0.7.1** | Long-running HTTP server with health, metrics, agent execution API |
| `--mcp-server` | βœ… **v0.7.0** | Expose RavenClaws tools over MCP protocol |
| `swarm` | βœ… **Working** | multiple parallel agents with different personas (single + multi-model); RavenFabric-aware |
| `supervisor` | βœ… **Working** | Task decomposition + sub-agent spawning + result aggregation (single + multi-model); RavenFabric-aware |

## Building from source

### Prerequisites

- [Rust]https://rustup.rs/ 1.86+
- For Linux cross-compilation on macOS: `brew install FiloSottile/musl-cross/musl-cross`

### Build for host

```bash
git clone https://github.com/egkristi/RavenClaws
cd RavenClaws

cargo build --release      # release build for current platform
cargo test                 # unit tests
./scripts/verify.sh        # full 114-check verification suite (needs LiteLLM/Docker/kubectl)
docker build -t ravenclaws:latest .
```

### Cross-compile for all architectures

```bash
rustup target add \
    x86_64-apple-darwin aarch64-apple-darwin \
    x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu \
    x86_64-unknown-linux-musl

./scripts/build.sh --all                                   # all targets
./scripts/build.sh --target aarch64-unknown-linux-gnu      # one target
```

### Git Hooks (Pre-Commit / Pre-Push)

The project includes git hooks that run automated verification before every commit and push:

```bash
# Install hooks (one-time setup after cloning)
.githooks/setup.sh

# Verify hooks are active
.githooks/setup.sh --check

# Remove hooks (restore defaults)
.githooks/setup.sh --remove
```

**Pre-commit** (fast β€” runs in seconds):
1. `cargo fmt --check` β€” formatting
2. `cargo clippy -D warnings` β€” linting
3. `cargo test --locked` β€” unit tests
4. Binary size check β€” warns if over 5MB
5. Secrets scan β€” no hardcoded API keys/tokens

**Pre-push** (comprehensive β€” runs in 1-5 minutes):
1. Full pre-commit suite
2. Release build (`cargo build --release`)
3. Binary integrity (architecture, stripped, size)
4. Docker build (if Docker available)
5. Security scan (secrets, setuid, Cargo.lock)

**Skip hooks (emergency only):**
```bash
git commit --no-verify
git push --no-verify
```

### Multi-arch Docker image

```bash
docker buildx build \
    --platform linux/amd64,linux/arm64 \
    -t ghcr.io/egkristi/ravenclaws:latest \
    --push .
```

## Downloads

> **Note:** Pre-built binaries publish automatically on tagged releases. See the
> [GitHub Releases]https://github.com/egkristi/RavenClaws/releases page for downloads.

| Architecture | Target Triple |
|---|---|
| Apple Silicon (M1+) | `aarch64-apple-darwin` |
| Intel Mac | `x86_64-apple-darwin` |
| Linux ARM64 | `aarch64-unknown-linux-gnu` |
| Linux x86_64 (glibc) | `x86_64-unknown-linux-gnu` |
| Linux x86_64 (musl/static) | `x86_64-unknown-linux-musl` |

Container images target both `linux/amd64` and `linux/arm64`.

## Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    RavenClaws Agent                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚         Agent Modes (βœ… All Working)               β”‚    β”‚
β”‚  β”‚  Single Β· --exec Β· REPL Β· Swarm Β· Supervisor      β”‚    β”‚
β”‚  β”‚  (single-provider + multi-model for all modes)    β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                         β”‚                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚         Agent Core                                β”‚    β”‚
β”‚  β”‚  perceive β†’ plan β†’ act β†’ observe (ReAct loop)    β”‚    β”‚
β”‚  β”‚  ConversationMemory Β· max-iteration guard         β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                         β”‚                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚         LLM Provider Abstraction Layer            β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚LiteLLM β”‚ β”‚ OpenAI β”‚ β”‚OpenRtr β”‚ β”‚ Ollama β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚    β”‚
β”‚  β”‚  β”‚Anthropic β”‚ β”‚ MultiModelManager    β”‚          β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ round-robin Β· fallbackβ”‚         β”‚    β”‚
β”‚  β”‚               β”‚ circuit breaker       β”‚         β”‚    β”‚
β”‚  β”‚               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                         β”‚                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚         Security & Infrastructure Layer           β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”  β”‚    β”‚
β”‚  β”‚  β”‚Policy    β”‚ β”‚ Sandbox  β”‚ β”‚Audit   β”‚ β”‚ MCP  β”‚β”‚Raven  β”‚  β”‚    β”‚
β”‚  β”‚  β”‚Engine    β”‚ β”‚ (jail)   β”‚ β”‚Log     β”‚ β”‚Clientβ”‚β”‚Fabric β”‚  β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚    β”‚
β”‚  β”‚  TLS Β· env-only secrets Β· non-root Β· RBAC                 β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Deployment Targets  β”‚
β”‚  Binary Β· Docker Β· K8s β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

### What's implemented vs. planned

| Component | Status | Details |
|---|---|---|
| Single agent (single + multi-model) | βœ… Working | Sends prompt(s), logs response(s) |
| LLM providers (5) | βœ… Working | LiteLLM, OpenAI, OpenRouter, Ollama, Anthropic (unified trait) |
| CLI & env-var overrides | βœ… Working | `--provider`, `--endpoint`, `--model`; layered TOMLβ†’envβ†’flags |
| Config validation | βœ… Working | TLS enforcement, endpoint checks |
| Container & K8s security | βœ… Working | Distroless, non-root, read-only FS, dropped caps, seccomp, RBAC |
| CI/CD pipeline | βœ… Implemented | fmt + clippy + test, 5-target builds, multi-arch images, Cosign + SBOM + provenance + Trivy, crates.io publish, releases |
| Security scanning | βœ… Implemented | CodeQL, cargo-audit, cargo-deny, Trivy (FS + config), Hadolint, Kubescape, OSSF Scorecard |
| Verification suite | βœ… Working | 114 system/integration checks Β· 10 modules Β· 4 targets (`scripts/verify.sh`)
| Rust unit tests | βœ… Working | 452 tests across 18 modules, incl. `mockito`-backed provider request/response/error paths, RavenFabric, swarm, heartbeat, eval, scheduler |
| Reproducible builds | βœ… Working | `Cargo.lock` committed (`--locked`), multi-arch Docker cross-linker, RavenFabric agent checksum-verified |
| `--exec` one-shot mode | βœ… Working | Run a single task, then exit |
| Interactive REPL | βœ… Working | `--repl` with `/exit`, `/reset` commands |
| Agent loop / ReAct planning | βœ… Working | perceiveβ†’planβ†’actβ†’observe with max-iteration guard |
| Tool-use / function calling | βœ… Working | ToolImpl trait + ToolRegistry + 4 built-in tools + agent loop wiring |
| Streaming responses | βœ… Working | SSE streaming for LiteLLM, default fallback for others |
| Conversation memory | βœ… Working | `ConversationMemory` with configurable max history |
| System prompt / persona | βœ… Working | `LLMConfig.system_prompt`, CLI `--system-prompt`, env var |
| Swarm mode | βœ… Working | multiple parallel agents with different personas (single + multi-model) |
| Supervisor mode | βœ… Working | Task decomposition + sub-agent spawning + result aggregation (single + multi-model) |
| MCP client | βœ… Working | JSON-RPC over stdio, tool discovery and registration |
| MCP server | βœ… **v0.7.0** | Expose RavenClaws tools over stdio via MCP protocol; `--mcp-server` flag; policy-checked and audited |
| HTTP server mode | βœ… **v0.7.1** | Long-running server with `/health`, `/ready`, `/metrics`; `--serve` flag; graceful shutdown |
| OpenTelemetry tracing | βœ… **v0.7.2** | Opt-in distributed tracing with OTLP gRPC/stdout exporter; `#[instrument]` spans on agent loop, HTTP server, tools, LLM calls |
| Retry / fallback chains | βœ… Working | Exponential backoff, circuit breaker, token budgets |
| Deny-by-default policy | βœ… Working | PolicyEngine with shell/path/network allow-lists |
| Sandboxed execution | βœ… Working | Workdir jail, resource limits, timeouts |
| Tamper-evident audit log | βœ… Working | HMAC-SHA256 chained, structured JSON |
| Multi-model routing | βœ… Working | `next_client()` round-robin wired into agent modes |
| RavenFabric integration | βœ… **v0.6.1** | Full client module (`RavenFabricClient`) with health, list_agents, execute, broadcast; wired into all agent modes; 12 unit tests |

## How RavenClaws intends to win

RavenClaws is positioned against the field β€” Nemoclaw, Hermes Agent, TrustClaw,
ZeroClaw, PicoClaw, NanoClaw, Claude Cowork, Manus, Perplexity Computer, Kimi Claw,
and Vellum β€” by category:

- **vs. cloud / hosted assistants** (Claude Cowork, Manus, Perplexity Computer, Kimi Claw): RavenClaws is **self-hostable, offline-capable, and source-available** under AGPLv3. Your data and tool calls never leave infrastructure you control β€” and there is no phone-home.
- **vs. minimal agent runtimes** (ZeroClaw, PicoClaw, NanoClaw, TrustClaw): RavenClaws matches their footprint while adding a real **security model** (memory-safe core, verified supply chain, deny-by-default tool policy, sandboxing, tamper-evident audit log) plus **multi-provider** routing with fallback chains.
- **vs. SDK / platform plays** (Vellum, Hermes Agent, Nemoclaw): RavenClaws is a **single dependency-light binary**, not a service you rent or a framework you marry. Embed it, ship it, forget it.

| Our commitment | How we back it |
|---|---|
| Memory-safe core | Rust with `unsafe` forbidden |
| Tiny footprint | ~5.2 MB binary, distroless image, 0 runtime deps |
| Trustworthy releases | Cosign signing Β· SBOM Β· provenance Β· CodeQL Β· Trivy Β· OSSF Scorecard |
| Runs anywhere, privately | Self-hostable, air-gappable, no telemetry |
| Honest about status | βœ…/πŸ“‹ markers everywhere; benchmarks published, not asserted |

> Where we intend to lead β€” measurably, by v1.0: smallest footprint in class,
> sub-50 ms cold start, zero known CVEs, fully self-hostable, signed +
> SBOM-attested. These are targets we will benchmark and publish, not marketing.

## Roadmap

See **[ROADMAP.md](ROADMAP.md)** for the full phased plan and the
[feature gap analysis](ROADMAP.md#features-required-to-become-the-preferred-alternative)
versus the field.

**βœ… v0.2 β€” build honest & green (complete):** `Cargo.lock` committed (reproducible
`--locked` builds), multi-arch Docker cross-linker fixed, RavenFabric agent
checksum-verified, `--exec` wired, swarm/supervisor fail loudly, version synced, and
a 100+-test `mockito`-backed Rust suite.

**βœ… v0.3 β€” a real agent (complete):** the perceiveβ†’planβ†’actβ†’observe loop, interactive REPL,
conversation memory, and streaming.

**βœ… v0.4 β€” tools, safety & MCP (complete):** function-calling, built-in tools behind a
deny-by-default policy, sandboxing, a tamper-evident audit log, and **MCP client** β€”
the single highest-leverage step to tap the entire tool ecosystem.

**βœ… v0.5 β€” providers and routing (complete):** unified OpenAI-compatible client, retry/fallback
chains with circuit breaker, token budgets, MCP client integration, native Anthropic provider.

**βœ… v0.6 β€” swarm, supervisor (complete):** parallel swarm agents, task-decomposing supervisor,
both single-provider and multi-model variants.

**The five that matter most** toward being *preferred*: MCP (v0.5.2) Β· agent loop +
tools + sandbox (v0.3–v0.4) Β· local-first security model (v0.4) Β· async/background +
scheduling (v0.7) Β· RavenFabric distributed execution (v0.6.1).

## FAQ

### What makes RavenClaws different from other agent frameworks?

RavenClaws is a **single static binary** (~5.2 MB) with zero runtime dependencies β€” no Python, no Node.js, no JVM. It's designed to be embedded, shipped, and forgotten. Most agent frameworks are SDKs or services you integrate; RavenClaws is a tool you run.

### Do I need an API key?

For local-only use, yes β€” use **Ollama** (fully local, no API key). For cloud providers (OpenAI, Anthropic, etc.), you'll need their respective API keys.

### Can I use RavenClaws offline?

Yes. With the **Ollama** provider, everything runs locally with no internet connection required.

### How is security handled?

RavenClaws uses a **deny-by-default** security model:
- `PolicyEngine` validates all tool calls against shell/path/network allow-lists
- `Sandbox` provides workdir jail with resource limits and timeouts
- `AuditLog` records all operations in a tamper-evident HMAC-SHA256 chain
- No credentials in config files β€” environment variables and K8s Secrets only
- Memory-safe Rust with `unsafe` forbidden

### What's the difference between `--exec`, `--repl`, and `--serve`?

- `--exec "<task>"` β€” Run a single task and exit (one-shot)
- `--repl` β€” Start an interactive REPL session for back-and-forth conversation
- `--serve` β€” Start a long-running HTTP server with `/health`, `/ready`, `/metrics` endpoints

### Can I use RavenClaws as a library in my Rust project?

Yes. RavenClaws is published on [crates.io](https://crates.io/crates/ravenclaws) as both a binary and library crate. Add `ravenclaws = "0.9"` to your `Cargo.toml` and use the public API via `use ravenclaws::...`. See the [examples](examples/README.md) directory for runnable code samples.

### How do I upgrade from an older version?

See the [Migration Guide](docs/guides/migration.md) for detailed upgrade paths from v0.1 through v1.0.

### What deployment targets are supported?

- **macOS** (aarch64, x86_64) β€” native binary
- **Linux** (aarch64, x86_64) β€” native binary or Docker
- **Docker** β€” distroless multi-arch images on GHCR and Docker Hub
- **Kubernetes** β€” production-grade manifests with RBAC, network policies, PDBs

### How is RavenClaws licensed?

RavenClaws uses a dual-license model β€” see [LICENSING.md](LICENSING.md) for details.

## License

RavenClaws uses a **dual-license model**:

- **AGPL-3.0-or-later** β€” open source core. Free for personal use, OSS projects, and commercial use up to 50 agents / $5M revenue.
- **Commercial** β€” for large commercial deployments or embedding without AGPL obligations.

See [LICENSING.md](LICENSING.md) for the full breakdown.

## Contributing

1. Fork the repo
2. Create a feature branch (`git checkout -b feature/my-feature`)
3. Commit changes (`git commit -am 'Add feature'`)
4. Push (`git push origin feature/my-feature`)
5. Open a Pull Request

All contributions require signing a Contributor License Agreement (CLA) β€” see [LICENSING.md](LICENSING.md#contributor-license-agreement-cla).

---

**RavenClaws** β€” Secure Β· Small Β· Efficient Β· Robust Β· Simple. Simply the best. πŸ¦β€β¬›