Built-in Tools
UseBelha agents can use built-in tools to search the web, execute code, read URLs, make API calls, and answer questions from documents.
Available Tools
Web Search
googleSearchSearch the web for current information.
Configuration
"googleSearch": { "enabled": true }Example Prompt
"What are the latest developments this week?"
Code Execution
codeExecutionWrite and execute Python code in a secure sandbox.
Configuration
"codeExecution": { "enabled": true }Example Prompt
"Calculate the first 20 prime numbers"
URL Reading
urlContextRead and summarize web pages for research.
Configuration
"urlContext": { "enabled": true }Example Prompt
"Summarize https://example.com/article"
HTTP Actions
httpActionsBuild custom integrations with any REST API using URL templates and parameter substitution.
Configuration
"httpActions": [{ "name": "getWeather", "method": "GET", "url": "https://wttr.in/{{city}}" }]Example Prompt
"What is the weather in Tokyo?"
File Search (RAG)
fileSearchAnswer questions from uploaded documents using retrieval-augmented generation (RAG).
Configuration
"fileSearch": { "enabled": true, "storeId": "fileSearchStores/xxx" }Example Prompt
"What does our policy say about refunds?"
Tool Configuration
Tools are configured in the agent's tools object:
{
"name": "My Agent",
"systemPrompt": "You are a helpful assistant...",
"tools": {
"googleSearch": { "enabled": true },
"codeExecution": { "enabled": true },
"urlContext": { "enabled": true }
}
}HTTP Actions
HTTP Actions allow custom API integrations. Each action defines:
| Field | Description |
|---|---|
name | Function name the AI will call |
description | What the function does (helps AI decide when to use it) |
method | HTTP method (GET, POST, PUT, DELETE) |
url | URL template with {{param}} placeholders |
headers | Optional headers object |
body | Optional body template for POST/PUT |
Security
HTTP Actions have built-in security protections:
- SSRF Protection - Blocks requests to localhost, private IPs, and cloud metadata endpoints
- Timeout - 10-second timeout on all requests
- Protocol Restriction - Only HTTP/HTTPS allowed
File Search (RAG)
File Search uses retrieval-augmented generation (RAG) to answer questions from uploaded documents.
- Upload documents via
POST /api/knowledge - Enable
fileSearchon your agent with thestoreId - The AI will automatically search documents to answer questions
Supported formats: PDF, TXT, HTML, CSV, MD, JSON, XML
Adding Tools to an Agent
# Add a tool
curl -X POST "https://dev.usebelha.com/api/agents?id=ag_xxx&action=addTool" \
-H "Content-Type: application/json" \
-H "x-api-key: your-key" \
-d '{"toolType": "googleSearch", "config": {"enabled": true}}'
# Remove a tool
curl -X POST "https://dev.usebelha.com/api/agents?id=ag_xxx&action=removeTool" \
-H "Content-Type: application/json" \
-H "x-api-key: your-key" \
-d '{"toolType": "googleSearch"}'