openclaw-agents 0.1.0

Agent runtime and workflow engine for OpenClaw
Documentation

openclaw-agents

Agent runtime for the community Rust implementation of OpenClaw

Crates.io Documentation License

Part of openclaw-rs, a community Rust implementation of OpenClaw. This crate provides agent runtime, sandboxing, and workflow engine.

Features

  • Agent Runtime: Execute AI agents with tool access
  • Sandbox: Platform-specific process isolation
    • Linux: bubblewrap (bwrap)
    • macOS: sandbox-exec
    • Windows: Job Objects
  • Tool Registry: Register and execute tools
  • Workflows: Node-based workflow execution (m9m pattern)

Usage

use openclaw_agents::{AgentRuntime, ToolRegistry, SandboxConfig, SandboxLevel};
use openclaw_providers::AnthropicProvider;

// Create tool registry
let mut tools = ToolRegistry::new();
tools.register(my_tool);

// Create sandbox config
let sandbox = SandboxConfig {
    level: SandboxLevel::Strict,
    allowed_paths: vec![PathBuf::from("./workspace")],
    network_access: false,
    max_memory_mb: Some(512),
    timeout_seconds: Some(30),
};

// Create agent runtime
let runtime = AgentRuntime::new(provider)
    .with_tools(tools)
    .with_sandbox(sandbox);

// Process message
let response = runtime.process_message(&mut context, "Hello!").await?;

Sandbox Levels

Level File Access Network Use Case
None Full Allowed Development/testing
Relaxed Workspace only Allowed General agents
Strict Workspace only Blocked Untrusted code execution

License

MIT License - see LICENSE for details.