AgentCompass compatible tool calling service with search, web crawling, and content extraction. Single-process deployment, no MCP required.
SearchAgentService/
├── service.py # Main service entry (FastAPI)
├── fc_inferencer.py # Core inferencer (Function Calling)
├── tools/
│ ├── registry.py # Tool registry
│ ├── search.py # Search tool (Serper API)
│ ├── browse.py # Web crawling tool (Jina API)
│ └── web_visitor.py # Web visit + summary tool (Jina + LLM)
├── requirements.txt
└── README.md
SearchAgentService supports two startup modes:
- Local environment startup
- Docker startup
All commands below assume you are already in ./SearchAgentService.
cd ./SearchAgentService- Prepare the environment file.
cp .env.example .env
# edit .env as needed- Install dependencies.
pip install -r requirements.txt- Start the service.
./start.shYou can also override the startup parameters:
HOST=0.0.0.0 PORT=8083 WORKERS=1 ./start.sh- Verify the service.
curl http://localhost:8083/health- Prepare the environment file.
cp .env.example .env
# edit .env as needed- Build the image.
docker build -t search-agent-service .- Run the container.
docker run --rm -p 8083:8083 \
--env-file ./.env \
--name search-agent-service \
search-agent-service- Verify the service.
curl http://localhost:8083/healthservice.py automatically loads ./.env on startup. In Docker mode, prefer --env-file ./.env.
Resolution priority:
service_env_paramsin the request- Process environment variables or
./.env - Code defaults
SearchAgentService has two configuration paths for environment variables:
These are read from service_env_params first, then fall back to process env
or .env.
| Variable | Description | Default / Usage |
|---|---|---|
| SERPER_API_KEY | Serper API key for search |
Required when search is enabled |
| JINA_API_KEY | Jina API key for browse / visit |
Required when browse or visit is enabled |
| TOOLS | Enabled tools, chosen from search,browse,visit |
Optional, default registry is search,visit |
| MAX_RETRY | Maximum retry attempts | Default 10 |
| RETRY_INTERVAL | Retry interval in seconds | Default 5 |
| MAX_ITERATIONS | Maximum agent iterations | Default 50 |
These are not read from service_env_params in the current implementation.
| Variable | Description | Default |
|---|---|---|
| HOST | Service bind host | 0.0.0.0 |
| PORT | Service port | 8083 |
| WORKERS | Uvicorn worker count | 1 |
| HTTP_TIMEOUT | Low-level HTTP connect/write/pool timeout | 300 |
| MAX_TOOL_CALLS_PER_TURN | Maximum tool calls per turn | 5 |
| MAX_TOOL_RESPONSE_LENGTH | Maximum tool response length before truncation | 8192 |
| MAX_CONNECTIONS | Maximum connections per task instance | 256 |
| MAX_KEEPALIVE_CONNECTIONS | Maximum keep-alive connections per task instance | 64 |
| KEEPALIVE_EXPIRY | Keep-alive expiry in seconds | 10.0 |
| http_proxy | HTTP proxy | empty |
| https_proxy | HTTPS proxy | empty |
Notes:
- AgentCompass
benchmark_params.request_timeoutcontrols how long AgentCompass waits for the HTTP response from SearchAgentService. REQUEST_TIMEOUTstill exists inSearchAgentService/.env.exampleas a local internal timeout setting for SearchAgentService itself, but it is not part of the documented user-facingservice_env_paramscontract.
Run an agent task (AgentCompass WAIT protocol).
curl -X POST "http://localhost:8001/api/tasks/batch" \
-H "Content-Type: application/json" \
-d '{
"benchmark": "gaia",
"params": {
"benchmark_params": {
"judge_model": "gpt-4o",
"category": "all",
"max_concurrency": 4,
"k": 1,
"avgk": false,
"service_url": "http://localhost:8083/api/tasks",
"request_timeout": 3600,
"service_env_params": {
"SERPER_API_KEY": "your-serper-api-key",
"JINA_API_KEY": "your-jina-api-key",
"TOOLS": "search,visit"
}
},
"model_infer_params": {
"temperature": 0.8
},
"model_server_params": [
{
"type": "local",
"url": "http://your-llm-server:8000/v1",
"api_key": "your-api-key",
"models": ["your-model-name"],
"max_concurrent": 5
}
]
}
}'Response:
{
"final_answer": "The final answer",
"trajectory": [{"role": "...", "content": "..."}],
"status": "completed",
"error": null
}Health check.
curl http://localhost:8083/healthResponse:
{"status": "healthy", "service": "SearchAgentService"}