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

# Web Search Agent

> Give a LangDB agent web search tools.

## Code

```python web_search.py theme={null}
from agno.agent import Agent
from agno.models.langdb import LangDB
from agno.tools.websearch import WebSearchTools

agent = Agent(
    model=LangDB(id="llama3-1-70b-instruct-v1.0"),
    tools=[WebSearchTools()],
    markdown=True,
)
agent.print_response("What's happening in France?", stream=True)
```

## Usage

<Snippet file="create-venv-step.mdx" />

**1. Export environment variables**

```bash theme={null}
export LANGDB_API_KEY="your_langdb_api_key"
export LANGDB_PROJECT_ID="your_langdb_project_id"
export LANGDB_API_BASE_URL="https://api.langdb.ai"
```

**2. Install dependencies**

```bash theme={null}
uv pip install -U openai ddgs agno
```

**3. Run Agent**

Save the code above as `web_search.py`, then run:

```bash theme={null}
python web_search.py
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.