AI agent guardrail · 2026
FetchGate
A deterministic gate at the fetch boundary for AI agents. It returns RETRIEVED, FAILED, or UNKNOWN, so an agent never answers as if it read a page it could not actually fetch. Published on PyPI and installable in Claude, Cursor, and any MCP client.
- type
- AI agent guardrail
- period
- 2026
- source
- public github
- build
- Solo · open source on PyPI
- write-up
- A 200 Is Not a Read
- pypi
- fetchgate 0.2.0
$ pip install "fetchgate[mcp]"
problem
When a fetch quietly comes back empty (a JavaScript app, a 403, a Cloudflare wall), an agent often answers from memory as if it read the page. FetchGate turns the question of whether the page was actually read into a deterministic verdict that fails closed before the model can answer.
outcomes
receipts
Do not take my word for it. Run this.
Real output, captured from the repository as it ships. Clone it, run the same commands, and compare.
$ python -m unittest discover -s tests
.............................................
----------------------------------------------------------------------
Ran 45 tests in 2.141s
OK
$ python -m fetchgate.eval.run_eval
across 9 scenarios the gate admitted the 3 true reads and refused the 6 non-reads. 0 non-reads reached answerable state (enforced by construction: the gate mints no handle unless the verdict is RETRIEVED).
verify: OK (recomputed offline from stored signals)
$ python demo.py https://example.com https://x.com
https://example.com
verdict : RETRIEVED (clean)
bytes : raw 559 / extracted 112
https://x.com
verdict : FAILED (transport.render_error)
refused: the model gets no content and cannot answer as if it read this page.
what i built
tech stack
View the source code
The repository includes the code, structure, and implementation details for this project.