compare · vs Rig

openclaw-rs vs Rig

Rig is a Rust agent library you embed in your service. openclaw-rs is a Rust runtime you deploy as a binary. Different shapes for different problems.

Rig is a clean Rust library for LLMs, embeddings, and agents — designed to be embedded in a service you write. openclaw-rs is a Rust runtime designed to be deployed as a binary your services talk to.

Same language, different shapes.

What Rig is good at

  • Embeddability. You import it into your existing Rust service.
  • Clean abstractions. Provider trait, completion model, agent — small surface, easy to reason about.
  • Embeddings + RAG. First-class support for vector store providers.
  • Compositional: you build your own runtime concerns on top.

If you’re a Rust team building a single service that needs agent capabilities, Rig is a great fit.

What openclaw-rs is good at

  • Deployable runtime. cargo install openclaw-cli && openclaw gateway run and you have a server.
  • Session store built in. sled-backed event log with replay.
  • Sandbox built in. bwrap / sandbox-exec / Job Objects.
  • Gateway built in. axum HTTP + WebSocket + JSON-RPC.
  • Dashboard built in. Vue 3, embedded.
  • Channel adapters. Telegram today.
  • Plugin bridge. TypeScript plugins keep working.
  • Encrypted credentials. AES-256-GCM + Argon2id.

If you want a runtime (not a library), openclaw-rs gives you the whole thing.

When you’d reach for Rig

  • You’re writing a single Rust service.
  • That service needs LLM calls + tool use + maybe RAG.
  • You don’t want a second process, a second deployment, a second port.
  • You’re comfortable building the session/audit/sandbox layers yourself if and when you need them.

This is the “library” shape, and it’s exactly right for many problems.

When you’d reach for openclaw-rs

  • You want the agent layer to be a separate service.
  • You have multiple clients (CLI, Node app, mobile, channels) that all need to talk to it.
  • You want session replay, audit logs, sandboxing, encrypted credentials — without writing them yourself.
  • You have existing TypeScript OpenClaw plugins to bring along.

This is the “runtime” shape, and it’s exactly right for production agent infrastructure.

The category question

It’s tempting to lump every Rust agent project into one comparison table. That doesn’t really hold up. Rig and openclaw-rs are answering different questions:

  • “What’s the best Rust SDK for LLMs/agents?” → Rig.
  • “What’s the best Rust deployable agent runtime?” → openclaw-rs.

If you read this far and you still want a single right answer, the heuristic is: library or runtime?

If you’re embedding agent capabilities into something else you’re building, you want a library. If you’re operating a runtime that other things call into, you want a runtime.

The honest closer

We like Rig. The Rust agent ecosystem is small and growing, and “more good options” is healthy. If your problem is library-shaped, you should use Rig. If it’s runtime-shaped, you should use openclaw-rs. There’s no shame in either pick.

Pick openclaw-rs if…
  • You want a deployable runtime, not just a library to embed.
  • You need an event-sourced session store, an embedded dashboard, a JSON-RPC gateway, and channel adapters out of the box.
  • You want TypeScript plugin compatibility for an existing OpenClaw ecosystem.
  • You want a CLI with onboard, doctor, daemon, and config commands ready to go.
Pick Rig if…
  • You're building a single Rust service and want to embed an agent SDK directly without a separate runtime process.
  • You don't need sessions, channels, dashboards, or plugin bridges — just a great library for LLM calls and tool use.
  • You prefer composing primitives yourself rather than adopting an opinionated runtime.
  • Your team is small, your scope is focused, and a library is a better fit than a runtime.

FAQ

Is Rig a competitor or a complement?
Honestly, more of a complement. Rig is an excellent library for the inside-your-service case; openclaw-rs is a runtime for the outside-your-service case. Use whichever shape your problem has.
Can I use Rig inside openclaw-rs?
You could — register a tool implemented via Rig if that maps to your problem. They aren't incompatible.
next

See the whole architecture.

openclaw-rs ships an event store, a sandboxed runtime, a JSON-RPC gateway, providers, channels, plugins, a CLI, an embedded dashboard, and Node bindings — in one binary.