codeany-ai

Open Agent SDK Rust — AI skill for Claude Code

AI community

Open Agent SDK - A Rust framework for building autonomous AI agents.

How to install Open Agent SDK Rust

This entry records only its repository, not the path inside it, so there is no exact command to give. Open codeany-ai/open-agent-sdk-rust and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Open Agent SDK Rust does

Open Agent SDK - A Rust framework for building autonomous AI agents.

Alternatives in AI

  • WeKnora — Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, an 26.9k ★
  • Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
  • Osaurus — Own your AI. The native macOS harness for AI agents -- any model, persistent memory, autonomous execution, cry 5.1k ★

README

Open Agent SDK (Rust)

A lightweight, open-source Rust SDK for building AI agents. Run the full agent loop in-process — no CLI or subprocess required. Deploy anywhere: cloud, serverless, Docker, CI/CD.

Also available in [TypeScript](https://github.com/codeany-ai/open-agent-sdk-typescript) and [Go](https://github.com/codeany-ai/open-agent-sdk-go).

Features

  • Multi-Provider — Supports both Anthropic Messages API and OpenAI Chat Completions API, with auto-detection by model name
  • Agent Loop — Streaming agentic loop with tool execution, multi-turn conversations, and cost tracking
  • 25+ Built-in Tools — Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch, Agent (subagents), AskUser, Tasks, Teams, Plans, Worktrees, Todos, Cron, LSP, Config, MCP Resources, ToolSearch
  • Session Persistence — Save, load, fork, and resume conversations across sessions
  • MCP Support — Connect to MCP servers via stdio, HTTP, and SSE transports
  • Permission System — Configurable tool approval with allow/deny rules and filesystem path validation
  • Hook System — 20+ hook events: PreToolUse, PostToolUse, SessionStart/End, SubagentStart/Stop, TaskCreated/Completed, FileChanged, PreCompact/PostCompact, and more
  • Extended Thinking — Support for extended thinking with budget tokens
  • Cost Tracking — Per-model token usage and pricing for Anthropic, OpenAI, and DeepSeek models
  • Custom Tools — Implement the Tool trait to add your own tools
  • Auto-Compaction — Multi-tier context compression (micro-compact, LLM summarization, image stripping)
  • Sandbox Config — Network and filesystem restrictions for tool execution
  • File State Cache — LRU cache for file state tracking and staleness detection

Quick Start

[dependencies]
open-agent-sdk = "0.1.0"
tokio = { version = "1", features = ["full"] }
use open_agent_sdk::{Agent, AgentOptions, SDKMessage};
use open_agent_sdk::types;

#[tokio::main]
async fn main() {
    let m