> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilottai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Web search

# Web Search Agent Example

Simple example showing how to set up a web search agent with PilottAI framework.

## Setup

```bash theme={null}
pip install pilott
```

## Example Usage

```python theme={null}
from pilottai import Serve
from pilottai.core import AgentConfig, LLMConfig

# Initialize
pilott = Serve(name="WebSearchAgent")

# Create agent
search_agent = await pilott.add_agent(
    title="web_searcher",
    goal="Execute and analyze web searches effectively",
    tools=["search_executor", "result_analyzer"]
)

# Execute search
job = {
    "type": "web_search",
    "query": "latest AI developments 2024",
    "search_type": "news",
    "filters": {
        "date_range": "last_month"
    }
}

result = await pilott.execute([job])
```

## Tools

* search\_executor: Execute web searches
* result\_analyzer: Analyze search results

## Features

* Web searching
* Result analysis
* Filter management
* Source credibility checking

## Code

Ready to use code [web\_search.py](../../pilott/agents/web_search.py)
