Ai Agent
Description
Idiomatic agent sdk inspired by the claude code source leak.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
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
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI