DEV Community

Cover image for Stop using web search for every little thing in AI agents
Moshe Simantov
Moshe Simantov

Posted on

Stop using web search for every little thing in AI agents

I’ve been building a few AI agents lately, and I noticed something that really started to bug me.

Whenever I ask an agent a simple question like "What’s the price of Bitcoin?" or "Is it raining in London?". It almost always defaults to a web search tool. If you've watched this happen, you know it's a mess.

The agent spends 5 seconds "browsing," scrapes a bunch of junk from a website, and then burns through thousands of tokens just to find one single number. It’s like using a bulldozer to pick up a coin. It’s slow, it’s expensive, and it feels like a waste of time.

I wanted something faster and cleaner. So I built @neuledge/graph.


The "Lookup" tool: A faster way to get facts

The core of this is a tool called lookup. Instead of having the AI surf the messy web, it just asks for a specific "path" to a fact.

It looks like this:

  • Weather: cities.tokyo.weather
  • Stocks: stocks.aapl.quote
  • Money: currencies.usd.rate.eur

Because the data is pre-fetched and structured, the response comes back in under 100ms. There’s no "Searching..." spinner. To the user, the AI just seems smart and fast.

It handles AI "typos" (Self-healing)

One thing I learned is that LLMs aren't great at following strict rules. They might try to guess a path and say get_the_weather_of_london.

Instead of just returning an error, I built the tool to suggest the right path. It tells the AI: "I don't have that, but I have cities.london.weather. Use that instead." The agent sees that, fixes itself, and gets the data on the next try. It makes the whole agent feel way more robust.


Why I built it this way

I mainly built this to save myself from the headache of managing 10 different API keys for every new project.

If you use this, you don't need a separate account for a weather service, a finance API, and a currency converter. You just install the package and give the tool to your agent. It works with basically any framework (Vercel AI SDK, LangChain, etc.).

What's in it right now?

  • Live Weather: Any city on earth.
  • Stock Prices: Real-time quotes.
  • Currency: 150+ live exchange rates.
  • Time & Dates: Timezones and holiday calendars.

Give it a try

It’s open source and free to start. You get 100 requests a day without even needing an API key.

If you’re building an agent and you're sick of that slow "browsing" delay, I'd love for you to try it out and let me know what you think.

I'm planning to add News and Sports scores next—what else should I add?

Top comments (1)

Collapse
 
moshe_simantov_0e19eb5d7d profile image
Moshe Simantov

Hey everyone! I’m the creator of this. I’m currently looking to add News and Sports data next. Which one would be more useful for your projects?