Agents In Use
What’s new todayLast update
108 use cases added today

How to tune a demo cache

Tool calls decreased from 15 to 13 to 8 across three runs. The third proposed nothing new; repeated TTL suggestions exposed a routing issue requiring a code change.

Source published news.ycombinator.comchat.betterdb.com agent
OUR ADAPTATION

Suggested prompt

Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.

In [demo environment], inspect [cache metadata] through [MCP server], propose bounded [configuration changes] and apply them under [demo approval policy]. Run on [schedule], record suggestions and tool calls, and identify problems requiring code changes rather than repeating configuration edits.

Evidence at a glance

Sourced account
Source author
kaliades
Original account
Read the source ↗
Published
Source link checked
Reported result
Tool calls decreased from 15 to 13 to 8 across three runs. The third proposed nothing new; repeated TTL suggestions exposed a routing issue requiring a code change.
Human involvement
The author inspected run behavior and identified a routing problem the agent could not fix; self-approval was explicitly described as demo-only.

A linked account supports attribution. It does not mean we independently reproduced its result.

Report an issue with this caseOpen correction email

Opens your email app with the case link included. Nothing is sent automatically.

How the agent did it

  1. Built a documentation chat with tool-result and semantic caches.
  2. Exposed stored cache metadata and suggestions through MCP.
  3. Scheduled the agent with cron inside Vercel.

The author built chat.betterdb.com as a retrieval-based chat over Valkey, Redis and Dragonfly documentation to publicly exercise caching libraries. Its tool-result cache normalizes calls before execution. A separate semantic cache embeds prompts and searches with KNN through valkey-search, allowing paraphrased questions to reuse responses when sufficiently similar.

The libraries were extended to store metadata in Valkey or Redis. Monitoring analyzed that information and suggested improvements, and an MCP server exposed it to the chat’s agent. In this demo, the agent could both create and approve its own suggestions. Configuration was read from the database, so changes required no restart.

The author scheduled the process with cron inside Vercel and left it running overnight and into the next day. The first run applied several TTL changes. Similar suggestions followed because TTL was the wrong control for natural-language tools whose inputs differed in wording. The author identified a routing change into semantic caching as the actual fix, requiring code changes beyond the system’s capabilities.

Across three runs, tool calls fell from fifteen to thirteen to eight; the third run proposed nothing new. Who it's for: developers experimenting with limited configuration autonomy in a demo and investigating what an agent cannot repair.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: Hacker News · kaliades

Frequently asked questions

Could the agent approve its own changes?

Yes, in this demo. The author explicitly cautioned against allowing this in a real production environment.

Why did TTL changes miss the underlying problem?

Different natural-language strings bypassed exact matching. The author said routing those tools into semantic cache checks would require a code change.

More details

Remaining steps

  1. Let the agent apply TTL suggestions and examined repeated runs.

About this account

The demo agent could inspect metadata, create suggestions and approve configuration changes without a restart.

Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=48062214. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.

Credit: kaliades on Hacker News

Source published

Added to Agents In Use

Source checked

Tools and topics

MCP server · Valkey · valkey-search · Vercel cron

Caching · MCP · Scheduled agents

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.