wulawulu/learn-claude-code-rs
96 stars · Last commit 2026-05-17
Build an AI agent harness in Rust, from a minimal loop to tools, subagents, memory, teams, worktrees, MCP, and typed tool routing.
README preview
[](https://github.com/wulawulu/learn-claude-code-rs/actions/workflows/ci.yml) # learn-claude-code-rs English | [中文](./README.zh.md) A progressive AI Agent Harness tutorial written in Rust. This repository is a Rust-oriented learning path for building an agent harness. It starts with the smallest agent loop and gradually adds tools, planning, subagents, skills, context compaction, permissions, hooks, memory, multi-agent collaboration, worktree isolation, MCP/plugins, and tool routing. This project was inspired by [shareAI-lab/learn-claude-code](https://github.com/shareAI-lab/learn-claude-code/tree/main). Its chapter design, content organization, and some code ideas reference that project to a certain extent, then reimplement and adapt them for the Rust ecosystem. It is not a line-by-line copy or a simple port; it reorganizes the agent harness topic itself into a runnable Rust tutorial. Each chapter is an independent runnable Rust crate. You can read them in order or jump directly into a topic to see how a harness capability is expressed through data structures, runtime loops, tool interfaces, and durable state. ## Why This Repo Most LLM examples stop at tool calling. This repo focuses on the runtime around the model: - tool dispatch - permissions - skills