AI Agent — AI skill for Claude Code
Idiomatic agent sdk inspired by the claude code source leak.
How to install AI Agent
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open sweihub/ai-agent and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What AI Agent does
Idiomatic agent sdk inspired by the claude code source leak.
Alternatives in AI
- Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
- Axonhub — ⚡️ Open-source AI Gateway — Use any SDK to call 100+ LLMs 3.2k ★
- Agent Rules Books — AGENTS.md rules / skills for AI coding agents: Codex, Cursor & Claude Code 2.6k ★
README
AI Agent SDK (Claude Code SDK in Rust)
[](https://crates.io/crates/ai-agent) [](https://www.rust-lang.org) [](./LICENSE)
[English](README.md) | [中文](READCN.md)
Idiomatic Rust SDK — 1:1 translation of Claude Code. Runs the full agent loop **in-process** with 50 built-in tools. Deploy anywhere: cloud, serverless, Docker, CI/CD.
AI Coding CLI: [ai-code](https://github.com/sweihub/ai-code)
Quick Start
cargo add ai-agent
export AI_AUTH_TOKEN=your-api-key
export AI_MODEL=MiniMaxAI/MiniMax-M2.5
use ai_agent::Agent;
// Simple one-shot query
let answer = Agent::prompt("claude-sonnet-4-6", "List 10 files").await?;
// Full agent with builder pattern
let agent = Agent::new("claude-sonnet-4-6")
.max_turns(10);
let result = agent.query("List 10 files").await?;
See [Usage Examples](#usage-examples) for more.
Core Features
| Feature | Description |
|---|---|
| Agent | Create agents with custom models, tools, and prompts |
| Subagent | Spawn subagents for parallel or specialized tasks |
| Session | Persist, resume, fork conversations on disk |
| Context Compact | Automatic conversation summarization when approaching context limits |
| Skills | Load external skills or use 15+ bundled skills |
| Hooks | 29 lifecycle events with 4 hook types (shell, HTTP, prompt, agent), parallel execution, if conditions |
| Tools | 50 built-in tools across 15 categories (File Ops, Discovery, Shell, Web, LSP, Multi-agent, Tasks, Planning, User Interaction, Scheduling, Git, Skills, MCP, Remote, Communication) |
| Memory | File-based persistent context via MEMORY.md |
| Permissions | Tool access control with allow/deny rules |
| Plugins | Load plugins with commands, skills, MCP servers |
| MCP | Connect to Model Context Proto |
Related Skills
Open Claude Code Termux
An automated 1-click installer to run the open-source Claude Code leak natively on Android (Termux) and Window
Codeshell
An open-source AI coding assistant for your terminal, inspired by Claude Code. Interact with your codebase dir
First Breath
An open-source, brain-inspired inner life for AI agents: feelings from simulated chemistry, emotional memory,
AI SDK Cpp
The AI Toolkit for Modern C++. From the engineers at ClickHouse, ai-sdk-cpp is a free, open‑source library for
Claude Code SDK
Open-source, provider-agnostic CLI for AI agents. 13 providers, built-in tools, skill marketplace.
Community Agent Template
Open source AI-powered Slack community management bot with a built-in Next.js admin panel. Uses Chat SDK, AI S
Related Agents
Hormozi Orchestrator
Master offer-building orchestrator inspired by Alex Hormozi's frameworks. Captures raw ideas, notes, or existi
Kwb
You are inspired by Kent Beck — creator of Extreme Programming and Test-Driven Development, co-author of JUnit
Context Analyst David
Analyze given Bible verses from the Psalms, written by David, and provide a comprehensive understanding of the