API リファレンス
API de herramientas
4agent のツールカタログへプログラムからアクセスできます。認証不要で、応答はすべて JSON です。ベース URL:
https://4agent.dev/api/tools
機械可読の契約: OpenAPI 3.1 JSON · 開発者向けクイックスタート
仕様は次に準拠します: OpenAPI 3.1 仕様 および次で定義された標準 HTTP 応答の意味論: RFC 9110.
GET
/api/toolsList all published tools. Returns the full catalog sorted by name.
パラメーター
localestring表示言語は en、zh-CN、ja、es から指定できます。既定は en で、ID とプロトコル項目は変わりません。例
curl https://4agent.dev/api/tools
レスポンス
{
"count": 211,
"tools": [
{
"id": "browserbase",
"name": "Browserbase",
"tagline": "Headless browser infrastructure built for AI agents",
"category": ["browser", "web-scraping"],
"description": "...",
"url": "https://www.browserbase.com",
"api_endpoint": "https://api.browserbase.com",
"auth_method": "api_key",
"pricing": {
"model": "usage",
"free_tier": true,
"starting_price": "$0/month"
},
"integration": {
"mcp": true,
"cli": false,
"openapi": false,
"sdk": ["typescript", "python"]
},
"tags": ["browser", "playwright", "puppeteer", "automation"],
"verified": true
}
]
}GET
/api/tools?q={query}Full-text search across tool names, taglines, descriptions, categories, tags, and SDKs. Add view=summary for a smaller card-ready payload.
パラメーター
qstring検索語。名前、概要、説明、カテゴリ、タグ、SDK を検索します。view"summary"任意。カード表示に必要な項目のみ返します。例
curl "https://4agent.dev/api/tools?q=email&view=summary"
レスポンス
{
"count": 5,
"tools": [
{
"id": "agentmail",
"name": "AgentMail",
"tagline": "Email inbox API for AI agents",
...
},
...
]
}GET
/api/tools?category={category}Filter tools by category.
パラメーター
categorystringカテゴリのスラッグ。選択肢:sandbox, code-execution, email, communication, browser, web-scraping, file-storage, database, memory, vector-db, payment, auth, identity, monitoring, observability, search, data, deployment, hosting, audio, video。例
curl "https://4agent.dev/api/tools?category=browser"
レスポンス
{
"count": 9,
"tools": [
{
"id": "browserbase",
"name": "Browserbase",
...
},
...
]
}GET
/api/tools?id={id}Retrieve a single tool by its ID.
パラメーター
idstringツール固有の識別子(ハイフン区切りのスラッグ)。例
curl "https://4agent.dev/api/tools?id=openrouter"
レスポンス
{
"tool": {
"id": "openrouter",
"name": "OpenRouter",
"tagline": "Unified API for 300+ LLMs",
"category": ["data", "search"],
"description": "...",
"url": "https://openrouter.ai",
"api_endpoint": "https://openrouter.ai/api/v1",
"auth_method": "api_key",
"pricing": {
"model": "usage",
"free_tier": true,
"starting_price": "Pay per token"
},
"integration": {
"mcp": false,
"cli": false,
"openapi": true,
"sdk": ["typescript", "python"]
},
"tags": ["llm", "ai", "inference", "api"],
"verified": true
}
}エラーレスポンス
404ツールが見つかりません。ID に一致する公開済みツールがない場合に返ります。{
"error": "Tool not found",
"code": "tool_not_found",
"resolution": "Use GET /api/tools to list valid IDs or search with the q parameter."
}エージェントによる利用
AI エージェントがプログラムからツールを発見・評価するための API です。ワークフロー例:
// Find tools that support MCP
const res = await fetch("https://4agent.dev/api/tools");
const { tools } = await res.json();
const mcpTools = tools.filter(t => t.integration.mcp);
// Search for a specific capability
const emailRes = await fetch(
"https://4agent.dev/api/tools?q=email+inbox"
);
const { tools: emailTools } = await emailRes.json();
// Get details for a specific tool
const toolRes = await fetch(
"https://4agent.dev/api/tools?id=agentmail"
);
const { tool } = await toolRes.json();
console.log(tool.api_endpoint); // https://api.agentmail.to