Installation
Prerequisites
- Rust stable toolchain - install from rustup.rs
- Linux - required for full functionality (seccomp-BPF, AppArmor, cgroups, nftables, overlayfs)
- Recommended: Windows with WSL 2 (Debian) for development on Windows hosts
Optional tools used by specific features:
python3,node- needed forsandbox.execwith those runtimesmdbook- to build this documentation
Building from Source
# Clone the repository
git clone <repo-url> Scarab-Runtime
cd Scarab-Runtime
# Build all crates
cargo build
# Run all tests (unit + integration)
cargo test
# Run enforcement tests (requires root - validates cgroups, AppArmor, seccomp)
sudo cargo test
Build artifacts are placed in target/debug/:
| Binary | Path |
|---|---|
agentd | target/debug/agentd |
ash | target/debug/ash |
example-agent | target/debug/example-agent |
Release Build
cargo build --release
# Binaries in target/release/
System Directories
agentd expects or creates these directories at runtime:
| Path | Purpose |
|---|---|
/run/agentd/ | Unix socket (agentd.sock) |
/var/lib/scarab-runtime/ | Agent install store, SQLite memory DB |
/var/log/scarab-runtime/ | Audit log, observation logs |
For development, agentd will create these under /tmp/agentd-* if it lacks permission to write to /run/ and /var/.
OpenRouter API Key
The lm.complete and lm.embed tools route LLM requests through OpenRouter. Set your key before starting agentd:
export OPENROUTER_API_KEY=sk-or-...
Or register it as a secret so agents can reference it via handle syntax:
ash secrets add openrouter-key