> ## 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.

# Exa Tools

> Search, answer, and find similar pages with ExaTools, restricting results to specific news domains.

```python exa_tools.py theme={null}
"""
Exa Tools
=============================

Demonstrates exa tools.
"""

from agno.agent import Agent
from agno.tools.exa import ExaTools

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


# Example 1: Enable all tools
agent_all = Agent(
    tools=[
        ExaTools(
            all=True,  # Enable all exa tools
            show_results=True,
        )
    ],
    markdown=True,
)

# Example 2: Enable specific tools only
agent_specific = Agent(
    tools=[
        ExaTools(
            enable_search=True,
            enable_answer=True,
            enable_get_contents=False,
            enable_find_similar=False,
            enable_research=False,
            include_domains=["cnbc.com", "reuters.com", "bloomberg.com"],
            show_results=True,
            text=False,
        )
    ],
    markdown=True,
)

# Example 3: Default behavior (most functions enabled by default)
agent = Agent(
    tools=[
        ExaTools(
            include_domains=["cnbc.com", "reuters.com", "bloomberg.com"],
            show_results=True,
            text=False,
        )
    ],
    markdown=True,
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent.print_response("Search for AAPL news", markdown=True)

    agent = Agent(
        tools=[
            ExaTools(
                show_results=True,
            )
        ],
        markdown=True,
    )

    agent.print_response("Search for AAPL news", markdown=True)

    agent.print_response(
        "What is the paper at https://arxiv.org/pdf/2307.06435 about?", markdown=True
    )

    agent.print_response(
        "Find me similar papers to https://arxiv.org/pdf/2307.06435 and provide a summary of what they contain",
        markdown=True,
    )

    agent.print_response(
        "What is the latest valuation of SpaceX?",
        markdown=True,
    )
```

## Run the Example

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

**1. Install dependencies**

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

**2. Export your API keys**

```bash Mac/Linux theme={null}
export EXA_API_KEY="your_exa_api_key_here"
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:EXA_API_KEY="your_exa_api_key_here"
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run the example**

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

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

Full source: [cookbook/91\_tools/exa\_tools.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/91_tools/exa_tools.py)


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