> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc-agui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SearXNG

> Use SearXNG with Agno agents.

Enable privacy-first, multi-engine search for specialized verticals in Agno agents using SearXNG tools. Conduct decentralized research that can verify facts across multiple search backends simultaneously.

```python theme={null}

from agno.agent import Agent
from agno.tools.searxng import SearxngTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------


# Initialize Searxng with your Searxng instance URL
searxng = SearxngTools(
    host="http://localhost:53153",
    engines=[],
    fixed_max_results=5,
    include_tools=["science_search","news_search"]
)

# Create an agent with Searxng
agent = Agent(tools=[searxng])

# Example: Ask the agent to search using Searxng

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent.print_response("""
    Please search for information about artificial intelligence 
    and summarize the key points from the top results
    """)
```

## Run the Example

```bash theme={null}
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/91_tools

# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate

python searxng_tools.py
```

For details, see [SearXNG cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/searxng_tools.py).
