Skip to main content
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",
});

Built-in Tools

Here are the built-in 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)

Example Tool Event Flow

When agents use tools, the API streams real-time events showing tool execution:
// 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}

Custom Tools

You can write custom code tools with environment variables in the Agentbase app’s Tools section: Custom tools interface showing code editor with environment variables
// Example custom tool usage
const result = await agentbase.runAgent({
  message: "Get customer data for user ID 12345",
  tools: ["get_customer_data"], // deployed tool name on the agentbase app
});

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