Skip to content

feat: add optional you.com search integration - #106

Closed
mouse-value-add wants to merge 1 commit into
Tencent:mainfrom
mouse-value-add:feat/youcom-search-integration
Closed

feat: add optional you.com search integration#106
mouse-value-add wants to merge 1 commit into
Tencent:mainfrom
mouse-value-add:feat/youcom-search-integration

Conversation

@mouse-value-add

Copy link
Copy Markdown

Overview

This PR adds optional You.com web search integration to BrowserSkill through a new bsk search command. This enhancement allows AI agents to research topics, gather context, and find relevant URLs before performing browser automation tasks.

What Changed

  • New CLI Command: Added bsk search <query> with configurable options
  • Clean Architecture: Integrated seamlessly with existing CLI structure
  • Flexible Output: Supports both human-readable and JSON formats
  • Optional Configuration: Uses YDC_API_KEY environment variable when available
  • Comprehensive Documentation: Added usage examples and integration guide

Key Features

Command Options

  • --count <N>: Configure result count (1-20, default: 10)
  • --search-type <TYPE>: Choose 'search' or 'news'
  • --include-raw-content: Include HTML content in results
  • --json: Machine-readable output for agent workflows

Usage Examples

# Basic search
bsk search "React testing patterns"

# Agent-friendly JSON output  
bsk search "JavaScript performance" --json --count 5

# Integration with browser automation
DOCS_URL=$(bsk search "Next.js docs" --json --count 1 | jq -r '.results[0].url')
bsk navigate "$DOCS_URL"

Architecture & Implementation

  • Rust Integration: Uses existing reqwest dependency with blocking client
  • Error Handling: Graceful fallbacks and clear error messages
  • Security: API keys via environment variables, HTTPS-only communication
  • Performance: Synchronous implementation matching existing CLI patterns

Testing Performed

Compilation: Clean build with cargo build --release
Command Help: bsk search --help displays proper usage
Basic Search: Successful queries without API key (public endpoint)
JSON Output: Proper machine-readable formatting
Error Handling: Graceful handling of network/API errors
Integration: Works alongside existing BrowserSkill commands

Configuration

The integration is completely optional and backwards-compatible:

  • No API Key Required: Works with You.com's public endpoints
  • Optional Enhancement: Set YDC_API_KEY for authenticated access
  • Zero Breaking Changes: Existing functionality unchanged
  • Opt-in Usage: Only activated when bsk search is explicitly called

Documentation

  • Added comprehensive integration guide in docs/you-com-search-integration.md
  • Includes usage examples, configuration, and agent workflow patterns
  • Documents response formats, error handling, and security considerations

Why This Integration?

BrowserSkill excels at browser automation, and web search is a natural complement:

  1. Research Before Navigation: Find relevant URLs to visit
  2. Context Gathering: Research topics before interacting with pages
  3. Agent Intelligence: Provide external knowledge for decision-making
  4. Workflow Enhancement: Bridge information gathering and browser actions

The integration follows BrowserSkill's philosophy of providing powerful, optional tools that enhance AI agent capabilities without complexity.


Branch: feat/youcom-search-integration
Fork: https://github.com/mouse-value-add/BrowserSkill
Tracking Issue: youdotcom-oss/integration-tracking#196

- Add 'bsk search' command for web search capabilities
- Supports both human-readable and JSON output formats
- Optional You.com API key configuration via YDC_API_KEY
- Configurable result count (1-20) and search types (search/news)
- Graceful error handling and fallback behavior
- Clean integration with existing CLI architecture
- Comprehensive documentation and usage examples

This enhancement allows AI agents to research topics, gather context,
and find relevant URLs before performing browser automation tasks.
@iuyo5678

Copy link
Copy Markdown
Collaborator

Searching for things outside the scope of this repository is recommended to be handled on the agent side using MCP, and this repository also does not welcome this kind of low-quality PR request aimed at promoting an event.

@iuyo5678 iuyo5678 closed this Aug 18, 2026
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.

2 participants