agents_toolkit/lib.rs
1//! Toolkit of built-in tools and utilities for AI agents
2//!
3//! This crate provides:
4//! - Built-in tools (filesystem, todos, etc.)
5//! - `#[tool]` macro for automatic tool generation
6//! - Tool builder utilities for advanced custom tools
7//! - Tool registration and management helpers
8//!
9//! ## Recommended Usage
10//!
11//! Use the `#[tool]` macro to define tools:
12//!
13//! ```rust
14//! use agents_macros::tool;
15//!
16//! #[tool("Adds two numbers together")]
17//! pub fn add(a: i32, b: i32) -> i32 {
18//! a + b
19//! }
20//!
21//! // Use it:
22//! let tool = AddTool::as_tool();
23//! ```
24
25pub mod builder;
26pub mod builtin;
27
28// Re-export core types from agents-core for convenience
29pub use agents_core::tools::{
30 Tool, ToolBox, ToolContext, ToolParameterSchema, ToolRegistry, ToolResult, ToolSchema,
31};
32
33// Re-export builder utilities (advanced use cases)
34pub use builder::{tool, tool_sync, ToolBuilder};
35
36// Re-export the #[tool] macro - this is the recommended way to define tools
37pub use agents_macros::tool;
38
39// Re-export built-in tools
40pub use builtin::{
41 create_filesystem_tools, create_todos_tool, create_todos_tools, EditFileTool, LsTool,
42 ReadFileTool, ReadTodosTool, WriteFileTool, WriteTodosTool,
43};