Brandfetch

BrandfetchTools provides access to brand data and logo information through the Brandfetch API.

Example

The following agent can search for brand information and retrieve brand data:

1from kern.agent import Agent
2from kern.tools.brandfetch import BrandfetchTools
3
4agent = Agent(
5 instructions=[
6 "You are a brand research assistant that helps find brand information",
7 "Use Brandfetch to retrieve logos, colors, and other brand assets",
8 "Provide comprehensive brand information when requested",
9 ],
10 tools=[BrandfetchTools()],
11)
12
13agent.print_response("Find brand information for Apple Inc.", stream=True)

Toolkit Params

ParameterTypeDefaultDescription
api_keyOptional[str]NoneBrandfetch API key. Uses BRANDFETCH_API_KEY if not set.
client_idOptional[str]NoneBrandfetch Client ID for search. Uses BRANDFETCH_CLIENT_ID.
base_urlstr"https://api.brandfetch.io/v2"Brandfetch API base URL.
timeoutOptional[float]20.0Request timeout in seconds.
enable_search_by_identifierboolTrueEnable searching brands by domain/identifier.
enable_search_by_brandboolFalseEnable searching brands by name.
async_toolsboolFalseEnable async versions of tools.

Toolkit Functions

FunctionDescription
search_by_identifierSearch for brand data using domain or company identifier.
search_by_brandSearch for brands by name (requires client_id).
asearch_by_identifierAsync version of search by identifier.
asearch_by_brandAsync version of search by brand name.

Developer Resources