Skip to main content

Crate microclaw_sdk

Crate microclaw_sdk 

Source
Expand description

Stable facade for embedding MicroClaw in Rust applications.

minimal exposes protocol contracts only, standard adds the embeddable runtime, and full adds configuration-driven Agent Engine construction and Skill discovery.

Structs§

Agent
A reusable Agent handle with a fixed identity, prompt, Skills, and tool policy.
AgentBuilder
Builder for an Agent identity and its selected Skills.
AgentHandle
AgentId
AgentProfile
BackgroundJob
A shell command running (or finished) in the background of a session: started with run_in_background, or moved there by the user while it ran.
CallerContext
Checkpoint
A workspace checkpoint (see MicroClaw::checkpoint).
ContextUsage
How full a session’s context is (estimates; see MicroClaw::context_usage).
ControlRequest
A control message received by an executor that can be explicitly accepted or rejected.
DelegatedTask
Stable SDK projection of a durable task delegated by the Main Agent.
ExecutionContext
Runtime-owned context passed to an execution engine for one run.
ExecutionResult
LocalWorker
MicroClaw
A configured, embeddable MicroClaw runtime.
ModelUsage
Token usage of one model within a session.
RemoteWorker
A Worker backed by a versioned remote transport.
RemoteWorkerOptions
Reconnection policy for remote Worker runs.
RunController
Cloneable control plane for a running task.
RunHandle
RunId
RunRequest
RunResult
Runtime
RuntimeApprovalOption
RuntimeBuilder
RuntimeCapabilities
RuntimeError
RuntimeEventEnvelope
Versioned transport envelope for replayable runtime event streams.
RuntimePlanStep
RuntimeStats
SessionCompaction
Result of compacting a session.
SessionId
SessionMark
A point in a session’s conversation ([MicroClaw::session_mark]). Valid within the process that took it.
SessionMessage
One stored message of a named session (see MicroClaw::session_messages).
SessionUsage
Token usage of one session.
SkillCatalog
A snapshot of Skills discovered while the SDK runtime was initialized.
SkillSummary
Stable, UI-neutral metadata for one discovered Skill.
ToolGateCall
Embedder tool gate (permission rules, hooks); see [MicroClawBuilder::tool_gate]. One tool call as seen by the gate.
ToolGateOutcome
Embedder tool gate (permission rules, hooks); see [MicroClawBuilder::tool_gate]. A decision plus an optional replacement input.
ToolGateResult
Embedder tool gate (permission rules, hooks); see [MicroClawBuilder::tool_gate]. The tool result as seen by ToolGate::after.
WorkerDescriptor
WorkerHealth
WorkerId

Enums§

DelegatedTaskStatus
Lifecycle state for a task delegated by the Main Agent.
RunStatus
RuntimeApprovalDecision
RuntimeApprovalOptionKind
RuntimeBuildError
RuntimeControl
RuntimeErrorCode
RuntimeEvent
An observable event emitted by the shared agent runtime.
RuntimePlanStepStatus
RuntimeProcessKind
SdkError
An SDK-level error that does not expose Server or Agent Engine implementation types.
SdkErrorCode
Stable category for handling SDK failures without parsing display strings.
SessionMessageRole
Who wrote a SessionMessage.
ToolGateDecision
Embedder tool gate (permission rules, hooks); see [MicroClawBuilder::tool_gate]. What to do with a tool call.
ToolPolicy
WorkerCommand
Transport-neutral command vocabulary for a remote Worker endpoint.
WorkerFrame
Frames returned by a Worker transport. Events and the terminal result may be streamed over WebSocket/SSE or represented by repeated polling without changing their JSON shape.
WorkerHealthStatus

Constants§

INTERACTIVE_APPROVALS
RunRequest::metadata key. Set it to true and a tool call that needs a human pauses the run: the Agent Engine emits ApprovalRequired and waits for RunController::resolve_approval_confirmed(approval_id, "1" | "2" | "3") (approve once, always allow the tool in this session, deny) instead of ending the run with a text prompt that the next message answers.
WORKER_PROTOCOL_VERSION

Traits§

RunExecutor
Product-independent execution port used by the Runtime.
ToolGate
Embedder tool gate (permission rules, hooks); see [MicroClawBuilder::tool_gate].
Worker
WorkerConnection
One ordered, bidirectional connection to a remote Worker endpoint.
WorkerTransport
Creates independent remote Worker connections for discovery, health, and runs.

Functions§

validate_worker_protocol_version