Agents automatically select and use tools based on your task. No configuration required.

How Tools Work

Agents automatically choose tools when needed:
// Agent will automatically use web browsing tools
const research = await agentbase.runAgent({
  message: "Find the latest pricing for our competitors"
});

// Agent will automatically create computer environment and use bash/file tools
const development = await agentbase.runAgent({
  message: "Create a Python script that processes CSV data"
});

Available Tools

Based on comprehensive API testing, here are the verified tools that Agentbase agents have access to:
CategoryToolDescription
File Systemstr_replace_editorCreate, edit, view, and manage files with persistent state across sessions
bashRun shell commands with internet access and package management capabilities
globFind files using glob patterns (e.g., *.js, **/*.ts)
grepSearch for text patterns in files with regex support
Web Toolsweb (search)Search the web for real-time information and current data
web (crawl)Extract content from specific URLs and websites
Computer EnvironmentcomputerCreate/resume Linux computer instances for development tasks
Thinking & PlanningthinkPrivate scratchpad for complex reasoning, planning, and maintaining context
Development EnvironmentPython 3.11.2Execute Python code and scripts
Node.js 18.20.4JavaScript runtime environment
Package managementapt (Debian), pip (Python), npm (Node.js)

Tool Events & Responses

When agents use tools, the API streams real-time events showing tool execution:

Tool Execution Events

  • agent_tool_use - Shows which tool is being called and with what parameters
  • agent_tool_response - Returns the result from the tool execution
  • agent_cost - Tracks the cost of each tool operation
  • agent_step - Indicates completion of each step in the workflow

Example Tool Event Flow

// Tool execution starts
{"type": "agent_tool_use", "content": "{\"tool\":\"web\",\"input\":\"{\\\"command\\\":\\\"search\\\",\\\"query\\\":\\\"AI developments 2025\\\"}\"}"}

// Tool returns results  
{"type": "agent_tool_response", "content": "{\n  \"tool\": \"web\",\n  \"response\": [\n    {\n      \"url\": \"https://example.com/ai-news\",\n      \"title\": \"Latest AI Developments\"\n    }\n  ]\n}"}

// Cost tracking
{"type": "agent_cost", "session": "abc123", "cost": "0.0095", "balance": 47.45}

// Step completion
{"type": "agent_step", "session": "abc123", "stepNumber": 1}

Key Points

  • Tools are selected automatically based on your task
  • No manual configuration or tool specification required
  • Computer environments created when needed for stateful operations
  • All tools work together seamlessly in workflows

What’s Next?