I built a keyless web search package for Laravel AI agents (no API keys, no per-query cost)
Laravel's AI SDK made building agents genuinely pleasant, but the moment my agent needed the web I hit the same wall everyone hits: provider-native search only exists on some providers (my production model has none), and every hosted search API is another key, another quota, another line on the bill. So I wrapped a local keyless search engine into three ordinary Laravel AI tools and published it:…
Laravel's AI SDK has made creating agents a pleasure, but when it comes to web search, there's a common hurdle: not all providers offer built-in search functionality, and hosted search APIs often come with additional costs. To solve this, the author created a keyless web search package for Laravel AI agents. This package, available on GitHub, requires no API keys or per-query fees.
Three tools make up the package: WebSearchTool, WebFetchTool, and ResearchTool. To use it, simply include these tools in your Laravel AI agent using the `composer require ssekyanzijackson/laravel-agent-web-search` command. The package is easy to set up with `php artisan web-search:install`.
The package offers three core functionalities: web_search for accessing current facts and local sources, web_fetch for fetching and converting web pages into clean markdown (including PDFs and bot-walled pages), and research, which searches and reads the top sources back as cited extracts.
The package works with any provider supported by the SDK, including those without native search capabilities. Measured performance includes a 3-second search deadline, batched page reads at around 1.7 seconds for two pages, and instant repeats through caching. There are no keys, quotas, or per-query costs involved.
If you wish to use paid coverage later, you can point the engine at Tavily, Brave, Exa, or Serper with automatic fallback, all without modifying your existing code. The package also includes a separate AGPL install of the search engine, which is not bundled with the main package. The package is currently in its early stages, and the reach of the engine depends on your server's network capabilities.
Running `donsetch doctor` can help identify which engines your server can reach. However, on a small VPS, heavy parallel research may put a strain on the CPU.
The author acknowledges that there are some caveats to the package. It is a separate AGPL install, not bundled within the main package. It is a young project, and the reach of the engine depends on your server's network capabilities. The package performs best on a small VPS, but heavy parallel research may strain the CPU.
The package is released under the MIT license and has been tested with a stub engine plus a live probe. Continuous Integration (CI) is supported on PHP 8.3 and 8.4. The author welcomes feedback from anyone running agents in production. Specifically, the author is interested in learning about improvements to the read layer.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.