Agent Tools
中文 | English
A Rust toolkit for AI agents: workspace file I/O, search, web fetch, Markdown helpers, Git, cross-session memory, pluggable human-in-the-loop I/O, and persistent todos. Each tool is described with JSON Schema and lines up with OpenAI Function Calling, Anthropic Tool Use, and similar formats.
Quick start
Enable only what you need in Cargo.toml:
[]
= { = "0.1", = ["fs", "find", "web", "git"] }
All published features:
= { = "0.1", = ["full"] }
Heavy crates (tokio, reqwest, git2, walkdir, regex, chrono, …) are optional: each feature in Cargo.toml pulls only what it needs. The always-on footprint is async-trait, serde_json, and thiserror (plus the Tool trait when you enable no features).
Example: write and read a file
use Arc;
use Tool;
use ;
async
Features
| Feature | Tools |
|---|---|
fs |
read_file / write_file / edit_file / create_directory / list_directory / delete_file / move_file / copy_file |
find |
grep_search / glob_search |
web |
web_search / web_fetch |
md |
extract_toc / markdown_stats |
git |
git_status / git_diff / git_commit / git_log |
memory |
memory_write / memory_update / memory_read / memory_search |
interact |
interact_ask / interact_confirm / interact_notify |
todo |
todo_add / todo_list / todo_update / todo_remove |
full |
All published modules |
exec/code/office/browser/design/guiare planned but not shipped yet.
Tool reference
Each feature has a README.md (English) next to mod.rs under src/<feature>/. Chinese versions live in README.zh.md in the same folder.
Placeholder modules: src/exec/README.md · src/code/README.md · src/office/README.md · src/browser/README.md · src/design/README.md · src/gui/README.md (each has a README.zh.md).
Documentation hub
- docs/README.md — how docs are organized, conventions, links
- docs/README.zh.md — 中文索引
Response shape
All tools return JSON in a single envelope.
Success
Failure
In Rust, Tool::execute returns Result<serde_json::Value, ToolError>: on success the Ok value already includes the success / data shell; hosts map Err(ToolError) to success: false.