Agent skill · research science · aiskillstore

research-agent-optimization

Optimize the research agent for rate limit handling, API call efficiency, web search integration fixes, and improved streaming UX with granular progress updates and source attribution.

Why this skill is useful

Adds specific optimization patterns for API calls and error handling that the AI wouldn't reliably generate on its own.

What it needs

About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Research Agent Optimization Scope Project root: /home/bender/classwork/Thesis Backend: backend/newsresearchagent.py, backend/app/api/routes/research.py, backend/app/services/newsresearch.py Frontend: frontend/app/search/page.tsx, frontend/lib/api.ts Configuration: backend/app/core/config.py Problem Statement 1. Rate Limiting: Gemini API hits 429 quota exceeded errors during research and article analysis 2. Web Search: DuckDuckGo tool integration has naming issues (not properly initialized) 3. Unclear Progress: Research streaming shows generic "Still working..." instead of specific tool calls 4. JSON in Response: Results show raw JSON blocks instead of formatted source cards 5. Redundant API Calls: Multiple internal search calls without caching/deduplication Required Outcomes Graceful rate limit handling with exponential backoff and quota monitoring Working web search tool with proper DuckDuckGo initialization Verbose streaming events showing real tool execution (websearch, newssearch, internalnewssearch) Research results rendered with inline source cards (not JSON blocks) Optimized API calls: batch searches, cache semantic results, reuse internal knowledge base Clear error messages when quota is exceeded Workflow 1. API Call Optimization Implement request batching in searchinternalnews tool Add caching layer for semantic search results (avoid duplicate queries within 5min window) Combine websearch + newssearch into single result set Track API call counts per session and warn before quota exhaustion Add exponential backoff retry logic (1s, 2s, 4s, 8s max) Files: backend/newsresearchagent.py - tools and caching backend/app/services/newsresearch.py - request batching helpers 2. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/research-agent-optimization

View the source on GitHub

Browse the @skills marketplace