> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Brave Search

The Brave Search connector lets your AI agent act in each user's Brave Search account. Each user connects their own Brave Search API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 18 tools.

**Authentication:** API Key
**Categories:** Analytics, Search
**Tools:** 18: 18 read, 0 write, 0 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=BRAVE)

## What you can do

- **Search the web**: get real-time web results with titles, URLs, and snippets, filtered by country and language
- **Get AI answers**: generate cited answers and summaries grounded in live Brave Search results
- **Search news, images, and videos**: find recent news articles, images, and videos with freshness and safe search filters
- **Find local places**: search points of interest by location and get addresses, hours, ratings, and reviews
- **Ground LLM responses**: retrieve curated snippets and source URLs structured as context for AI-generated answers
- **Suggest and correct queries**: get autocomplete suggestions and spelling corrections for search queries

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Brave Search connection

   In **AgentKit > Connections**, create a Brave Search connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'brave'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Brave Search:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'brave_local_place_search',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "brave"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Brave Search:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="brave_local_place_search",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Brave Search credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'brave_chat_completions',
  toolInput: {
    messages: [],
  },
  connector: 'brave',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="brave_chat_completions",
    tool_input={
        "messages": [],
    },
    connection_name="brave",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `brave_chat_completions`

Chat Completions · Read-only

Get AI-generated answers grounded in real-time Brave Search results using an OpenAI-compatible chat completions interface. Returns summarized, cited answers with source references and token usage statistics.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `messages` (`array`, required): Array of conversation messages. Each message must have a 'role' (system, user, or assistant) and 'content' (string).
- `country` (`string`, optional): Target country code for search results used to ground the answer (e.g., us, gb).
- `enable_citations` (`boolean`, optional): Include inline citation markers in the response text.
- `enable_entities` (`boolean`, optional): Include entity information (people, places, organizations) in the response.
- `enable_research` (`boolean`, optional): Enable multi-search research mode for more comprehensive answers.
- `language` (`string`, optional): Language code for the response (e.g., en, fr, de).
- `model` (`string`, optional): The model to use. Must be 'brave' to use Brave's search-grounded AI model.
- `stream` (`boolean`, optional): Whether to stream the response as server-sent events.

Example input: `{"messages":[]}`

### `brave_image_search`

Image Search · Read-only

Search for images using Brave Search. Returns image results with thumbnails, source URLs, dimensions, and metadata. Supports filtering by country, language, and safe search.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `q` (`string`, required): The image search query string.
- `count` (`integer`, optional): Number of image results to return (1–200). Defaults to 50.
- `country` (`string`, optional): Country code for localised results (e.g., us, gb, de), or ALL for no restriction.
- `safesearch` (`string`, optional): Safe search filter level. Defaults to strict (drops all adult content). One of: `off`, `strict`.
- `search_lang` (`string`, optional): Language code for results (e.g., en, fr, de).
- `spellcheck` (`boolean`, optional): Whether to enable spellcheck on the query. Defaults to true.

Example input: `{"q":"coffee shops"}`

### `brave_llm_context`

LLM Context · Read-only

Retrieve real-time web search results optimized as grounding context for LLMs. Returns curated snippets, source URLs, titles, and metadata specifically structured to maximize contextual relevance for AI-generated answers. Supports fine-grained token and snippet budgets.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `q` (`string`, required): The search query to retrieve grounding context for. Max 400 characters, 50 words.
- `context_threshold_mode` (`string`, optional): Relevance filter aggressiveness for snippet selection. Defaults to balanced. One of: `strict`, `balanced`, `lenient`, `disabled`.
- `count` (`integer`, optional): Max number of search results to consider (1–50). Defaults to 20.
- `country` (`string`, optional): Country code for localised results (e.g., us, gb, de). Defaults to us.
- `enable_local` (`boolean`, optional): Enable location-aware recall for locally relevant results.
- `freshness` (`string`, optional): Filter results by publish date: pd (past day), pw (past week), pm (past month), py (past year), or YYYY-MM-DDtoYYYY-MM-DD.
- `goggles` (`string`, optional): Custom re-ranking rules via a Goggles URL or inline definition.
- `maximum_number_of_snippets` (`integer`, optional): Maximum total snippets across all URLs (1–100). Defaults to 50.
- `maximum_number_of_snippets_per_url` (`integer`, optional): Maximum snippets per URL (1–100). Defaults to 50.
- `maximum_number_of_tokens` (`integer`, optional): Approximate maximum total tokens across all snippets (1024–32768). Defaults to 8192.
- `maximum_number_of_tokens_per_url` (`integer`, optional): Maximum tokens per URL (512–8192). Defaults to 4096.
- `maximum_number_of_urls` (`integer`, optional): Maximum number of URLs to include in the grounding response (1–50). Defaults to 20.
- `safesearch` (`string`, optional): Safe search filter level. One of: `off`, `moderate`, `strict`.
- `search_lang` (`string`, optional): Language code for results (e.g., en, fr, de). Defaults to en.

Example input: `{"q":"coffee shops"}`

### `brave_local_descriptions`

Get Local Descriptions · Read-only

Fetch AI-generated descriptions for locations using IDs from a Brave web search response. Returns natural language summaries describing the place, its atmosphere, and what visitors can expect.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `ids` (`array`, required): Array of location IDs (up to 20) obtained from the locations field in a Brave web search response.

Example input: `{"ids":[]}`

### `brave_local_place_search`

Place Search · Read-only

Search 200M+ Points of Interest (POIs) by geographic center and radius using Brave's Place Search API. Either 'location' (text name) OR both 'latitude' and 'longitude' (coordinates) must be provided. Supports an optional keyword query to filter results. Ideal for map applications and local discovery.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `count` (`integer`, optional): Number of POI results to return (1–50). Defaults to 20.
- `country` (`string`, optional): ISO 3166-1 alpha-2 country code (e.g., us, gb). Defaults to US.
- `latitude` (`number`, optional): Latitude of the search center point (-90 to +90). Required together with longitude as an alternative to location name.
- `location` (`string`, optional): Location name (e.g., 'san francisco ca united states'). Required unless latitude and longitude are both provided.
- `longitude` (`number`, optional): Longitude of the search center point (-180 to +180). Required together with latitude as an alternative to location name.
- `q` (`string`, optional): Optional keyword query to filter POIs (e.g., 'coffee shops', 'italian restaurants'). Omit for a general area snapshot.
- `radius` (`number`, optional): Search radius in meters from the center point.
- `safesearch` (`string`, optional): Safe search filter level. Defaults to strict. One of: `off`, `moderate`, `strict`.
- `search_lang` (`string`, optional): Language code for results (e.g., en, fr). Defaults to en.
- `spellcheck` (`boolean`, optional): Whether to enable spellcheck on the query.
- `units` (`string`, optional): Measurement system for distances in the response. One of: `metric`, `imperial`.

Example input: `{}`

### `brave_local_pois`

Get Local POIs · Read-only

Fetch detailed Point of Interest (POI) data for up to 20 location IDs returned by a Brave web search response. Returns rich local business data including address, phone, hours, ratings, and reviews. Note: location IDs are ephemeral and expire after ~8 hours.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `ids` (`array`, required): Array of location IDs (up to 20) obtained from the locations field in a Brave web search response.

Example input: `{"ids":[]}`

### `brave_news_search`

News Search · Read-only

Search for news articles using Brave Search. Returns recent news results with titles, URLs, snippets, publication dates, and source information. Supports filtering by country, language, freshness, and custom re-ranking via Goggles.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `q` (`string`, required): The news search query string.
- `count` (`integer`, optional): Number of news results to return (1–50). Defaults to 20.
- `country` (`string`, optional): Country code for localised news (e.g., us, gb, de).
- `extra_snippets` (`boolean`, optional): Include additional excerpt snippets per article. Defaults to false.
- `freshness` (`string`, optional): Filter results by publish date: pd (past day), pw (past week), pm (past month), py (past year), or YYYY-MM-DDtoYYYY-MM-DD.
- `goggles` (`string`, optional): Custom re-ranking rules via a Goggles URL or inline definition.
- `offset` (`integer`, optional): Zero-based offset for pagination (0–9). Defaults to 0.
- `safesearch` (`string`, optional): Safe search filter level. Defaults to strict. One of: `off`, `moderate`, `strict`.
- `search_lang` (`string`, optional): Language code for results (e.g., en, fr, de).
- `spellcheck` (`boolean`, optional): Whether to enable spellcheck on the query. Defaults to true.
- `ui_lang` (`string`, optional): User interface language locale for response strings (e.g., en-US).

Example input: `{"q":"coffee shops"}`

### `brave_rich_results_get`

Get Rich Result · Read-only

Fetch the enriched real-time 'rich' result (weather, stocks, sports scores, currency conversion, package tracking, etc.) for a callback_key. The callback_key comes from the 'rich' field of a prior Web Search response — that search must have been made with a query that triggers a rich result hint (e.g. a weather or stock query).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `callback_key` (`string`, required): The callback key identifying which rich result to fetch, returned in a Web Search response's rich.hint.callback_key field.

Example input: `{"callback_key":"<callback_key>"}`

### `brave_spellcheck`

Spellcheck · Read-only

Check and correct spelling of a query using Brave Search's spellcheck engine. Returns suggested corrections for misspelled queries.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `q` (`string`, required): The query string to spellcheck.
- `country` (`string`, optional): Country code for localised spellcheck (e.g., us, gb).
- `lang` (`string`, optional): Language code for spellcheck (e.g., en, fr, de).

Example input: `{"q":"coffee shops"}`

### `brave_suggest_search`

Search Suggestions · Read-only

Get autocomplete search suggestions from Brave Search for a given query prefix. Useful for query completion, exploring related search terms, and building search UIs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `q` (`string`, required): The partial query string to get suggestions for.
- `count` (`integer`, optional): Number of suggestions to return (1–20). Defaults to 5.
- `country` (`string`, optional): Country code for localised suggestions (e.g., us, gb, de).
- `lang` (`string`, optional): Language code for suggestions (e.g., en, fr, de).
- `rich` (`boolean`, optional): Whether to return rich suggestions with additional metadata.

Example input: `{"q":"coffee shops"}`

### `brave_summarizer_enrichments`

Get Summary Enrichments · Read-only

Fetch enrichment data for a Brave AI summary key. Returns images, Q&A pairs, entity details, and source references associated with the summary.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `key` (`string`, required): The opaque summarizer key returned in a Brave web search response when summary=true was set.

Example input: `{"key":"<key>"}`

### `brave_summarizer_entity_info`

Get Summary Entity Info · Read-only

Fetch detailed entity metadata for entities mentioned in a Brave AI summary. Returns structured information about people, places, organizations, and concepts referenced in the summary.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `key` (`string`, required): The opaque summarizer key returned in a Brave web search response when summary=true was set.

Example input: `{"key":"<key>"}`

### `brave_summarizer_followups`

Get Summary Follow-ups · Read-only

Fetch suggested follow-up queries for a Brave AI summary key. Useful for building conversational search flows and helping users explore related topics.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `key` (`string`, required): The opaque summarizer key returned in a Brave web search response when summary=true was set.

Example input: `{"key":"<key>"}`

### `brave_summarizer_search`

Summarizer Search · Read-only

Retrieve a full AI-generated summary for a summarizer key obtained from a Brave web search response (requires summary=true on the web search). Returns the complete summary with title, content, enrichments, follow-up queries, and entity details.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `key` (`string`, required): The opaque summarizer key returned in a Brave web search response when summary=true was set.
- `entity_info` (`integer`, optional): Set to 1 to include detailed entity metadata in the response. One of: `0`, `1`.
- `inline_references` (`boolean`, optional): Add citation markers throughout the summary text pointing to sources.

Example input: `{"key":"<key>"}`

### `brave_summarizer_summary`

Get Summary · Read-only

Fetch the complete AI-generated summary for a summarizer key. Returns the full summary content with optional inline citation markers and entity metadata.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `key` (`string`, required): The opaque summarizer key returned in a Brave web search response when summary=true was set.
- `entity_info` (`integer`, optional): Set to 1 to include detailed entity metadata in the response. One of: `0`, `1`.
- `inline_references` (`boolean`, optional): Add citation markers throughout the summary text pointing to sources.

Example input: `{"key":"<key>"}`

### `brave_summarizer_title`

Get Summary Title · Read-only

Fetch only the title component of a Brave AI summary for a given summarizer key.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `key` (`string`, required): The opaque summarizer key returned in a Brave web search response when summary=true was set.

Example input: `{"key":"<key>"}`

### `brave_video_search`

Video Search · Read-only

Search for videos using Brave Search. Returns video results with titles, URLs, thumbnails, durations, and publisher metadata. Supports filtering by country, language, freshness, and safe search.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `q` (`string`, required): The video search query string.
- `count` (`integer`, optional): Number of video results to return (1–50). Defaults to 20.
- `country` (`string`, optional): Country code for localised results (e.g., us, gb, de).
- `freshness` (`string`, optional): Filter results by upload date: pd (past day), pw (past week), pm (past month), py (past year), or YYYY-MM-DDtoYYYY-MM-DD.
- `offset` (`integer`, optional): Zero-based offset for pagination (0–9). Defaults to 0.
- `safesearch` (`string`, optional): Safe search filter level. Defaults to moderate. One of: `off`, `moderate`, `strict`.
- `search_lang` (`string`, optional): Language code for results (e.g., en, fr, de).
- `spellcheck` (`boolean`, optional): Whether to enable spellcheck on the query. Defaults to true.

Example input: `{"q":"coffee shops"}`

### `brave_web_search`

Web Search · Read-only

Search the web using Brave Search's privacy-focused search engine. Returns real-time web results including titles, URLs, snippets, news, videos, images, locations, and rich data. Supports filtering by country, language, safe search, freshness, and custom re-ranking via Goggles.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `q` (`string`, required): Search query string. Max 400 characters, 50 words.
- `count` (`integer`, optional): Number of search results to return (1–20). Defaults to 20.
- `country` (`string`, optional): Country code for search results (e.g., us, gb, de). Defaults to US.
- `extra_snippets` (`boolean`, optional): Include up to 5 additional excerpt snippets per result. Defaults to false.
- `freshness` (`string`, optional): Filter results by publish date. Use pd (past day), pw (past week), pm (past month), py (past year), or a date range YYYY-MM-DDtoYYYY-MM-DD.
- `goggles` (`string`, optional): Custom re-ranking rules via a Goggles URL or inline definition to bias search results.
- `offset` (`integer`, optional): Zero-based offset for pagination of results (0–9). Defaults to 0.
- `result_filter` (`string`, optional): Comma-separated list of result types to include in the response.
- `safesearch` (`string`, optional): Safe search filter level. Defaults to moderate. One of: `off`, `moderate`, `strict`.
- `search_lang` (`string`, optional): Language code for result content (e.g., en, fr, de). Defaults to en.
- `spellcheck` (`boolean`, optional): Whether to enable spellcheck on the query. Defaults to true.
- `summary` (`boolean`, optional): Enable summarizer key generation in the response. Use the returned key with the Summarizer endpoints.
- `text_decorations` (`boolean`, optional): Whether to include text decoration markers (bold tags) in result snippets. Defaults to true.
- `ui_lang` (`string`, optional): User interface language locale for response strings (e.g., en-US, fr-FR).
- `units` (`string`, optional): Measurement system for unit-bearing results. One of: `metric`, `imperial`.

Example input: `{"q":"coffee shops"}`

## Workflows

**Proxy API call**

  **Node.js**

  ```typescript
  const result = await actions.request({
    connectionName: 'brave-search',
    identifier: 'user_123',
    path: '/res/v1/web/search',
    method: 'GET',
    queryParams: { q: 'best open source LLM frameworks 2025', count: '5' },
  });
  console.log(result.data.web.results);
  ```

  **Python**

  ```python
  result = actions.request(
      connection_name='brave-search',
      identifier='user_123',
      path="/res/v1/web/search",
      method="GET",
      params={"q": "best open source LLM frameworks 2025", "count": 5}
  )
  print(result["web"]["results"])
  ```

**Web search**

Search the web and retrieve real-time results. Works on all plans including Free.

```python title="examples/brave_web_search.py"
# Search for recent articles — freshness "pw" limits results to the past 7 days
result = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_web_search",
    tool_input={
        "q": "open source LLM frameworks 2025",
        "count": 5,
        "freshness": "pw",
    },
)

for item in result["web"]["results"]:
    print(item["title"], item["url"])
```

**News search**

Retrieve recent news articles by topic or keyword. Useful for monitoring a brand, topic, or competitor.

```python title="examples/brave_news_search.py"
# Fetch the latest news on a topic from the past 24 hours
result = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_news_search",
    tool_input={
        "q": "AI regulation Europe",
        "count": 10,
        "freshness": "pd",   # pd = past 24 hours
    },
)

for article in result["results"]:
    print(article["title"], article["age"], article["url"])
```

**LLM grounding context**

Retrieve search results structured specifically for grounding LLM responses. Requires Pro plan. Use `token_budget` to stay within your model's context window.

```python title="examples/brave_llm_context.py"
# Get search context sized to fit a 4 000-token budget
result = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_llm_context",
    tool_input={
        "q": "vector database comparison 2025",
        "count": 5,
        "token_budget": 4000,
    },
)

# Pass the structured context directly to your LLM
grounding_context = result["context"]
print(grounding_context)
```

**AI chat completions grounded in search**

Get an AI-generated answer backed by real-time Brave Search results, using an OpenAI-compatible interface. Requires AI plan.

```python title="examples/brave_chat_completions.py"
# Drop-in replacement for OpenAI /v1/chat/completions — results are grounded in live search
result = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_chat_completions",
    tool_input={
        "messages": [
            {"role": "user", "content": "What are the latest developments in quantum computing?"}
        ],
        "model": "brave/serp-claude-3-5-haiku",
    },
)

print(result["choices"][0]["message"]["content"])
# Each answer includes citations back to source URLs
for source in result.get("search_results", []):
    print(source["title"], source["url"])
```

**Local place search and POI details**

Find nearby businesses or points of interest, then retrieve full details. Requires Data for AI plan.

```python title="examples/brave_local_search.py"
# Step 1: Find coffee shops near San Francisco city centre
places = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_local_place_search",
    tool_input={
        "q": "specialty coffee",
        "location": "San Francisco, CA",
        "count": 5,
    },
)

location_ids = [p["id"] for p in places["results"]]

# Step 2: Fetch rich details (hours, ratings, address) for those locations
# Location IDs expire after ~8 hours — always fetch details in the same session
pois = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_local_pois",
    tool_input={"ids": location_ids},
)

for poi in pois["results"]:
    print(poi["name"], poi["address"], poi["rating"])
```

**AI summary with follow-up queries**

Get an AI-generated summary for a search query, then surface follow-up questions. Requires Pro plan.

```python title="examples/brave_summarizer.py"
# Step 1: Web search with summary: true to obtain a summarizer key
search_result = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_web_search",
    tool_input={
        "q": "benefits of RAG vs fine-tuning for enterprise LLMs",
        "summary": True,
        "count": 5,
    },
)

summarizer_key = search_result["summarizer"]["key"]

# Step 2: Retrieve the full AI summary using the key
summary = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_summarizer_search",
    tool_input={"key": summarizer_key, "entity_info": True},
)

print(summary["title"])
print(summary["summary"])

# Step 3: Get follow-up questions for a conversational search experience
followups = actions.execute_tool(
    connection_name="brave-search",
    identifier="user_123",
    tool_name="brave_summarizer_followups",
    tool_input={"key": summarizer_key},
)

for q in followups["queries"]:
    print("-", q)
```

**LangChain integration**

Use Scalekit's LangChain helper to load all Brave Search tools into a LangChain agent. The agent selects and calls the right tool automatically based on the user's query.

```python title="examples/brave_langchain_agent.py"
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_anthropic import ChatAnthropic
from langchain_core.prompts import ChatPromptTemplate

# Load all Brave Search tools — Scalekit handles auth for each call
tools = actions.langchain.get_tools(
    providers=["BRAVE_SEARCH"],
    identifier="user_123",
    page_size=100,  # avoid missing tools when a connector has more than the default page
)

llm = ChatAnthropic(
    model="claude-sonnet-4-6",
    api_key=os.environ["ANTHROPIC_API_KEY"],
)

prompt = ChatPromptTemplate.from_messages([
    ("system", "You are a helpful research assistant with access to Brave Search tools."),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])

agent = create_tool_calling_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

response = agent_executor.invoke({
    "input": (
        "Find the top 5 news articles about AI regulation in Europe from the past week "
        "and give me a one-sentence summary of each."
    )
})
print(response["output"])
```

## Related

Other Analytics connectors ([all 126](/agentkit/connectors/?category=analytics)):

- [Microsoft 365](/agentkit/connectors/microsoft365/): Scalekit connector, OAuth, 317 tools
- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Snowflake](/agentkit/connectors/snowflake/): Scalekit connector, OAuth, 42 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
