---
title: "When Should an AI Agent Search the Web? Cutoffs and Routing"
description: "Which questions need a web search and which don't, why knowledge cutoffs cause confident stale answers, and a tested Python router plus prompt wording that make an agent search at the right times."
category: "guides"
url: https://keirolabs.cloud/blog/when-should-ai-agent-search-the-web
published: 2026-11-24
updated: 2026-11-24
---

# When should an AI agent search the web? Knowledge cutoffs, freshness and routing

## The 60-second version

**An AI agent should search the web when the answer may have changed since the model was trained, when it is too specific to have been memorized, or when it must be exactly right and citable.** It should skip search for general knowledge, reasoning, writing and anything about the conversation itself.

| Search | Don't search |
|---|---|
| Prices, plans, rate limits | How a for-loop works |
| Latest versions, releases, changelogs | Explaining a concept |
| News and anything "today", "this week" or "latest" | Rewriting or summarizing the user's text |
| Specific companies, people, products, laws | Math and logic |
| Exact numbers, dates, URLs, quotes | Brainstorming and opinions |
| Anything the user will act on or publish | Questions about earlier messages |

**Too little search gives you confident, stale answers. Too much gives you slow, expensive answers to "what is 2+2".** The fix is a short routing step, a clear tool description and today's date in the prompt.

## What is a knowledge cutoff and why does it matter?

**A model's knowledge cutoff is the last date its training data covers.** It knows nothing after that, and its knowledge thins out in the months before it, because the web hadn't written much about recent events yet when the data was collected.

**Three things make the cutoff worse than it sounds:**

- **The model doesn't feel the gap.** It answers a question about "the latest version" with the latest version it saw, in the same confident tone.
- **It doesn't know today's date** unless you tell it. Asked for "the best X this year", it may assume its training year.
- **Models stay in production long after training.** A model released with a recent cutoff may still be answering questions a year or more later.

**How this shows up in practice:** we logged 163 answers from OpenAI models with web search on, in November 2026. In 16 of them (10%), the model's own search query added an old year, like "cheapest web search API for AI agents 2024". That happened even with search turned on: the model's sense of "now" leaked into the query. **The fix is one line: put today's date in the system prompt.**

## How does an agent decide whether to search?

**There are three common designs, and most production agents combine two of them.**

| Design | How it works | Good for | Weak spot |
|---|---|---|---|
| **Model decides** | The model has a `web_search` tool and calls it when the description says to | General assistants | Small models under-search; all models over-trust memory on recent facts |
| **Rules decide** | Code checks the question for time words, entities or intent, and forces a search | Narrow products, compliance | Misses questions that don't match the rules |
| **Always search** | Every question gets a search before the model answers | Research tools, RAG over the web | Costs and latency on questions that don't need it |

**A good default: rules first, then the model.** Code forces a search when the question clearly needs one. Otherwise the model decides, using a tool description that says when to search.

## What does a search router look like in code?

**A few rules catch most must-search questions cheaply, before any model call.** This one is plain Python and runs as is:

```python
import re

MUST_SEARCH = [
    r"\b(latest|newest|current|currently|today|tonight|this (week|month|year)|right now|recent(ly)?)\b",
    r"\b(price|pricing|cost|costs|how much|rate limit|quota|plan|subscription)\b",
    r"\b(release|released|version|changelog|deprecated|announced|launch(ed)?)\b",
    r"\b(news|stock|weather|score|election|lawsuit|acquired|acquisition)\b",
    r"\b20[2-9]\d\b",                                   # any explicit recent year
]
NO_SEARCH = [
    r"^(rewrite|rephrase|summari[sz]e|translate|proofread|format)\b",
    r"\b(above|earlier|you said|this conversation|my last message)\b",
]

def route(question: str) -> str:
    q = question.lower().strip()
    if any(re.search(p, q) for p in NO_SEARCH):
        return "no_search"
    if any(re.search(p, q) for p in MUST_SEARCH):
        return "search"
    return "model_decides"

assert route("What is the latest Next.js version?") == "search"
assert route("How much does the Brave Search API cost?") == "search"
assert route("Rewrite this paragraph to be shorter") == "no_search"
assert route("Explain how a hash map works") == "model_decides"
print("router ok")
```

**What to do with each answer:**

- **`search`:** run the search before calling the model, and pass the results in.
- **`no_search`:** call the model without tools.
- **`model_decides`:** give the model the `web_search` tool and let it choose.

How to write that tool, with full loops for Claude and OpenAI-compatible models, is in [how to give an LLM a web search tool](/blog/llm-web-search-tool-calling).

**Keep the rules short and boring.** They are a safety net for the cases you know matter, not a classifier for everything.

## How do I get the model to search at the right times?

**Most of it is in the tool description and the system prompt.**

**In the tool description**, say when to use it:

> Search the live web. Use it for anything that may have changed after your training: prices, versions, release dates, news, current events, and facts about specific companies or products. Do not use it for general knowledge or for questions about the conversation itself.

**In the system prompt**, give it the date and a rule for doubt:

> Today is November 24, 2026. Your training data ends before today. If a question depends on facts that may have changed, search before answering. If you answer from memory, say so.

**Then test it.** Take 30 real questions, label each "should search" or "shouldn't", and count how often the agent agrees. Smaller models usually need a more explicit description, or the rules above doing more of the work.

## What about freshness: how recent do results need to be?

**Search alone doesn't guarantee fresh answers. The results can be stale too.**

- **Put the year in time-sensitive queries.** `"rate limits 2026"` beats `"rate limits"`.
- **Use a recency filter when your search API has one,** for news and anything that changes weekly.
- **Prefer primary sources for facts that change:** the vendor's pricing page or docs over a two-year-old blog post about them.
- **Show dates to the model.** If results carry a published or updated date, include it in the tool result so the model can prefer the newer source.
- **Say when facts were checked.** "As of November 24, 2026" in the answer tells the reader how old the information is.

## What does searching cost, and when is "always search" worth it?

**For most agents, search is cheaper than people assume, and wrong answers are more expensive.**

| Calls a month | Search cost on Keirolabs `/search/lite` (plans) |
|---|---|
| 10,000 | Covered by the $29.99 Essential plan |
| 300,000 | $29.99 (Essential covers about 300,000 lite searches) |
| 3,000,000 | $99.99 (Startup covers about 3 million) |

At $0.03 to $0.10 per 1,000 searches, searching every question costs less than the extra tokens of a long answer. **The real cost of "always search" is latency** (one more round trip before the model answers) **and context** (the results take up tokens). That is why snippets beat full pages for the first look; see [context engineering for search agents](/blog/context-engineering-web-search-agents).

**Choose "always search" when:**

- most of your questions are about current or specific facts;
- wrong answers are costly;
- you need citations on every answer anyway.

**Choose "route first" when:**

- you have a mix of chat, writing and lookup;
- latency matters more than a small risk of a stale answer.

## Checklist

- **Put today's date in the system prompt.** This alone fixes a lot of stale searching.
- **Force search with simple rules** for time words, prices, versions, news and explicit years.
- **Skip search for rewriting, summarizing and questions about the conversation.**
- **Write the tool description as an instruction** for when to search and when not to.
- **Include dates in search results, and prefer primary sources.**
- **Ground the answer in what was found, and cite it** ([grounding guide](/blog/grounding-ai-agents-web-search)).
- **Test the routing on 30 labeled real questions.**

New Keirolabs accounts get up to 2,000 free credits with no card (1,000 at signup, 1,000 more after setup), so you can test search-on-every-question against routing on your own traffic ([get a key](https://platform.keirolabs.cloud/register)).
