Prerequisites
- Python 3.10 or higher
- PraisonAI Agents package installed
youdotcompackage installedYDC_API_KEYenvironment variable set
Quick Start
1
Install and set key
2
Search with agent
Installation
Setup
Built-in You.com Tool
PraisonAI provides a built-inydc tool that you can import directly:
Available Functions
Basic Usage
Simple Search
Search with Options
Extract Content from URLs
Live News Search
Image Search
With PraisonAI Agent
Using YouTools Class
For more control, use theYouTools class directly:
Search Parameters
Search Operators
You.com supports advanced search operators:Key Points
- Simple function signature: Tool accepts
query: strand returns dict - Environment variable: Set
YDC_API_KEYbefore running - Unified results: Web and news results in single response
- LLM-ready snippets: Pre-extracted relevant text excerpts
Best Practices
Use AI snippets for summarized answers
Use AI snippets for summarized answers
You.com AI snippets provide pre-summarized answers - use them for quick, concise responses.
Set YDC_API_KEY for production
Set YDC_API_KEY for production
The free tier has low rate limits - set
YDC_API_KEY for production workloads.Combine with web search fallback
Combine with web search fallback
Use
search_web with providers=['you.com', 'duckduckgo'] for automatic fallback.Use news mode for current events
Use news mode for current events
Set
search_type='news' for current events queries to get fresher results.Related
Custom Tools
Build your own agent tools
Tools Overview
Browse PraisonAI tool documentation

