Function
Tool identifierhttp_request.
http_request makes a generic HTTP or HTTPS request on behalf of the agent, suitable for calling open HTTP APIs, submitting forms, or downloading resources of bounded size. It includes SSRF protection, redirect validation, sensitive-header handling, and a response size cap, and it cannot reach internal addresses.
Import path: from veadk.tools.builtin_tools.http_request import http_request
Prerequisites
Environment variables:MODEL_AGENT_API_KEY: API key for the agent’s reasoning model (thehttp_requesttool itself needs no extra credentials)TOOL_HTTP_ALLOWLIST: optional host allowlist as comma-separated domains; when set, only exact matches and their subdomains can be requested
Usage
examples/tools/http_request/agent.py
env:NAME, avoiding plaintext secrets in the arguments:
Parameters
Success returns
{"status_code", "url", "headers", "content_type", "body", "bytes", "truncated"}; response header names are lowercased and body is text decoded with the response encoding. HEAD responses carry no body. A rejected request or network failure returns {"error": ...}.