YouTube2Text

Why 99% Accurate Browser Agents Still Fail — Derek Meegan, Browserbase — Transcript

by AI Engineer · 2,400 words · 395 segments · language en · Watch on YouTube

Full transcript

  1. 0:00All
  2. 0:01>> [music]
  3. 0:12>> right.
  4. 0:16Deploying browser agents.
  5. 0:19Uh running a browser agent demo once is
  6. 0:23easy. Uh it's on one site. It's one run
  7. 0:27on a good day with you watching and your
  8. 0:29fingers crossed. Uh, but we know
  9. 0:32production is vastly different.
  10. 0:34Thousands of runs unattended while the
  11. 0:38site can change or your model can just
  12. 0:39have an off day. So that's why we're
  13. 0:42here.
  14. 0:44What separates a demo from production?
  15. 0:48My name is Derek Megan. I'm a software
  16. 0:50engineer at Browserbase. And today we'll
  17. 0:52break up this talk into four parts.
  18. 0:55First, we'll bring order to chaos, and
  19. 0:58we'll understand concretely how agents
  20. 1:00interact with the web. Second, we'll
  21. 1:03define the impossible and explore why
  22. 1:06running them at scale is so hard. Third,
  23. 1:09we'll take a step back. We'll think
  24. 1:11about what's important and the value
  25. 1:13proposition that agents propose. And
  26. 1:16then last, which is hopefully the reason
  27. 1:18why we're all here, we'll generate some
  28. 1:21shareholder value.
  29. 1:23So first how agents interact with the
  30. 1:26web.
  31. 1:28I like to think about the output of a
  32. 1:29model as a probability distribution. You
  33. 1:32receive input tokens. They represent the
  34. 1:35page state, the overarching goal or the
  35. 1:37steps that have already been taken. Then
  36. 1:40the model explores a distribution of
  37. 1:42possible actions proposing the most
  38. 1:44likely one.
  39. 1:46Then that action is transposed into a
  40. 1:48structured tool call and
  41. 1:49deterministically executed to interact
  42. 1:51with the browser.
  43. 1:54But the interface of the browser is
  44. 1:56complicated. You have several distinct
  45. 1:59layers. You have requests flowing in and
  46. 2:02out of the browser. You have the
  47. 2:03document object model or the HTML
  48. 2:05representation of the page. You can
  49. 2:07screenshot the browser. the
  50. 2:09accessibility tree which is a semantic
  51. 2:11textual representation of the page and
  52. 2:14the browser state storage cookies
  53. 2:18console URL tabs etc. Underneath all of
  54. 2:22this, you have a dynamic code execution
  55. 2:24runtime where you can interact with the
  56. 2:27browser by writing arbitrary do
  57. 2:28JavaScript or CDP.
  58. 2:32How do you wire these together?
  59. 2:34Typically in industry, there's three
  60. 2:36main strategies. Number one is creating
  61. 2:39a textual representation of the browser.
  62. 2:41This typically involves taking the HTML
  63. 2:44state of the page in the accessibility
  64. 2:45tree and creating a hybrid
  65. 2:47representation.
  66. 2:49Number two is computer use where you
  67. 2:51represent the browser in a series of
  68. 2:52screenshots of the page. And finally,
  69. 2:55and becoming increasingly popular, is
  70. 2:58deharing your agent, removing tailor
  71. 3:00made tools in favor of dynamic execution
  72. 3:03environments where the agent can write
  73. 3:05arbitrary code against the browser.
  74. 3:08In practice, most production systems
  75. 3:11lean on the first, the second, or a
  76. 3:13combination of the first and the second
  77. 3:15two strategies.
  78. 3:18Now let's think about the type of
  79. 3:19agentic trajectories on the browser. And
  80. 3:22here I define three spanning across a
  81. 3:25spectrum of agenticness.
  82. 3:27From least agentic, we have purposebuilt
  83. 3:30browser trajectories that are specially
  84. 3:33made to complete a single task.
  85. 3:36To the most agentic, we have just in
  86. 3:38time browser automations where we don't
  87. 3:41know what the task is beforehand and the
  88. 3:43user provides us an arbitrary task to
  89. 3:45complete. In the middle, we have
  90. 3:48something sort of between both. We're
  91. 3:50using the browser as an implementation
  92. 3:52detail to serve a larger goal, such as
  93. 3:55performing deep research or competitor
  94. 3:57analysis.
  95. 3:59At scale, I really want to hone in on
  96. 4:02these transactional workflows. Not
  97. 4:04because it makes things easy, but that's
  98. 4:06because we typically see at scale. These
  99. 4:08workflows are transactional by nature
  100. 4:11where we want to complete a unit of work
  101. 4:13end to end. On the other side, browser
  102. 4:16agents provide us a flexible execution
  103. 4:18environment to handle ambiguity in
  104. 4:20production.
  105. 4:22So, we know how agents interact with the
  106. 4:25web and the different types of
  107. 4:27trajectories we may see and we're honing
  108. 4:29in specifically on transactional
  109. 4:31workflows. Why is it so hard in
  110. 4:34production? And I think it comes down to
  111. 4:38a key interaction.
  112. 4:41Cost accumulation is continuous while
  113. 4:43value realization is terminal. Each step
  114. 4:47in your trajectory, you're incurring
  115. 4:48some incremental cost. Additionally,
  116. 4:51you're incurring some incremental risk
  117. 4:53of failure. Yet, I only receive value
  118. 4:56from this browser trajectory when all
  119. 4:58steps of the task have been completed.
  120. 5:01That's all to say that with browser
  121. 5:03agents, there is no partial credit. And
  122. 5:05the vast majority of web automations
  123. 5:07fall into this category.
  124. 5:10So you say, "Okay, well each step
  125. 5:13there's more risk and there's more cost.
  126. 5:15If I use a highly capable model, I can
  127. 5:17sidestep this conundrum."
  128. 5:20Take this thought experiment for an
  129. 5:21example. You have a browser agent where
  130. 5:24each step has an independent success
  131. 5:26rate of 99%.
  132. 5:28If your browser trajectory spans 100
  133. 5:31steps, the overall success rate at scale
  134. 5:34starts to look like 36%.
  135. 5:37only about a third of the time. That's
  136. 5:40not super great and it's certainly not
  137. 5:42how we deliver reliable outcomes for
  138. 5:44customers in production. And so you say,
  139. 5:48okay, well, we're continuously
  140. 5:50accumulating costs, we're continuously
  141. 5:52accumulating risk, and the percentage
  142. 5:55chance of value realization is very low.
  143. 5:58That would suggest to never use a
  144. 6:00browser agent. Uh, thankfully, that's
  145. 6:03not the subject of my talk today. I
  146. 6:05think this dynamic is real, but the math
  147. 6:07isn't the whole story. And so, it's time
  148. 6:11to take a step back. Let's think about
  149. 6:14what's important and how agents actually
  150. 6:17deliver value. And to illustrate the
  151. 6:21value that I wish agents to deliver, uh,
  152. 6:24I will propose a simple equation. Um,
  153. 6:27perhaps not used enough by many of us.
  154. 6:30And this equation is profit equals
  155. 6:32revenue minus costs.
  156. 6:34Yes, very simple. Um, but perhaps
  157. 6:37overlooked when thinking about browser
  158. 6:39agents. And this is all to say that your
  159. 6:41agent is just another line item and that
  160. 6:44your agent should give you more than it
  161. 6:46takes. But when we think about what your
  162. 6:48agent should give you, that begs the
  163. 6:50question of what does a browser agent
  164. 6:53actually give you? And so to answer this
  165. 6:56question, I like to think about the
  166. 6:58context of the customer. At browserbase,
  167. 7:01we help our customers deploy browser
  168. 7:03automations for their users. Oftent
  169. 7:06times, they're not automating the web
  170. 7:08for their own needs, but instead
  171. 7:09performing actions on the web on their
  172. 7:12customer's behalf. And so, a browser
  173. 7:14agent actually gives you a task
  174. 7:16completed for your customer repeatedly.
  175. 7:19Well, it gives you that ideally. And the
  176. 7:22question is how you can create a dynamic
  177. 7:24system that affords the benefit of being
  178. 7:28able to wade through ambiguous problems
  179. 7:30while also completing the task
  180. 7:32repeatedly every time when the
  181. 7:34environment stays the same. And so we'll
  182. 7:37look across three dimensions and in
  183. 7:39order of importance. First is
  184. 7:42performance. Second is cost and third is
  185. 7:45maintainability. And when we think about
  186. 7:48performance, this is the primary measure
  187. 7:50of success that we want to focus on.
  188. 7:52Because once we know a browser agent is
  189. 7:54performant, it can complete the task we
  190. 7:56ask it to do. Then cost and
  191. 7:59maintainability simply become
  192. 8:00optimization problems. And I like
  193. 8:03optimization problems because those can
  194. 8:05be addressed with engineering.
  195. 8:07So the first thing we need to ask is
  196. 8:10what success actually looks like.
  197. 8:13And success in these transactional
  198. 8:15browser trajectories look like some kind
  199. 8:18of concrete artifact that the run leaves
  200. 8:20behind. If you're paying a bill, that
  201. 8:23might look like a confirmation email. If
  202. 8:25you're placing an order, that may look
  203. 8:28like an order ID or a receipt. Or if
  204. 8:30you're submitting a form, that may look
  205. 8:32like a new record in a system that you
  206. 8:35can deterministically query. Second,
  207. 8:39>> how often is an agent correct?
  208. 8:43And there's two ways to measure that.
  209. 8:46Naively, you may measure the success of
  210. 8:49an agent on a perr run basis. Assume you
  211. 8:52have a browser agent. It's probability
  212. 8:54of success on any run is 50%.
  213. 8:58Yet, if you permit that agent to retry
  214. 9:01for a particular transaction, maybe up
  215. 9:04to four retries, your per transaction
  216. 9:06success rate quickly climbs to 94%.
  217. 9:10And so when you think about what metric
  218. 9:12matters, again, I'd implore that we
  219. 9:14ground ourselves in the customer. The
  220. 9:16customer does not care necessarily how
  221. 9:18many retries you perform, but rather
  222. 9:21that the workflow was completed
  223. 9:23successfully and reliably. In short,
  224. 9:26permit retries and measure success
  225. 9:29against a per transaction basis.
  226. 9:34>> Next, we'll explore cost and we'll break
  227. 9:37cost down into two dimensions. The first
  228. 9:39is per run, which today is predominantly
  229. 9:42model costs. But as engineering evolves
  230. 9:46in the open source landscape for models,
  231. 9:49there's an incredible downward price
  232. 9:51pressure on the cost of intelligence.
  233. 9:53And I believe over time, model cost will
  234. 9:55become a smaller and smaller component
  235. 9:57of deploying browser agent trajectories.
  236. 10:00Next is infrastructure and compute. What
  237. 10:03are the real resources you need to run
  238. 10:05your browser agent trajectories? And
  239. 10:07last is additional integration and
  240. 10:09tooling. Then we think about maintenance
  241. 10:11over time. We need to invest in
  242. 10:13observability not only in how the agent
  243. 10:16made decisions but what actually
  244. 10:18transpired in the browser. Second is
  245. 10:21developer time. When things break or
  246. 10:24things are not working optimally, people
  247. 10:26need to come in and reconfigure the
  248. 10:28harness or augment its capabilities.
  249. 10:31And last is re-evaluation. As the
  250. 10:34problem changes, sites change, models
  251. 10:37progress, and we need to re-evaluate our
  252. 10:39point in time solution to last the test
  253. 10:43of time.
  254. 10:46So, we talked about performance, we
  255. 10:49talked about unit costs, we also talked
  256. 10:51about maintainability. What are the risk
  257. 10:53factors to the durability of these over
  258. 10:55time? Well, first and foremost, the
  259. 10:59environment can fight back. Antibbots
  260. 11:02and just generally we understand the web
  261. 11:04as not the friendliest place for your
  262. 11:06agent. Second, the task changes. The
  263. 11:10underlying job shifts beneath the a
  264. 11:12shifts beneath the agent and we ask the
  265. 11:15agent to wade through ambiguity.
  266. 11:17Luckily, this also benefits from
  267. 11:19increased model capability as models are
  268. 11:22more able to intuitively understand the
  269. 11:24intention of the user. and therefore in
  270. 11:27the face of something go wrong course
  271. 11:29correct and ultimately complete the
  272. 11:30goal. Third is a better methods better
  273. 11:34methods appear and this is sort of a
  274. 11:36canonical conundrum with automating the
  275. 11:38web. What happens if I'm automating the
  276. 11:41web today and that same website creates
  277. 11:43an API tomorrow but for the vast
  278. 11:45majority of browser agent use cases uh
  279. 11:48an API isn't coming anytime soon. And
  280. 11:51finally the model strays off tasks.
  281. 11:54models are inherently indeterministic.
  282. 11:56So from run to run it may not ide follow
  283. 11:59the ideal path or the critical path to
  284. 12:01perform the action. So
  285. 12:06finally we've come to the meat of the
  286. 12:08talk. How do we concretely generate
  287. 12:10shareholder value? This is the question.
  288. 12:13Uh we understand that if a model
  289. 12:14performs well then cost and
  290. 12:16maintainability are an optimization
  291. 12:18problem. So let's explore that in
  292. 12:20practice together. We're going to go
  293. 12:23through a highle architecture of a
  294. 12:25browser agent for real world tasks. This
  295. 12:28task is automating an health insurance
  296. 12:31portal. Every step we take in creating
  297. 12:34this dynamic system should influence one
  298. 12:36of these key levers. Cost, performance
  299. 12:40or maintainability.
  300. 12:42So first we'll start with a lowly agent.
  301. 12:46The goal of this agent is to log in and
  302. 12:48download an explanation of benefits. A
  303. 12:51request comes in, the agent performs the
  304. 12:53action on the browser, and this is the
  305. 12:55minimum necessary system you need to
  306. 12:57just do something.
  307. 12:59Next, you realize that when you go to
  308. 13:02download that explanation of benefits,
  309. 13:04that downloading involves
  310. 13:06programmatically interacting with the
  311. 13:07page. And then once you perform that
  312. 13:09download, you need to retrieve that file
  313. 13:12from storage and bring it into the
  314. 13:13agent's runtime. So you create a tool
  315. 13:16that does this all in one transaction.
  316. 13:19Instead of the model needing to make
  317. 13:20decisions on the fly, you encapsulate a
  318. 13:23complex operation into a single tool
  319. 13:25call.
  320. 13:27Next, you want to give the agent an
  321. 13:29opportunity to verify its work real
  322. 13:32time. This can be done by giving it
  323. 13:34another tool. This tool is an OCR tool
  324. 13:37that deterministically extracts entities
  325. 13:40from the document and compares that
  326. 13:42against the system of record. Great. Now
  327. 13:45the agent knows if it's did it if it
  328. 13:47really did its job right or not because
  329. 13:49it has a deterministic mechanism to
  330. 13:51verify that.
  331. 13:54Next,
  332. 13:55you realize that while this portal may
  333. 13:58have ambiguity in your business logic
  334. 14:00that the authentication workflow is
  335. 14:02never changing and you want to reuse the
  336. 14:05same authentication mechanism for many
  337. 14:08business operations on the same portal.
  338. 14:10So you pull that authentication logic
  339. 14:12out from the responsibility of the
  340. 14:14model. Again, we're reducing the number
  341. 14:16of steps that the agent has to take to
  342. 14:18complete the task successfully. This
  343. 14:21means lower unit cogs, higher
  344. 14:23performance, and easier maintainability
  345. 14:26as well as we can reuse this
  346. 14:28authentication function across multiple
  347. 14:31business logic workflows on the same
  348. 14:33portal.
  349. 14:35Last,
  350. 14:37we've contained the responsibility of
  351. 14:39the agent to only the area of ambiguity
  352. 14:43necessary. So, we draft a skill. These
  353. 14:47skills look very similar to a standard
  354. 14:49operating procedure that we would have
  355. 14:51humans use in the past, except this
  356. 14:54standard operating procedure is for an
  357. 14:55agent, and it allows the agent to follow
  358. 14:58the critical path more closely. At the
  359. 15:01beginning of the talk, we discussed how
  360. 15:03the output of an agent can be thought of
  361. 15:06like a probability distribution. So if
  362. 15:08we introduce the critical path to the
  363. 15:10agent, it knows it's at step two and
  364. 15:13knows that it needs to take step three
  365. 15:16because we have outlined it in this
  366. 15:17skill, then it's more likely to take
  367. 15:19that step three. It knows exactly where
  368. 15:22it needs to go and we remove ambiguity
  369. 15:24from the agents decision process.
  370. 15:26In the end, this is the final result. We
  371. 15:30have actually a pretty complex system. A
  372. 15:33request comes in, a serverless
  373. 15:35authentication function authenticates
  374. 15:37the browser. That browser is provided to
  375. 15:39the agent runtime. The agent navigates
  376. 15:42the portal using the skill provided,
  377. 15:45calls a deterministic download function,
  378. 15:48provides that downloaded file to a
  379. 15:50verify tool, and can know
  380. 15:52authoritatively whether its trajectory
  381. 15:54succeeded or failed.
  382. 15:57In the end, this system takes steps out
  383. 16:00of the model's responsibility that
  384. 16:03simply do not need to be in the
  385. 16:05responsibility of the agent. We reduce
  386. 16:07the number of steps it needs to take
  387. 16:09while still being able to achieve the
  388. 16:11desired outcome. Thus, the system's more
  389. 16:14maintainable and it's more performant
  390. 16:16and we can overcome the browser agent
  391. 16:20conundrum.
  392. 16:21So,
  393. 16:23>> here we are. Welcome to production and
  394. 16:27congrats. Now you're on call. Thank you.
  395. 16:46>> [music]

About this transcript

This page contains the full transcript of Why 99% Accurate Browser Agents Still Fail — Derek Meegan, Browserbase by AI Engineer, generated from the public captions YouTube serves with the video. The transcript has 2,400 words across 395 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.