---
title: Build a deep research tool
url: "https://aaronfrancis.com/videos/build-a-deep-research-tool"
path: "/videos/build-a-deep-research-tool"
type: video
author: Aaron Francis
published: 2026-03-24
topic: "AI & agents"
keywords: [deep research tool, browserbase, claude, gemini, browserbase fetch api, browserbase search api, ai research automation, web scraping, llm agents]
youtube_url: "https://www.youtube.com/watch?v=2NcLtWazHFU"
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# Build a deep research tool

## Transcript

**Aaron Francis:** We are gonna build our own deep research tool. It's gonna be awesome, it's gonna be cheap, and it's gonna be fast. And it's not gonna take very long, 'cause I got stuff I gotta do, okay? If you haven't used deep research, what the heck are you doing? Uh, go to Claude AI, turn on research mode. It's gonna crawl the internet, it's gonna look at a bunch of sources and try to answer your question. You can do the same thing on the Gemini web app, but what if you want to build your own little tool to do that from the command line?

**Aaron Francis:** Well, you gotta figure out how to search the internet, which is getting harder and harder these days. Good news, though, if you go read the change log, you might find something. But not just any change log, specifically the change log of BrowserBase.com. If you haven't heard of BrowserBase, it says, "We help AI use the web." We love a clear H1, don't we?

**Aaron Francis:** "We help AI use the web." Let's look at the change log. BrowserBase change log. Ha, not that many days ago, BrowserBase introduced BrowserBase Search. This looks nice. All I have to do is do BB.search. Now, on their side, they're managing thousands of browsers. How they do it, I don't super care, not my problem. I don't have to do Playwright, I don't have to do MCP.

**Aaron Francis:** I can just say, "Hey, BrowserBase, you figure it out. Good luck, have fun." That gets us step one. Step two is what do we do with these URLs after we get them? Well, let's see what else is in the change log. Uh-oh, BrowserBase Fetch is available today, not that many days ago. Let's click through. I told you it was going to be cheap, one dollar for 1,000 pages.

**Aaron Francis:** You do the math, 'cause I'm not gonna do it. That's pretty cheap. So let's build our deep research agent. But before we build it, in fact, I've already built it. I will show you how it works, but first I wanna show you that it works. So here we are, NPM run research, and I'm gonna pass it a prompt of, uh, state of browser-based AI architecture. This is a pretty thin prompt, but then it's great for a demo.

**Aaron Francis:** Typically, I would do something a little bit longer. I'm building a desktop app, and I need to know this about Rust and this about how Tari interacts with it, whatever. So we're just gonna run this, and this is just a little, it's a little TypeScript command line application. So it's doing the search. It said it found 75 hits. Across the 75 hits, there are 54 unique URLs, and it's gonna fetch 30.

**Aaron Francis:** All of this is controllable with, um, environment variables that you can pass in, and this code is fully available. Uh, it's, it's open source. You can use it, tweak it, whatever. You'll find the link down in the description below. But you can see we've moved on to the fetch stage, and so it is fetching all of these URLs. I, I, I'll show you the code in a second.

**Aaron Francis:** It's incredibly simple, okay? I didn't have to do any of the browser orchestration. Now, it's moved on to the summarization stage, and this is, um... I just kinda YOLO'd this. I just gave it all to OpenAI and said, "Hey, can you summarize this?" I will continue working on that part, because I have all that rich content, and then I do lose just a little bit in the summarization, and it's not quite as deep as, um, or it's not quite as filled out as Claude's part.

**Aaron Francis:** But the hard part is getting all of that content, and BrowserBase handled that for us. So you can see, saved to, and then it just saves it to this markdown file. So if we were to pull this up in the editor, you'll see, ta-da, we have a deep research report. So here are all the findings, WebMCP, browser use, minimal dependencies, ABP, not something that I'm super familiar with.

**Aaron Francis:** Uh, we have a consensus and contradictions, and then we have the sources down here, and then just a few, uh, uh, diagnostics if you wanna keep going further. Now we have the bones of a research product that can be called from your CLIs, your agents can use it locally, and you don't have to manage, uh, browsers either locally or in the cloud.

**Aaron Francis:** Let me show you just a little bit of the code. Like I said, this is all available open source. You can find it on GitHub, but let me show you just a little bit of the code to see how it works. There's really not much here. There's a lot of scaffolding, but the real, the real stuff is, is pretty thin. Index just serves as an entry point, and then we have discovery over here.

**Aaron Francis:** So if we go up here, you'll see, uh, we've got search with retry. So what we're gonna do here is we're gonna take our BrowserBase ins- instance and just say, "Search." That's it. That's all you gotta do. Search the web. Um, so it's gonna search the web with your query, and the number of results is, uh, configurable. That's one of those, uh, environment variables that you can set.

**Aaron Francis:** So all we do is we search the web. That's it. That's all we do. Um, there are some more heuristics around, like, once the URLs come back, what are good candidates? Uh, we do a little bit of deduplicating. We make sure that we have, like, a diversity of domains to make sure we're not pulling all from one, like, vendor or provider or something.

**Aaron Francis:** And then we have fetch, and fetch is fetch with retry. We pass in our BrowserBase instance, and then we say, "BrowserBase, fetch, create." That's it. And then we pass through the candidate URL, um, and we do wanna follow redirects and potentially use proxies, stuff like that. So I'd show you more of the, uh, BrowserBase interactions, but there's not any more.

**Aaron Francis:** I just pulled in the BrowserBase SDK, set up my environment variables, and then I just call their methods. And who knows what goes on behind the scenes. I don't care. Not my problem. You'll see the synthesis here. Um, we do the summarize chunk, and this is where I hand it off to OpenAI, and I say, "You're preparing evidence for resources. Do this, do that, do that." This is the part I would probably tune up a little bit to have it retain some more of the depth.

**Aaron Francis:** Again, I didn't give it a super in-depth prompt, and so maybe that's why, um, this part comes back as a pretty tight executive summary, which can be helpful. But oftentimes, I want the more in-depth stuff. And you can also imagine after the first round of results comes back and it's synthesized, you send it back through another loop, right? So you ask OpenAI, "Based on this, what else should I search for?" And then you go back to BrowserBase and have that search some more, and you just, you have it in this nice loop, and you can configure, "Eh, maybe I wanna do four

**Aaron Francis:** or five loops," or, "Maybe I wanna stop after 500 results," or something like that. That's, I mean, that's it. Uh, you go look at the code. There's not that much there, and that's because it mostly relies on the BrowserBase SDK and the OpenAI SDK. Uh, BrowserBase does all the complicated browser orchestrating, and then OpenAI does a little bit of that summarization.

**Aaron Francis:** Like I said, it is incredibly cheap. Uh, 1,000 free searches, uh, and then it's one dollar for 1,000 pages. So, uh, mere pennies. Go use it before they figure out it's too cheap. And thank you to BrowserBase for sponsoring this video. This is a product that I have absolutely used before they came knocking, and I still use it to this day.

**Aaron Francis:** So go build your own deep research agent or check out mine on GitHub. Um, feel free to grab it, change it, PRs, whatever. I hope that you enjoyed this, and I hope that you will check out BrowserBase. See ya.

---

## Related on aaronfrancis.com

- [I haven’t opened my IDE in two months](/newsletter/i-havent-opened-my-ide-in-two-months) *(Newsletter · 2026-01-10 · shared: claude, gemini)*
- [The Big Boy Plan](/podcast/the-big-boy-plan-2bb20050) *(Podcast · 2025-12-09 · shared: gemini, claude)*
- [AI Bro](/podcast/ai-bro-74682965) *(Podcast · 2025-12-02 · shared: claude, gemini)*
- [Explore vs. Exploit](/podcast/explore-vs-exploit-5021e941) *(Podcast · 2025-03-11 · shared: claude, gemini)*
- [Balancing Your Use of AI with Aaron Francis](/podcast/balancing-your-use-of-ai-with-aaron-francis-bf312e96) *(Podcast · 2025-02-26 · shared: claude, gemini)*

## Relevant Resources from Aaron Francis

- **[Solo](https://soloterm.com)** (overview on site: [/software](/software)): All-in-one agentic development platform and terminal workspace built by Aaron Francis for orchestrating processes and AI coding agents.

## Search aaronfrancis.com (2-Hop Static Keyword Index)

Pick the alphabetical shard matching any topic to find exact pages across all articles, newsletters, videos, talks, and podcast transcripts (every shard is < 40 KB):
[A-B](/llms/keywords/a-b.txt) · [C](/llms/keywords/c.txt) · [D-E](/llms/keywords/d-e.txt) · [F-G](/llms/keywords/f-g.txt) · [H-J](/llms/keywords/h-j.txt) · [K-L](/llms/keywords/k-l.txt) · [M-N](/llms/keywords/m-n.txt) · [O-P](/llms/keywords/o-p.txt) · [Q-R](/llms/keywords/q-r.txt) · [S](/llms/keywords/s.txt) · [T-Z](/llms/keywords/t-z.txt) · [Directory](/llms/keywords.txt) · [Site Map](/llms.txt)

Shards for this page's topics: `deep research tool` ([D-E](/llms/keywords/d-e.txt)), `browserbase` ([A-B](/llms/keywords/a-b.txt)), `claude` ([C](/llms/keywords/c.txt)), `gemini` ([F-G](/llms/keywords/f-g.txt)).

## About Aaron Francis (Current Context)

Aaron Francis is VP of Marketing and Community at [Laravel](https://laravel.com), founder of [Try Hard Studios](https://tryhardstudios.com), creator of [Solo](https://soloterm.com), co-host of [Mostly Technical](/podcast), and author of [Mastering Postgres](/courses), [High Performance SQLite](/courses), [MySQL for Developers](/courses), and [Screencasting.com](/courses). Full bio: [/about](/about) · Current focus: [/now](/now).
