Core Architecture
RunVero runs AI agent tools inside a default-deny WebAssembly (WASI 0.2) sandbox host, enforcing capability-based access rules, instruction-level fuel budgets, and digest-verified package integrity. See Security & Trust Model for the full deployment boundary matrix and limitations.
flowchart TB Client(["Client / Agent<br/>CLI · Python SDK · MCP"]) Gateway["HTTP & MCP Gateway<br/>Auth · Quotas · Task grants"] Host[["Control Plane Host<br/>Rust Wasmtime runtime"]] Title["Isolated WebAssembly Sandbox<br/>WASI 0.2 / Wasmtime"]
subgraph Sandbox[" "] direction LR Wasi["Virtualized WASI<br/>No ambient I/O"] Gov["Fuel & memory limits<br/>Epoch deadlines"] Guest["Guest tool<br/>wasm32-wasip2"] Wasi --> Gov --> Guest end
Broker{{"Credential Broker & Redactor<br/>Placement · SSRF guard · Audit"}} Output(["Redacted result<br/>Fuel telemetry · Signed record"])
Client --> Gateway --> Host --> Title --> Sandbox Sandbox --> Broker --> Output class Title sandboxTitleArchitectural Layers
Section titled “Architectural Layers”1. HTTP & MCP Gateway Layer
Section titled “1. HTTP & MCP Gateway Layer”The gateway exposes HTTP REST (/v1/execute) and MCP JSON-RPC (/mcp) endpoints:
- Defensive Security Headers: Enforces
X-Content-Type-Options: nosniff,X-Frame-Options: DENY, andCache-Control: no-store. - Bounded Admissions & Quotas: Authenticates
rv_live_*/rv_test_*keys, enforces narrow-only request ceilings, verifies optionalX-RunVero-Task-Grantpolicies, and caps concurrent workers. - CORS Defense: Blocks wildcard permissive CORS headers.
2. WASI 0.2 Component Sandbox
Section titled “2. WASI 0.2 Component Sandbox”Built on Wasmtime, RunVero instantiates guest tools as single-use WebAssembly components:
- No Ambient Filesystem: File access is off by default; when enabled, guests see only quota-bounded virtual
/input,/tmp, and/outputtrees. - No Ambient Networking: Guest components cannot open raw sockets or perform ambient DNS resolution; outbound HTTP passes through a resolve-then-connect SSRF guard.
- Dual Fuel & Epoch Interruption: Deterministic instruction fuel bounds compute loops while an epoch ticker interrupts guests blocked in host I/O.
3. Host Credential Brokering & Redaction
Section titled “3. Host Credential Brokering & Redaction”Credentials (API tokens, webhook signing keys) remain in host memory rather than raw guest environment variables:
- Guest tools receive per-execution opaque placeholders (
rvsec_...), or referencesigning-onlyHMAC keys that are never substituted into wire bytes. - Outbound HTTP hooks verify destination rules, task-grant
allowed_credentials, and explicit request placement (header,query, or JSONbodypointer) before injecting values. - Exact secret strings and common token prefixes are scrubbed from responses, errors, and logs as defense-in-depth (see Credential Protection for redaction scope and limits).