---
title: Using a browser agent on the worst government website
url: "https://aaronfrancis.com/videos/using-a-browser-agent-on-the-worst-government-website"
path: "/videos/using-a-browser-agent-on-the-worst-government-website"
type: video
author: Aaron Francis
published: 2026-06-02
topic: "AI & agents"
description: "I ran a property tax company for about five years and was legally required to use the Texas Department of Licensing and Regulation website. Here I build a Slack slash command that sends a browser agent to check a license for me: a Cloudflare Worker calls a Browserbase function and posts the result back. Sponsored by Browserbase."
keywords: [browser agent, browserbase, cloudflare worker, slack slash command, property tax, web scraping, automation, serverless]
youtube_url: "https://www.youtube.com/watch?v=v3jR4rzXEBc"
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# Using a browser agent on the worst government website

I ran a property tax company for about five years and was legally required to use the Texas Department of Licensing and Regulation website. Here I build a Slack slash command that sends a browser agent to check a license for me: a Cloudflare Worker calls a Browserbase function and posts the result back. Sponsored by Browserbase.

## Transcript

**Aaron Francis:** I'm gonna introduce you to one of the worst websites in the world, and unfortunately, I was legally required to use this for about five years when I ran a property tax company. This is the Texas Department of Licensing and Regulation. This is not from the WayBack Machine. This is what it looks like on this very day, and this is where you go to make sure that all of your employees have up-to-date licenses.

**Aaron Francis:** Electricians, plumbers, HVAC techs, property tax agents, if you don't have an up-to-date license, you can get in pretty big trouble. This is okay when you just have one or two employees. It becomes quite a problem when you've got, like, 30 or 40 employees. So today, we're gonna set up a browser agent to grab this information for us, and not only that, we're gonna make it invokable from Slack via a slash command.

**Aaron Francis:** So we're gonna use BrowserBase, the sponsor of this video. We're gonna use BrowserBase and their browser agent to go and grab this information. We're gonna set up a Cloudflare Worker. We're gonna set up a Slack webhook. It's gonna be awesome. I first just wanna show it in action 'cause it's kinda awesome. So I'm gonna do license check, and it says, "Check a TDLR license." Yes, that's the one, and we're just gonna check Smith, Lance T.

**Aaron Francis:** Okay? So it says... All right. It's gonna go out, and it's going to check the TDLR website, and it's going to come back and tell me his license status. Look at that. Ha. It works. So it says, uh, Lance T- or Lance Smith is active. His license is 246, and it expires later. Thank goodness. I can click on it, and ha, I have a deep link right to where I want to go.

**Aaron Francis:** What is very cool, uh, is this all happened somewhere else. This all happened in the cloud. I didn't run any of this on my machine. I didn't have to set up a headless browser. I didn't have to do any of that because this all ran in BrowserBase. So if we look here at BrowserBase, I'm looking at a session recording. I'm seeing the actual, uh, what actually happened in the browser, and it's so kinda mesmerizing.

**Aaron Francis:** I'm just watching it over and over, and it's incredibly easy. So I'm gonna walk you through, I'm gonna walk you through the whole thing from Slack to the Cloudflare Worker to the BrowserBase function and all the way back around. It's surprisingly easy, and the best part for me is I'm not hosting any of that infrastructure. I don't wanna fight with browsers.

**Aaron Francis:** Okay? The first thing I had to do was figure out the structure of this website and how to extract the data from it, and I'll be honest, I didn't do any of that. I used Browse.sh. So this is also built by BrowserBase, and it's a browser CLI for your AI agents. So I added this to my machine, and then I talked to GPT and I said, "Hey, we gotta figure out the shape of all of this." Using this CLI and using some of their skills, we figured out exactly what the selectors are and how to write the code for it so that in the future, we have this nice deterministic

**Aaron Francis:** path all the way through. So this is kinda my discovery phase. Use these skills. Use this tool. Let's discover what the site looks like. Let's discover the shape, and then let's make that deterministic by putting it into code. And here is the code. You can see there's really not very much of it. I have my Cloudflare Worker here, and then I have my BrowserBase function up here.

**Aaron Francis:** And so we have a couple of types up here, but importantly, we've got my define function. This is what puts my, uh, invokable function on BrowserBase's infrastructure. So if we switch back to the browser and we come out, uh, not to Sessions, we come to Functions, you'll see I've got one function here, TDLR.

**Aaron Francis:** I always wanna say TLDR. TDLR license check, okay? That is my function name, which is TDLR license check. So that puts this function that I'm writing right here, that puts this function out on BrowserBase's infrastructure so that they can host the code, the browser, all of it. Now, inside of this function is where we take everything we learned in that, uh, Browse.sh discovery phase, figuring out the selectors, how to navigate, all of that.

**Aaron Francis:** We take all of that, and we put it into this deterministic runtime right here, just this JavaScript code. Now, importantly, we're using, uh, BrowserBase's agent identity, and this participates in BrowserBase's auth and identity program. They have a lot of partners that are trying to work together to make the web accessible to agents, okay?

**Aaron Francis:** So if you were to spin up a VPS and put a browser on it, you'd probably get blocked everywhere. But because we're using, uh, BrowserBase's auth and identity, our odds go way, way up of getting through because we are a well-behaved agent. We're just trying to do our jobs here. So inside of, uh, inside of our, uh, function name here, we've got the Run TDLR Lookup, and that's what does all of the work here.

**Aaron Francis:** And again, um, I didn't write most of this. I'll be honest with you. We discovered it using Browse.sh, and then we transferred that knowledge to, uh, just GPT to Codex, uh, and then we had it write it based on what we learned from the Browse.sh, uh, the Browse CLI. So what I'm going to return here is I'm going to return this well-formed JSON document that says, "Hey, here's who we found.

**Aaron Francis:** This is the license number. This is the expiration, the name, the county, the class," etc. This is structured data. This is exactly what I want. So this is, again, hosted out here on BrowserBase. Here's my TDLR license check. I can see all of the runs, uh, from the past, you know, hour or so here, and if I wanted to, I could click in and watch the sessions.

**Aaron Francis:** That's helpful for when I'm debugging something. Maybe the website changed or something. So now we have this function out on BrowserBase. The code is out there. The browser's out there. The agent identity is out there, so I have my browser agent out there. Now, how do I invoke it? Well, I could, of course, just invoke it from my local machine, but that's not awesome enough. It's also not useful enough for, uh, non-developers, I think.

**Aaron Francis:** So we put it all in Slack. Everything goes in Slack, after all. So I created a Slack app that has a slash command that is going to hit our Cloudflare worker. Let me show you that part. Here's our Cloudflare worker, and there's, there's a little bit going on here. There's honestly not much. It's a little bit of plumbing. We have our ends at the top, and one thing that we have to keep in mind is Slack requires that we respond within three seconds.

**Aaron Francis:** And so what we're gonna do is we're going to immediately acknowledge the slash command, and then while BrowserBase is contacting TDLR, and TDLR could be really slow, we're just going to hold the worker open, and when it gets back to us, then we're gonna post the response back in. So we have a few operational constraints, right? This is real life. So in here, in the worker, just at the top, we've got a health command, not important.

**Aaron Francis:** We guard against gets, op- options, and heads, and we make sure that it's a post, and then we handle the Slack slash command. Okay? Down here, we see that we're gonna verify the webhook signature. I'll post all this code on GitHub. You can find a link below. We're gonna verify the Slack signature to make sure no bad guys are calling it. Right? And then, um, jumping down here, you'll see this wait until, which I'll cover in a second.

**Aaron Francis:** But we, we, uh, acknowledge that we got the command, right? The Slack command, uh, came through. We acknowledge it immediately. But we keep the, uh, worker context running until that lookup finishes. So we send out the response, but we're going to keep our little container alive until BrowserBase is able to reach TDLR and comes back to us and then comes back to our worker, at which case we'll post home into the Slack channel.

**Aaron Francis:** So the way that we do this is we run the slash lookup, and then we post to Slack, right? So we've already responded, but the container is still alive. And so when it comes back, we post to Slack. We just make a new post into Slack. Here you go. There's the payload. Here's the header. That's all we have to do. Now, the, uh, actual calling of BrowserBase is relatively straightforward.

**Aaron Francis:** Uh, we're gonna go into, uh... Let's pop open lib and go to BrowserBase, and here we go. So in here, we've got our invoke TDLR license check. This is the one that is going to call out to that function on BrowserBase's infrastructure. You'll see up here we set a few constants, and then here we go.

**Aaron Francis:** This is it. Fetch the base URL, V1 functions, and then my environment variable that declares what my function ID is. So I just invoke it, right? I'm just gonna invoke this as a function, and if I get an immediate result back, I'm gonna return early. Otherwise, if, uh, TDLR is taking a while, I'm going to poll, and I'm going to ask BrowserBase, "Hey, are you done yet?

**Aaron Francis:** Did it respond? Are you done yet? Did it respond?" And when it does respond, when TDLR finally responds, it can be quite slow, then I'm going to post that back into my Slack channel, and I have my results. Let's do it one more time just 'cause it's so awesome. So I'm gonna do license check. Now, remember, this, uh, Slack command hits the Cloudflare worker, and I'm gonna check for Smith, Lance T.

**Aaron Francis:** And here's my immediate response. Here's my ack from the Cloudflare worker. Checking TDLR for Smith, Lance T. We responded well within three seconds, and then here is the structured data formatted the way that I wanted. Here's the structured data that comes back from the browser agent that is hosted out on BrowserBase. And now, I'll leave this as an exercise for the viewer.

**Aaron Francis:** We could set up a cron, right? We could set up a cron, and we could do this every night. If we come out to wrangler.toml, we could set up a cron. So now we have, uh, we have everything we need on BrowserBase. We can set up this little bitty worker on Cloudflare. We can have it run nightly. We can give it our roster of employees, and maybe once a week or once a night, I don't really care, it's gonna check everybody's license, make sure that they're all in good standing, and post it into our

**Aaron Francis:** Slack channel. This, my friends, is AI solving actual problems, right? We, we did the discovery, which was, um, browse.sh with my agent. Then we wrote deterministic, reliable code, and we put that onto BrowserBase, and then we wired it all together from Slack to the worker to BrowserBase.

**Aaron Francis:** And now I have a business... Like, I have added business value to my company. So I hope you'll check out BrowserBase's functions. Uh, this is only the beginning of the things that I will wire up. They're a wonderful company. I use them all the time. So thank you to BrowserBase for sponsoring this video. I will put all of this code on GitHub.

**Aaron Francis:** You can find it down below. And until the next time, see ya.

---

## Related on aaronfrancis.com

- [I hired someone to be my boss](/newsletter/i-hired-someone-to-be-my-boss) *(Newsletter · 2026-06-06 · shared: browser agent, browserbase, cloudflare worker)*
- [Build a deep research tool](/videos/build-a-deep-research-tool) *(Video · 2026-03-24 · shared: browserbase, web scraping)*
- [Don’t build AI tooling](/newsletter/dont-build-ai-tooling) *(Newsletter · 2026-01-24 · shared: property tax)*
- [Up & To The Right](/podcast/up-to-the-right-480ef277) *(Podcast · 2025-07-15 · shared: automation)*
- [Why Most Developers Overcomplicate Everything w/ Aaron Francis](/podcast/why-most-developers-overcomplicate-everything-w-aaron-francis-855db0fe) *(Podcast · 2025-03-20 · shared: serverless)*

## 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: `browser agent` ([A-B](/llms/keywords/a-b.txt)), `cloudflare worker` ([C](/llms/keywords/c.txt)), `slack slash command` ([S](/llms/keywords/s.txt)), `property tax` ([O-P](/llms/keywords/o-p.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).
