Skip to main content
The user asks a research question; the agent uses You.com-backed search and returns a concise answer.
Prerequisites
  • Python 3.10 or higher
  • PraisonAI Agents package installed
  • youdotcom package installed
  • YDC_API_KEY environment variable set
You.com provides AI-powered search capabilities optimized for LLM applications. PraisonAI includes built-in You.com tools for easy integration.

Quick Start

1

Install and set key

2

Search with agent

Installation

Setup

Built-in You.com Tool

PraisonAI provides a built-in ydc tool that you can import directly:

Available Functions

Basic Usage

Search with Options

Extract Content from URLs

With PraisonAI Agent

Using YouTools Class

For more control, use the YouTools class directly:

Search Parameters

Search Operators

You.com supports advanced search operators:

Key Points

  • Simple function signature: Tool accepts query: str and returns dict
  • Environment variable: Set YDC_API_KEY before running
  • Unified results: Web and news results in single response
  • LLM-ready snippets: Pre-extracted relevant text excerpts

Best Practices

You.com AI snippets provide pre-summarized answers - use them for quick, concise responses.
The free tier has low rate limits - set YDC_API_KEY for production workloads.
Use search_web with providers=['you.com', 'duckduckgo'] for automatic fallback.
Set search_type='news' for current events queries to get fresher results.

Custom Tools

Build your own agent tools

Tools Overview

Browse PraisonAI tool documentation