⚡ Bolt: Add SearchTool caching - #32
thirdbase1 wants to merge 1 commit into
Conversation
Added an in-memory cache to `SearchTool.deep()` to avoid repeated expensive API calls for the same query. Agentic loops often repeatedly query the same context during planning and execution phases, making caching a critical architectural optimization. Also recorded this critical learning in `.jules/bolt.md`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What: Added an in-memory Map cache to
SearchTool.deep()to store and reuse previous search query results.🎯 Why: Agentic loops often repeatedly query the same context (like deep research data) during planning and execution phases. Making redundant simulated or external API calls for identical queries creates unnecessary bottlenecks.
📊 Impact: Eliminates redundant API calls for identical search queries, returning results instantly from memory. Saves network overhead, API costs, and time during complex agent planning phases.
🔬 Measurement: Verified via unit test (
SearchTool caches repeated queries) which confirms the first call hits the search logic while the second call hits the cache, and logs verify the cache hit.Also recorded this critical learning in
.jules/bolt.md.PR created automatically by Jules for task 11018223828350828485 started by @thirdbase1