How to tune a demo cache with Unknown
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.
Prompt to try
Editorial adaptation, not the source author’s exact prompt. 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.
Reach people exploring AI agents
See placements →What happened
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.
Reported by kaliades on Hacker NewsHow the agent did it
- Built a documentation chat with tool-result and semantic caches.
- Exposed stored cache metadata and suggestions through MCP.
- Scheduled the agent with cron inside Vercel.
Where a person stepped in
The author inspected run behavior and identified a routing problem the agent could not fix; self-approval was explicitly described as demo-only.
A person set the goal and reviewed the result.
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
- 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 8 May 2026
Source checked 14 Oct 2026
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.