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

# Brandfetch

> Use Brandfetch Tools with Agno Agents

Build with Agno Agents and use Brandfetch API to retrieve a company's brand information.

## Prerequisites

* Register an account at: [https://developers.brandfetch.com/register](https://developers.brandfetch.com/register).
* Brand API:
  * Export your API key as an environment variable: `export BRANDFETCH_API_KEY=your_api_key`
* Brand Search API:
  * Export your Client ID as an environment variable: `export BRANDFETCH_CLIENT_KEY=your_client_id`

```python theme={null}
"""
* For the Brand API, set `brand` parameter to True. (default: True)
* For the Brand Search API, set the `search` parameter to True. (default: False)

Refer to https://developers.brandfetch.com/dashboard/brand-search-api in the provided URL after `c=...` for details.
"""

import asyncio

from agno.agent import Agent
from agno.tools.brandfetch import BrandfetchTools

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


# Brand API

# agent = Agent(
#     tools=[BrandfetchTools()],
#     description="You are a Brand research agent. Given a company name or company domain, you will use the Brandfetch API to retrieve the company's brand information.",
# )
# agent.print_response("What is the brand information of Google?", markdown=True)


# Brand Search API

agent = Agent(
    tools=[BrandfetchTools(async_tools=True)],
    description="You are a Brand research agent. Given a company name or company domain, you will use the Brandfetch API to retrieve the company's brand information.",
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    asyncio.run(
        agent.aprint_response("What is the brand information of Agno?", markdown=True)
    )
```

## 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 brandfetch_tools.py
```

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