Web Fetch
The Web Fetch tool allows AI agents to make HTTP requests to retrieve, inspect, and analyze the contents of live web pages, documentation articles, and public REST APIs.
Tool Identifier: http
Capabilities
While search grounding identifies relevant links, the Web Fetch tool gives an agent the ability to read the complete text of specific URLs provided by the user or discovered during search:
- Web Page Reading: Extracts clean, readable text from HTML web pages, stripping away tracking scripts and boilerplate.
- API Inspection: Fetches public JSON payloads or raw text endpoints for live data consumption.
- Documentation Summaries: Point an agent to a documentation page, GitHub README, or blog post and ask questions about its contents.
How to Enable
In the UI
When configuring an agent in the Agent Builder or editing an existing agent, check the box for: ☑️ HTTP/URL 🌐
In Agent YAML
Add http to the tools array:
tools:
- http
Example Prompts & Use Cases
- Summarize an Article: "Read https://example.com/blog/latest-release and give me a 3-bullet summary of the new features."
- Verify API Responses: "Fetch https://api.weather.gov/gridpoints/... and tell me the forecasted humidity."
- Documentation Assistant: Configure an agent whose system prompt tells it to consult your company's online developer docs whenever a technical question is asked.
Security & Best Practices
- Public URLs Only: The agent runtime fetches only publicly reachable internet endpoints. Private intranet addresses (
localhost,10.0.0.0/8,192.168.0.0/16, cloud metadata services) are strictly blocked by security sandboxing. - HTML Sanitization: All retrieved content is sanitized before ingestion into the model's context window.
Related Tools
- 🔎 Google Search Grounding: Find relevant links automatically when specific URLs are not known in advance.
- 💻 Code Execution: Process and analyze raw data using Python scripts.
- 📖 Connected Tools Overview