Configure Brave Search Agent - Recent Video

In Cole’s latest video there’s a Brave Search agent. Can someone give me a hand to configure that agent? I’m not sure how to setup the credentials for it. I tried running it as is but I’m assuming it needs an api key or an auth token.

I can checkout this later and see if it works for me. If it doesnt need to be BraveSearch, instead SearXNG, which is in the local-ai package, you can take a my video using this (open-source,free, no api key needed).

3 Likes

I took that out of the docker-compose file because I’m hosting on Hostinger.com, and since we couldn’t really expose it, I figured it was no use to have it. I would prefer if we had Brave Search.

2 Likes

Here’s what I did to configure the Brave Web Search node AND the Summarize Web Search node.

  1. Obtain Brave Search API Key : Sign up for a (free) Brave Search API account at Brave’s API dashboard to generate an API key.
  2. Configure the two Brave nodes in n8n with Authentication = Generic Credential Type , you should select Header Auth as the Generic Auth Type .
  3. Added the Required Authentication Header:
    Name: X-Subscription-Token
    Value:

However, now I get the error “SUBSCRIPTION_TOKEN_INVALID” indicates that the Brave API key provided is either incorrect or not being accepted by the Brave Search API.

I checked my API key many times and it is exactly the same as shown in my Brave API dashboard. I’ve reached out to Brave API support, but no response yet.

Maybe someone on this thread can see what’s wrong.

1 Like

Another option is to use the SearXNG tool in the OpenWeb UI Community. Avoids the issues of an community n8n node.
“”"
title: Web Search using SearXNG and Scrape first N Pages
author: constLiakos with enhancements by justinh-rahb and ther3zz
funding_url: Open WebUI · GitHub
version: 0.1.12
license: MIT
“”"

I removed SearXNG since mine isn’t being locally hosted. Everything is self-hosted on Hostinger because Cole mentioned if we opened the ports for that and ollama they would be unsecured and open to everyone. So I took them both out of the Docker Compose file.

Unfortunately, that’s not an option for me.

@southbayjay didnt you use the provided workflow from @ColeMedin ? Just checked it and there is everything in, to get it work:
https://raw.githubusercontent.com/coleam00/ottomator-agents/refs/heads/main/n8n-openwebui-agent/Open_WebUI_Agent_Template.json

Basically what is missing most likely for you is to set the appropiate headers:

1 Like

He also said one sentence after it, that the services within the VPS/Docker are able to access it, so I am not sure if this is correct, that you cant use it within your workflow, cause basically you trigger the search by your workflow, so another Node within n8n, which is all internally.

1 Like

The bad part is it’s already been installed and configured, so I’d have to redo my whole setup again and start over from scratch, which I really don’t want to. Unless you think there is a huge advantage of using. SearXNG over Brave? I honestly don’t care about the tracking part of it, but if it’s a performance issue, then I would consider starting over.

I did not test performance, but at the end if it is self hosted on your maschine its on you to optimize it, give it more ressources etc.

For brave you either pay or the rate limits of the free version are fine for you:

  • 1 request per second
  • 2.000 free requests per month

Depends on your usecase.

Also => Why you need to redo your whole setup cause of adding SearXNG?

1 Like

Yeah, I guess I don’t have to redo everything. I could just add it in there. I just recorded a quick video, I’m waiting for it to export to show you the issue I’m having. Maybe I’m overlooking something. As soon as it finishes exporting, I’ll load it up there.

1 Like

I had to upload it to YouTube, so it’s going to take a minute or two. But here’s the link to it. Maybe this will help explain it a little bit better. Or maybe not, maybe it will just be more confusing lol

Let me know what you think.

try another prompt please like “Use the websearch to search for Suno”
Does this work?

Still got the error

ah just saw it, your authorization header variable name is wrong, needs to be this one: “X-Subscription-Token”

1 Like

Okay, let me try that, and I’ll let you know in a few seconds.

Does the value need to be your Brave API key or the Bearer token?

the api key from here: Brave Search API | Brave

1 Like

Amazing. That did the trick. Thank you very much!

2 Likes

Thanks for all your help here @leex279! Glad you got it working @southbayjay!

2 Likes