Tools enable agents to interact with their environment, perform actions, and access external resources. Shadow Agent SDK comes with a comprehensive set of built-in tools.
use shadow_agent_sdk::{Agent, tools::*};#[tokio::main]async fn main() -> Result<()> { let mut agent = Agent::new("api-key").await?; // Add file tools agent.add_tool(ReadFile::new()); agent.add_tool(Glob::new()); // Ask agent to analyze project structure let response = agent.execute( "List all Rust files in the src directory and \ summarize the main modules" ).await?; println!("{}", response); Ok(())}
let mut agent = Agent::new("api-key").await?;agent.add_tool(BashExecutor::new());let response = agent.execute( "Run the test suite and report any failures").await?;