Skip to main content

pi_agent/tools/
mod.rs

1//! Builtin tools: read, write, edit, bash, ls, grep, glob.
2//!
3//! Mirrors the core toolset shipped in `packages/coding-agent/src/core/...`.
4
5pub mod bash;
6pub mod edit;
7pub mod glob_tool;
8pub mod grep;
9pub mod ls;
10pub mod read;
11pub mod todo;
12pub mod web_fetch;
13pub mod write;
14
15use std::sync::Arc;
16
17use crate::types::AgentTool;
18
19/// Returns the default suite of builtin tools used by the coding agent.
20pub fn default_tools() -> Vec<Arc<dyn AgentTool>> {
21    vec![
22        Arc::new(read::ReadTool),
23        Arc::new(write::WriteTool),
24        Arc::new(edit::EditTool),
25        Arc::new(bash::BashTool),
26        Arc::new(ls::LsTool),
27        Arc::new(grep::GrepTool),
28        Arc::new(glob_tool::GlobTool),
29        Arc::new(web_fetch::WebFetchTool),
30        Arc::new(todo::TodoTool::new()),
31    ]
32}