[PR #3770] Add AgentFetch tool integration docs #3790

Open
opened 2026-06-05 18:53:09 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3770
Author: @bch1212
Created: 4/28/2026
Status: 🔄 Open

Base: mainHead: add-agentfetch-tool


📝 Commits (4)

  • d4e8060 Add AgentFetch tool integration docs
  • f41984b fix: remove whitespace around em-dashes (Vale LangChain.DashesSpaces)
  • 85bc21d Merge branch 'main' into add-agentfetch-tool
  • 93b05f8 fix(prose): replace em-dashes with colons (LangChain style guide)

📊 Changes

1 file changed (+175 additions, -0 deletions)

View changed files

src/oss/python/integrations/tools/agentfetch.mdx (+175 -0)

📄 Description

docs: add AgentFetch tool integration

Adding integration docs for AgentFetch — a token-budgeted web fetch service for AI agents.

Why this is useful for the LangChain audience

Default LangChain web tools (requests_get, WebBaseLoader, etc.) return raw content with no token-budget awareness. Agents routinely blow their context windows on 50KB articles. AgentFetch adds:

  • estimate_tokens so the agent can skip a URL it can't afford (~10× cheaper than a full fetch)
  • Server-side max_tokens truncation before the response leaves the API
  • 6-hour Redis cache (repeat fetches in a single chain ≈ $0.0001)
  • Auto-routing between Trafilatura (free, local) → Jina Reader → FireCrawl (JS-rendered) → pypdf (PDFs) based on URL pattern

Resources

File added

src/oss/python/integrations/tools/agentfetch.mdx — written to match the existing TEMPLATE.mdx and the format of neighboring entries (e.g. agentql.mdx).

Happy to revise based on review — first contribution to this repo.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/3770 **Author:** [@bch1212](https://github.com/bch1212) **Created:** 4/28/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `add-agentfetch-tool` --- ### 📝 Commits (4) - [`d4e8060`](https://github.com/langchain-ai/docs/commit/d4e8060f2abcb2062391c4935ef888729ea56858) Add AgentFetch tool integration docs - [`f41984b`](https://github.com/langchain-ai/docs/commit/f41984bdd5555cebdd7362c638a37e57e5c4489f) fix: remove whitespace around em-dashes (Vale LangChain.DashesSpaces) - [`85bc21d`](https://github.com/langchain-ai/docs/commit/85bc21dc8cd1b280fc1689716bfe42da0aeeb73d) Merge branch 'main' into add-agentfetch-tool - [`93b05f8`](https://github.com/langchain-ai/docs/commit/93b05f862c8fbadf8f69e83e99d02e7f85c6277e) fix(prose): replace em-dashes with colons (LangChain style guide) ### 📊 Changes **1 file changed** (+175 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `src/oss/python/integrations/tools/agentfetch.mdx` (+175 -0) </details> ### 📄 Description ## docs: add AgentFetch tool integration Adding integration docs for AgentFetch — a token-budgeted web fetch service for AI agents. ### Why this is useful for the LangChain audience Default LangChain web tools (`requests_get`, `WebBaseLoader`, etc.) return raw content with no token-budget awareness. Agents routinely blow their context windows on 50KB articles. AgentFetch adds: - `estimate_tokens` so the agent can skip a URL it can't afford (~10× cheaper than a full fetch) - Server-side `max_tokens` truncation before the response leaves the API - 6-hour Redis cache (repeat fetches in a single chain ≈ $0.0001) - Auto-routing between Trafilatura (free, local) → Jina Reader → FireCrawl (JS-rendered) → pypdf (PDFs) based on URL pattern ### Resources - **Package on PyPI:** [`[langchain-agentfetch](https://pypi.org/project/langchain-agentfetch/)`](https://pypi.org/project/langchain-agentfetch/) (v0.1.0) - **Source:** https://github.com/bch1212/langchain-agentfetch - **Hosted backend:** https://www.agentfetch.dev (500 free fetches/mo, no credit card) - **MCP Registry:** [[io.github.bch1212/agentfetch](https://registry.modelcontextprotocol.io/?search=agentfetch)](https://registry.modelcontextprotocol.io/?search=agentfetch) ### File added `src/oss/python/integrations/tools/agentfetch.mdx` — written to match the existing `TEMPLATE.mdx` and the format of neighboring entries (e.g. `agentql.mdx`). Happy to revise based on review — first contribution to this repo. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 18:53:09 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3790