Skip to content

feat: implement enhanced web search multi-engine support#165

Merged
laynepenney merged 7 commits intomainfrom
feat/enhanced-web-search
Jan 26, 2026
Merged

feat: implement enhanced web search multi-engine support#165
laynepenney merged 7 commits intomainfrom
feat/enhanced-web-search

Conversation

@laynepenney
Copy link
Copy Markdown
Collaborator

Enhanced Web Search Phase 1: Multi-Engine Foundation

Complete rewrite of web search with multi-engine support, caching, and improved reliability.

Features

  • Multi-engine architecture (Brave, Google, Bing, DuckDuckGo)
  • LRU cache with max 1000 entries and TTL support
    This branch is up-to-date with the base branch
  • Engine fallback with circuit breaker pattern
  • Enhanced configuration system

Next Phase Ready: Search templates and domain-specific processing

Wingman: Codi codi@layne.pro

- Fix SerpAPI error (paid service, not free)
- Add Brave Search API as primary (reliable JSON API)
- Add LRU cache with max 1000 entries and size limits
- Add template-aware TTL (pricing 7d, errors 12h, docs 24h, general 1h)
- Add errors template to config example
- Add date_range limitations note (Google/Bing only)
- Add performance testing and memory usage targets
- Add risks: E3 HTML fragility and rate limiting
- Include brave-api.org in references
- Add revision history section
- Fix architecture diagram indentation
- Update engine priority order in config
- Fixed typo: 'freequeries' -> 'free queries' spacing
- Corrected internal entity references (E3 -> E1)
- Unified engine configuration (removed redundant engineOrder)
- Made response limits consistent (default 15 both places)
- Added 'general' template to config example
- Resolved Open Question #3 (marked as RESOLVED)
- Clarified cache storage (file + in-memory LRU)
- Clarified extract_content limits (first 5KB)
- Updated revision history to v1.2
Phase 1: Multi-engine foundation with caching and fallback

**Features implemented:**
- Multi-engine architecture (Brave, Google, Bing, DuckDuckGo)
- LRU cache with max 1000 entries and TTL support
- Enhanced configuration system with web search settings
- Plugin-based engine registry with automatic fallback
- Updated tool registration with backward compatibility

**Engine priority:** Brave (recommended) > Google > Bing > DuckDuckGo (fallback)
**Configuration:** Support for API keys via .env file
**Documentation:** Comprehensive API key guide and setup instructions

**Ready for testing:** Users can configure multiple search engines
  for improved reliability and result quality

Wingman: Codi <codi@layne.pro>
- Add configurable timeout via AbortSignal.timeout()
- Default timeout is undefined (no limit) for flexibility
- Can be configured via WebSearchConfig.timeout (milliseconds)
- Applied to all 4 engines: Brave, Google, Bing, DuckDuckGo
@laynepenney laynepenney merged commit 65e30e8 into main Jan 26, 2026
3 checks passed
@laynepenney laynepenney deleted the feat/enhanced-web-search branch January 26, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant