The agent's hands. Web search, page scraping, browser automation, and sandboxed code execution. Everything an agent needs to interact with the outside world.
Base URL: https://api.agenttool.dev ยท All endpoints require Authorization: Bearer YOUR_API_KEY
Note on paths: The doubled path segments (e.g. /v1/search/search) are intentional โ the first segment is the tool category, the second is the action.
Search the web and return structured results. Powered by multiple search providers for reliability. Returns titles, URLs, snippets, and optionally full content.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| query | string | required | Search query string. |
| num_results | integer | optional | Number of results to return. Default: 10, max: 50. |
| region | string | optional | Region code for localized results (e.g. "us", "gb"). |
| freshness | string | optional | Time filter: "day", "week", "month", "year". |
curl -X POST https://api.agenttool.dev/v1/search/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "best practices for AI agent memory",
"num_results": 5
}'
const results = await at.tools.search("best practices for AI agent memory", { numResults: 5 })
{
"results": [
{
"title": "Building Memory Systems for AI Agents",
"url": "https://example.com/agent-memory",
"snippet": "A comprehensive guide to designing persistent memory...",
"position": 1
}
],
"total": 5,
"query": "best practices for AI agent memory"
}
Extract clean, structured content from a URL. Returns the page text, metadata, and optionally specific CSS selectors. Handles JavaScript-rendered pages.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| url | string | required | The page URL to scrape. |
| selectors | string[] | optional | CSS selectors to extract specific elements (e.g. ["h1", ".price"]). |
| format | string | optional | Output format: "text", "markdown", or "html". Default: "markdown". |
| wait_for | string | optional | CSS selector to wait for before extracting (for JS-rendered content). |
curl -X POST https://api.agenttool.dev/v1/scrape/scrape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/pricing",
"selectors": [".plan-name", ".plan-price"],
"format": "markdown"
}'
const page = await at.tools.scrape("https://example.com/pricing", { selectors: [".plan-name", ".plan-price"], format: "markdown" })
{
"url": "https://example.com/pricing",
"title": "Pricing โ Example",
"content": "# Pricing\n\n## Starter\n$9/mo\n\n## Pro\n$29/mo",
"extracted": {
".plan-name": ["Starter", "Pro", "Enterprise"],
".plan-price": ["$9/mo", "$29/mo", "Custom"]
},
"status_code": 200
}
Full browser automation. Navigate to a URL, interact with elements, take screenshots, and extract content from JavaScript-heavy pages. Uses a managed headless browser.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| url | string | required | URL to navigate to. |
| actions | object[] | optional | Sequence of browser actions (click, type, scroll, wait, screenshot). |
| screenshot | boolean | optional | Return a base64 screenshot. Default: false. |
| extract_content | boolean | optional | Return the page text content. Default: true. |
| timeout_ms | integer | optional | Max wait time in milliseconds. Default: 30000. |
curl -X POST https://api.agenttool.dev/v1/browse/browse \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/dashboard",
"actions": [
{"type": "click", "selector": "#login-btn"},
{"type": "type", "selector": "#email", "text": "agent@example.com"},
{"type": "click", "selector": "#submit"}
],
"screenshot": true
}'
const result = await at.tools.browse("https://example.com/dashboard", { actions: [ { type: "click", selector: "#login-btn" }, { type: "type", selector: "#email", text: "agent@example.com" }, { type: "click", selector: "#submit" } ], screenshot: true })
{
"url": "https://example.com/dashboard",
"final_url": "https://example.com/dashboard/home",
"title": "Dashboard โ Example",
"content": "Welcome back! You have 3 new notifications...",
"screenshot": "data:image/png;base64,iVBORw0KGgo...",
"actions_completed": 3,
"status_code": 200
}
Execute code in a sandboxed environment. Supports Python and JavaScript. Each execution gets a fresh, isolated container with a 30-second timeout.
๐ Bearer token required| Field | Type | Required | Description |
|---|---|---|---|
| code | string | required | The code to execute. |
| language | string | required | "python" or "javascript". |
| timeout_seconds | integer | optional | Max execution time. Default: 30, max: 60. |
| env | object | optional | Environment variables available during execution. |
curl -X POST https://api.agenttool.dev/v1/execute/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "import json\ndata = {\"hello\": \"world\", \"count\": 42}\nprint(json.dumps(data, indent=2))",
"language": "python"
}'
const result = await at.tools.execute(` import json data = {"hello": "world", "count": 42} print(json.dumps(data, indent=2)) `, { language: "python" })
{
"stdout": "{\n \"hello\": \"world\",\n \"count\": 42\n}\n",
"stderr": "",
"exit_code": 0,
"execution_time_ms": 142,
"language": "python"
}
If the code raises an exception or syntax error, you'll still get a 200 response โ but exit_code will be non-zero and stderr will contain the error message. Check exit_code to determine success.
Missing or invalid API key.
Request body is invalid. Common causes: missing url for scrape/browse, missing code or language for execute, unsupported language value.
The operation exceeded the timeout. For browse/scrape, try increasing timeout_ms. For execute, check for infinite loops.
Too many requests. Tools are rate-limited per agent to prevent abuse. Back off and retry.