The Problem Nobody Talks About: Your AI Agent Is Reading Last Year's News
Every time an AI agent does research, it wastes tokens on stale results.
This is not a hypothetical. A cron job running a daily brief at 7am using a standard web search is returning results that may be hours, days, or weeks old — mixed in with genuinely recent content. The agent reads all of it. You pay for all of it.
The math is brutal.
A typical context window costs money per token. A research query that returns 10 results might consume 2,000–5,000 tokens of context just to read titles, descriptions, and URLs. If half those results are outdated, you're burning tokens on content that has zero value to your agent's task.
This is the token value problem — and time filtering is the fix.
The Tool Nobody Built (Until Now)
Search APIs that power AI agents — Tavily, Firecrawl, Exa, Brave — are powerful. But none of them expose a simple, reliable time filter at the tool schema level that agents can actually use.
There are workarounds:
-
Google's
after:operator — works sometimes, breaks often, requires the agent to know and remember the syntax -
DDG's
timelimit=parameter — available directly in the URL, but not as a first-class tool parameter - Backend-specific date filtering — requires knowing which backend supports what, and the interface is inconsistent
The result: most agents search without time filters by default. Stale results are the norm, not the exception.
The Plugin: hermes-web-search-time-limit
Built for Hermes Agent, this plugin adds web_search_timed as a first-class tool — no backend configuration, no API keys, no vendor lock-in.
web_search_timed(query: string, time_range: "d"|"w"|"m"|"y", limit?: int)
time_range |
What it returns |
|---|---|
d |
Past 24 hours |
w |
Past week |
m |
Past month |
y |
Past year |
Example prompts an agent can now follow directly:
- "Search for AI agent funding news from the past week using web_search_timed"
- "Research climate tech developments from the past month — use time-filtered search"
- "Find the latest developments in open-source LLMs — past day only"
The agent sees the schema. The agent chooses the right tool. No workarounds needed.
The Math: Why This Matters for Token Economics
Let's make it concrete.
A daily brief cron runs 365 times a year. Each run searches for 10 results with no time filter. Half the results are more than 30 days old. The agent spends ~500 tokens reading stale content per run.
365 runs × 500 stale tokens × $0.001 per 1K tokens (approximate)
= $182.50/year wasted on content that didn't matter
Scale that to a team of 10 agents, each running multiple daily research tasks, and you're looking at real money — not because the agents are doing anything wrong, but because the search tool isn't giving them time awareness.
Now do the same math with time_range='w' on every run:
Same usage, zero stale content
= $0 waste
The plugin costs nothing to run (it uses DuckDuckGo via the ddgs Python package — no API key required). The token savings are entirely free.
Privacy and Cost: Two Reasons to Love DuckDuckGo
This is not a paid promotion of DuckDuckGo. It's just the truth about what makes this stack work.
1. Zero cost
DDG has no paid API tier. No rate limits that require a credit card. No tiered plans. The ddgs Python package is free and open source. The plugin is free and open source. You run it on your own infrastructure.
2. Privacy by default
DuckDuckGo doesn't track your searches. Doesn't build user profiles. Doesn't sell data. When your agent is doing research on a competitor, a medical topic, or a sensitive business question — you don't want that query logged by your search provider. DDG doesn't log it.
Compare this to search backends that require API keys, track usage, and build behavioral profiles. For agent workloads, DDG is the privacy-respecting choice that also happens to work without any credential setup.
Introducing ddgs: The Library That Makes This Possible
The ddgs Python package, maintained by deedy5 on GitHub, is a metasearch library that aggregates results from multiple search backends — including DuckDuckGo — without requiring an API key.
It is not affiliated with DuckDuckGo. It is a community-built tool that uses DuckDuckGo's HTML interface directly, in the same way a browser does. This is why it works without keys and why it doesn't log your queries.
Key properties:
- No API key required — works out of the box
- No query logging — uses DDG's HTML interface, same privacy as the DDG search bar
- MIT licensed — open source, community maintained
- Active development — regular releases, active GitHub issues
The plugin wraps ddgs with a Hermes-compatible provider interface (WebSearchProvider ABC), so it slots into Hermes's plugin system cleanly. Other search backends that implement the same ABC can be swapped in without changing the tool schema.
The Broader Principle: Token Value Maximizing
The name web_search_timed is descriptive. But the underlying principle is bigger.
Token value maximizing is a design philosophy for AI agent tools: every tool should maximize the ratio of useful output per token consumed.
This means:
- Search tools should filter by recency when the task is time-sensitive
- Summarization tools should prioritize recent sources over older ones
- Monitoring tools should alert on anomalies, not on unchanged baselines
- Routing tools should send requests to the cheapest capable model
Time filtering is the simplest, highest-leverage expression of this principle. It requires no model change, no infrastructure change, no cost negotiation. Just a parameter on a search call.
If you're building agent tools and you're not thinking about token value, you're leaving money on the table — and your users are paying for content they don't need.
Getting Started
The plugin is published at:
GitHub: Dr-Agentic/hermes-web-search-time-limit
# Option 1: pip install (auto-discovers via entry point)
pip install git+https://github.com/Dr-Agentic/hermes-web-search-time-limit.git
# Option 2: clone locally
git clone https://github.com/Dr-Agentic/hermes-web-search-time-limit.git \
~/.hermes/plugins/hermes-web-search-time-limit
Restart Hermes. The agent will see web_search_timed alongside web_search.
Requirements:
- Python ≥ 3.10
-
ddgs(installed automatically with pip) - Hermes Agent
The Ask
If you build AI agents and you've been burning tokens on stale search results — you now have the fix. It's free, it's private, it's open source.
And if you've been thinking about the token economics of your agent stack — this is a good moment to look at every tool your agent uses and ask: is this tool maximizing the value of every token, or am I paying for waste I don't need to pay for?
The ddgs-powered hermes-web-search-time-limit plugin is one concrete answer to that question. What are yours?
Tags: ai, agents, hermes-agent, python, open-source
Top comments (0)