Skip to main content

Rust SDK overview

microclaw-sdk is the supported facade for embedding MicroClaw in another Rust application. It exposes stable Agent, Run, event, control, Skill, and Worker contracts while keeping Server, Web, channel adapters, and desktop UI code out of your dependency graph.

:::info Current distribution The supported public crates are available on crates.io at 0.6.1: microclaw-core, microclaw-engine, and microclaw-sdk. :::

Decide whether the SDK is the right entry point

ChooseWhen you needWhat owns the process
MicroClaw ServerChannels, Web/API access, schedules, and an always-on serviceMicroClaw
MicroClaw WorkA native project workspace with approvals and checkpointsMicroClaw Work
microclaw-sdkAgent behavior inside your own Rust product or serviceYour application

All three paths converge on the same provider-neutral Agent Engine. The SDK is not a second or simplified agent loop.

Choose a feature set

FeatureWhat it providesTypical host
minimalPublic contracts plus a host-provided RunExecutorA small adapter around an existing execution backend
standard (default)Runtime, Agent and Run lifecycle, controls, and local WorkerAn application that owns execution but wants MicroClaw orchestration semantics
remote-workerAuthenticated WebSocket Worker client and hostA process that submits or executes work over the network
fullConfigured Agent Engine, providers, tools, memory, Skills, MCP, hooks, Subagents, and remote Worker supportA product embedding MicroClaw's complete execution stack

For a first integration, use full. Choose minimal or standard only when your application deliberately provides its own executor.

Supported public surface

  • MicroClaw, AgentBuilder, and AgentHandle configure reusable agents.
  • RunHandle streams ordered RuntimeEventEnvelope values and resolves to one terminal RunResult.
  • RunController supports cancellation, steering, and approval decisions.
  • SkillCatalog reports discovered Skills and why unavailable Skills could not be activated.
  • LocalWorker and RemoteWorker share the same Worker contract.
  • RuntimeErrorCode and SdkError let hosts handle failures without matching Server implementation details.

Integration path

  1. Complete the SDK quickstart.
  2. Learn the Agent, Run, event, and control model.
  3. Add governed capabilities with Skills.
  4. Move execution behind local or remote Workers only when process isolation, capacity, or deployment topology requires it.
  5. Use the feature and crate guide before reducing dependency size or depending on lower-level crates directly.

The repository also contains compiling examples and a standalone downstream-consumer fixture used by CI.