Section Insights
Introduction to Browser Agents
What are browser agents and how do they benefit RAMP?
Browser agents are backend primitives used by RAMP to automate and streamline financial workflows, allowing teams to focus on higher-value tasks. They adapt to changes in websites and help manage interactions autonomously through a platform called Browser Factory.
- Browser agents simplify complex financial processes.
- They adapt to dynamic web environments to maintain efficiency.
- Browser Factory helps manage and scale browser agents effectively.
Challenges in Receipt Automation
What challenges do browser agents face in receipt automation?
Browser agents encounter issues such as incomplete information from financial partners and the need for specific details to retrieve receipts accurately. These challenges can lead to a success rate of only 60-90%, depending on the merchant.
- Incomplete data can hinder the accuracy of receipt retrieval.
- Dynamic changes in merchant portals complicate automation.
- Browser agents must adapt to varying requirements for successful interactions.
Deployment of Browser Agents
How are browser agents deployed in production at RAMP?
The deployment process involves starting with deterministic scripts, then evolving to agentic systems that can interact with browsers. This includes handling sensitive information securely by using placeholders and intercepting network requests.
- Deployment starts with basic scripts and evolves to more complex agents.
- Security measures are crucial when handling sensitive data.
- Browser agents are designed to be flexible and adaptive in their operations.
Optimization and Performance Challenges
What performance challenges do browser agents face?
Performance optimization is critical, as high costs per receipt retrieval are not sustainable. RAMP must balance speed, accuracy, and resource usage while managing the increasing complexity of tasks across various merchants.
- Cost efficiency is essential for scaling receipt automation.
- Performance metrics must be continuously evaluated and optimized.
- The complexity of tasks increases with the number of merchants and account types.
Testing and Evaluation of Browser Agents
How does RAMP test and evaluate the effectiveness of browser agents?
RAMP uses test agents to create setup and evaluation scripts that assess whether tasks are completed successfully. This includes checking if the correct receipts are generated and evaluating the overall performance of the agents.
- Testing involves creating scripts to evaluate agent performance.
- Success criteria include accuracy of receipts and efficiency metrics.
- Continuous improvement is sought through iterative testing and optimization.
Transcript
0:04 Hi everyone, I'm Arun. I lead the browser automation team at RAM and I'm super excited to be here to share with you all the ways we use browser agents and in production. browser agents we use them as first class backend primitives to solve a number of high impact problems. A bit about ramp. RAMP is a modern finance solution that simplifies workflows across your entire financial stack. Think of us like your CFO's best friend. The goal of BAMP is to eliminate boring and low-lever finance work so that teams can instead focus on strategic highv value work that actually moves us moves their businesses forward.
0:42 It's our goal to save our customers time and money. Today I'll be talking about browser agents, what they are, the problems they solve, and why they are very effective in production, where they fail, what are the challenges in scaling them. The prime example is when websites change all the time. So how do these browser agents adapt at runtime and finally browser factory which is tools agents and this entire orchestration platform that we've built to manage these browser agents at scale. When websites change browser factory is responsible for diagnosing why something has changed when it has when something's breaks what can be a fix test that repair that and then safely deploy it to production all autonomously.
1:24 The goal of browser factory is to make sure we have an upto-date understanding of the internet. So agents don't have to discover this again and again at runtime. Every time a browser interaction happens, we just save it and then the browser factory will u we save in the browser factory and the browser agents consume from it. With that, let's jump into one favorite use case of mine. Show of hands, how many of you have uploaded a receipt to an expense management solution?
1:52 All right, that's many of you. Okay, keep your hands up if you've enjoyed doing that. >> Oh, no one. Okay, that's my kind of people. All right, we take this kind of annoyance very seriously. It's our life's mission to eliminate this kind of boring work and have spent enormous amounts of time, unreasonable amount of time trying to solve this problem. So, let's take a look at what the task actually is. When an employee spends on a merchant using the company corporate credit card, the finance team needs a receipt for it.
2:23 This receipt has a lot of valuable information. With the receipts, line items, taxes, fees, all this information can help answer a lot of questions like what was purchased, why was it purchased, are there any eligible taxes that we can reclaim from this? And finally, how should the spend be categorized in the right accounting books so that the the expense is closed once and for all. So it's not only just about getting the receipts, it's actually about completing all the downstream tasks that are associated with it. And we assume on a good day it takes users 2 to 5 minutes to find the receipt. But of course, when websites are complex, it can take much more than that.
3:02 It's an enormous waste of time. Nobody wants to do it. And we want to get rid of this problem for once and for all. Imagine a world where you just spend and Ram just gets a receipt for you. You don't have to do anything. Let's take a look at how we do this, right? The most obvious and simple solution is to implement direct integration APIs. So when you when a user transacts with a merchant, if we have an established partnership with them or integration, that merchant can directly send the receipt to ramp and it's very simple, it's efficient, it's reliable because it's first party, right? Like they support this and we often get the complete information about the receipt.
3:36 There's not much missing items missing information here. But with 1 million more and more merchants growing every day at RAM, this problem is infeasible to support as firstparty APIs. The next solution is public portal APIs for the integrations that we don't have and support ourselves. Some merchants actually allow you to go to the internet and enter some details and get the receipt for you. For example, airlines and hotels are a very common example where you can just enter your PNR number, your email, your ticket number, some information maybe card lo to get the receipt for you. So we try to take a look at all these websites and find out what scripts what APIs are in the back end and then we just codify them and every time user does a transaction we assemble this information that's needed and then query the API and get the result. This is again very deterministic u but this has some pitfalls especially because there's some incomplete information here.
4:33 Some websites need the exact hotel name to actually get the receipt for you and that's information that RAMP does not always get from our financial partners. If someone's booked a an airline ticket on behalf of someone else and you want to find this receipt, you have to enter the passenger's first name and last name. That's something we we do not know. We can only take a guess, right? So that's why we're not able to complete the job here with 100% accuracy. It takes 60 90% depends very much on the merchant. And of course the front end and back end all of these can change and every time this changes sometimes this sometimes this merchants's portal just disappears overnight. So we must try to rediscover these workflows, maintain this repository, back test and like try to figure out how do we scale and maintain them, right? And and it's it's a big convers solution.
5:23 Here is the winning solution. Browser agents completely flip the script. While previous approaches were very deterministic and brittle because the website is very dynamic, browser agents are agentic. So they adapt very well at runtime. they can just look at the web and just figure out what information do I need. they do they can do multi-turn interactions like if they find some information missing they could query they can talk to the user or they can just query a ramp system to figure out oh okay the ticket number is not available maybe I should use the confirmation number maybe that's what can get the receipt for me right and some websites need zip codes and hotel names and all of that stuff browser agents can search the internet try to reconcile the best possible u information that they can provide to these APIs so it's a very general solution and it scales really well for the long tale of merchants that we want to go after. Cool. So, what exactly is a browser agent? Well, browser they're simple. They're just LLM agents that you can give browser tools to and that helps them observe and control the browser. We want to navigate, click, type, all these forms, run arbitrary JavaScript code, literally just give all the tools available to the agent to control the browser. And there's some popular libraries that people use u puppeteer selenium these are some of the playright was famous u and stage hand v4 is a very good tool set to actually u completely do everything that a human can do I mentioned that browser agents are very effective and they it's because they can discover and adapt to APIs in real time and websites are designed for humans right so agents can just figure this out and we found it to be very effective for solving a lot of problems let's take a look at some of the nuances that we observed from production and we expected these agents to fail but they were actually very good at just discovering the nuances of each kind of u instance that they've discover and then they can just solve this right so let's say you want to get a Amazon receipt for example right beforehand we do not we have an idea of like oh you have to go to this orders page get the receipt right but this actually varies for every single account type is it a prime account is it a prime business account is it a grocery account is it a whole foods account is it personal account, is it a business account? All the site maps for all these all these account types are very different. And you only know about this once you've logged in and deployed the agent in production. And these agents can just figure it out, right? They're very general purpose. Geographic is a big thing in Denver. If you order something using Costco, it actually gets shipped via Instacart. So if you want to get the receipt, you need two kinds of credentials. This is something we did not really expect while deploying this in production. you thought only a Costco credential was enough but you you just need way more credentials than that and they can talk to the users and ask you for hey I need another credential can you provide this to me right and some other nuances right when someone spends on u buying something we don't really know if it was an online purchase in store purchase what kind of purchase was it and every variation has a different kind of API that we need to some of it we can codify but some of them are like discoverable only at runtime time and these agents are very good at it. They can just discover all of this. And we found this one case where we trained our agent to go and enter ticket numbers and confirmation numbers for hotels, sorry, flights. But the ticket number that we got from our partners was incorrect cuz maybe the ticket changed or something like that. This agent was just able to reconcile with some ramp data like what a heristic should be like it should search from this date window to that date window and like some inputs like names and all of that stuff and just solve the problem right we we never trained it to do that we only asked it to use ticket numbers but it just completely ignored it and then found it using data search so very flexible very adaptive so let's take a look let's piece all of this information and figure out how browser agents are actually deployed in production at ramp what are the building blocks required what safeguards do we need what tools do we need Right. Okay.
9:17 Stage one is deterministic scripts. There's not really an agent, but we just deploy a script pass in the information and get the receipt. Stage two is let's make this agentic, right? Let's give it the tools needed to interact with the browsers, right? stage hand could be a very natural first choice for you cuz it's it these they're they're actually natural language tools. So you can just say click this button and it's going to click the button, right? So this was our next evolution.
9:45 Then sometimes when we want to get receipts from some portals, they ask us to enter the entire 16-digit credit card number and that's a radioactive information, right? Like we can't have we can't give agents access to them. We cannot be logging this. We can't be entering this in a direct iframe or something like that, right? So what we can do is we can provide a placeholder to these agents in this case 4242 4242. You just enter this and after the browser we intercept all network requests and swap it with the actual credit card number. So neither ramp nor browserbased nor the merchant except the merchant only the merchant can get information about the credit card number. So all our secrets get replaced at the final layer after it exits the browser. So agents never have to see it.
10:31 And we need information to reconcile ramp information like is this person booking this ticket on behalf of someone else? Are they executive assistants booking on behalf of their executives? All these heristics for assembling information. We give it access to the RAM database. And then the natural evolution is gated portals, right? Like what if you need receipts from websites that are behind gated portals. We need credentials and cookies. Sometimes finally life has become fully agentic at this point. scripts have been completely replaced by skills. So we have this growing repository of skills that agents can consume from at runtime to u to figure out how to navigate the browser and this has gotten very powerful. The agents can do literally anything right now. So we need a final governance layer which is these agents have ability to run JavaScript code on the browsers right and we just want to have another control plane which is what code should be allowed to execute what should not be allowed to ex execute should we involve the human in the loop to approve if it's an agentic purchase is this the right fun to use all of that stuff this is where we install a CDP proxy just before the code is injected into the browser so this brings us the complete production system at ramp with all the tools and the impact is real the agents are very adaptive and we're able to do a lot of receipt automation with them. Almost half a million receipts per month are automated by just browser agents. That's 37 hours per month and a lot of merchants. We're able to support a lot of merchants, a lot of growing tales of merchants and with all of this production since the past few years, we've we've given employees 40 years of their life back. That's nobody wants to spend time on this. And by the way, this doesn't include all the downstream optimizations that we could do, which is like memo, accounting, automations, all the money that we've saved by giving you your taxes back. so this doesn't count for all of that, but it powers all of that.
12:25 All right, what are the challenges in building these agents? Well, websites can change and we need to be flexible to adapt skills and all of that stuff. But then there are some other stuff that is inherent to just the merchant like when ramp when someone does a transaction at ramp and we want to find the receipt the receipt must first be available on the merchant right and when should we run this agent right some e-commerce companies they will charge your card but the receipt is not available until at least a minute or like an hour later they're processing it they're creating this object in the back end and if you go to the website you will also not be able to find it will be like order is pro is getting processed or something like that. So we have to do these experiments to figure out what is the right time to actually deploy these agents and like run them in production and get the receipt and then there are anti-board challenges. How many times do we need to run these receipts and what inputs are needed? All this kind of stuff. When we're building browser agents and we're testing stuff there there can be regressions involved here where changing anything could break any system already in production and we want to be optimizing for all of that.
13:30 We want to keep all this in case and performance is a big thing. We can't be spending $10 to get one receipt. That's that's not feasible. That's not scalable, right? So, we need to be figuring what's the right model, what's the right speed, what's the right prompt, all of that stuff. We have to be grid searching across all of this stuff. This was very effective. And now other teams at RAM got very excited. they wanted to solve their own problems beyond receipt automations across all the merchants, right? And this problem is only going to explode. There's so many receipts there. there's so many merchants, growing number of tasks that people want to do on every single merchant. supporting this is like pretty infeasible and there's another third dimension to this which is the account type right for every single merchant you have like a variation in account type so this this this matrix is going to explode and it's pretty cumbersome to hand solve this so how do we solve this right so we look at traces all the CDP logs videos where are they failing which card is working we have an idea of what needs to change we get some production data to back test this and we probably need credentials as well right cuz we're trying to simulate what what does to look like with this particular account. So we have these agents create these credentials, accounts, phone numbers, all that kind of stuff. Test this stuff. And finally, you want a very simulated environment of production so that whatever changes you deploy in this shadow production. It's very reliably works in prod. That brings us to browser factory which is our solution to solve all of this problems. And it's basically a set of tools and agents that we use to manage these browser agents themselves. Here we have the production scenario which is browser agents in production. They have access to skills, cookies, credentials and they finally use the browser to interact with the internet. We first create a mirror image of this we'll call this browser factory but is a simulation of production. It has its own set of credentials and cookies but it shares the same skills repository that agents will consume either from browser factory or from production. Then humans come into the picture. They look at the prod traces. they figure out have a heristic of like oh what should I change and then talk to the browser factory deploy these scripts and then then iterate from them right all of these tools are great for humans and now we can provide the same set of tools to automation so when we have an incident when some merchant has changed their website suddenly the receipt automation is down to zero some automations can run and trigger browser factory to start use these same tools look at the production data and try to replicate the scenario and solve So we used to run the browser factory ourselves but now agent a agents do like u yeah this is natural revolution and finally the browser factory the goal of the browser factory is to just create skills and enrich the skill repository so that every agent later can consume from it. How do we use browser factory?
16:15 There there are two ways we use browser factory which kind of unifies it. yeah, browser fret consists of mostly two agents, the test agent and the optimizer agent, which I'll be going to in a little bit more detail. But how do we use them, right? So we can use them to create new tasks, support new tasks. So I did receive automation and now some other colleague of mine wants to do bill payments, right? And they want to support this for all the different merchants. Where do they start? What's the cold start problem? Right? They just feed this task to browser factory along with all the merchants that they would like to support or can be figured out based on traffic data and browser factory is going to spin up test agents and optimizer agents to create scripts evaluate them what does it mean to evaluate them and then run optimizers to figure out what's the best way to actually solve them and the same philosophy applies when something breaks in production you can pass in the same information again and it's going to do that thing.
17:07 Cool. So let's take a look at the two agents, the test agent and optimizer agent. The goal of the test agent is to make a fixture or a setting that's unbreakable that should not break in production. And this is used to back test stuff. So here's how it works, right? The first step is to research is this merchant does this merchant even support this task? Like if you were to ask me how do I get a receipt from Chick-fil-A through browser automation?
17:31 The answer is you can't. You only must be able you can only call them up to get the receipt. So at this stage Chick-fil-A drops off. We we there's no point in continuing further. And with this at this step, we try to research about like what kind of accounts or credentials are kind of needed, right? Like if you have a business Amazon account, you will most likely hit into SSO and O issues that probably can't be solved using credentials. So just like an understanding of what this website can do, cannot do. And then the test agent creates a setup script such that everything can be loaded. the credential is set up, the browser is set up and all that needs to be done is to actually solve the problem using an agent. The agent solves it once and it has never seen this problem before. So it can take up to 10 minutes. We use the best model possible of course. and we just solve it once and once we solve it the test agent creates an evaluation script. What does it mean to say that the job is done? Right? is the card filled? Is does the does the receipt that we got match the transaction amount that we were quiting in the first place?
18:30 Or is the is the spend done? right? Some sort of boolean evaluation of is the job done. But it can also be more holistic which is like number of tools used, what was the cost, what was the speed, all of that stuff, right? It can measure holistically, deterministically and all of that. And finally, an optional tear down script that we use to kind of reset the account. So if you're trying to do card if you want to check can I add this card to this account, you first set it up and then you finally tear it down. It's pretty optional. that was simple. So after the test agent, we have a setup script and an evaluation script and we've solved it once, but we would like to do it faster and better. So that's where the optimizer agent comes in. It first initializes everything.
19:10 There's an agent version, let's call it v0. it's got its own set of tools and scripts and it now runs the test. The test is simple. It just starts the browser. It initializes the account credentials and then it probably goes to the checkout page just before the task needs to be done. And at that u and then it runs a test. So it it's going to send this prompt to the agent to actually do the task and then finally use the evaluation script created by the test agent to measure was the job done what did it what did it cost how many tools called were tool calls were used is it in budget right and if it's not it's going to look at all the traces all the logs and just take a look at the agent behavior and see if it's worth optimizing and if it is it can optimize a few things the first is to optimize the skill oh if you go to this website.
19:57 Make sure you type information in this format. There's iframe issues here. So, do not use click, use type, all these kinds of nuances for all these websites. It it tries to enrich the skill library, but it's possible that the tools also might need to be adjusted. very unlikely because most of these modern tools can give you a complete picture of the internet. But we we were trying to design our own tools. So tools can also be optimized.
20:23 And then you publish the next version of it. And then you run this in a loop so that the agents can u now try to solve this in a faster way and when the evaluation succeeds it's up to the criteria it's under some budget and cost we can publish this new version to our skill library and then the agents can consume it. We have run this at scale for a lot of tasks and a lot of merchants and it's extremely effective in autonomously increasing this coverage of all this stuff and for every single task and merchant we have a set of skills on how to do that effectively.
20:56 What are the setup scripts needed so that they can be verified against in back testing and and in shadow and what does it mean to complete the job? All of this and finally test credential accounts so that this is kind of repeatable. Right? All of these tools that we use for browser factory are are autonomously used by agents. So with that I would like you guys to take two messages home. The first is browser agents are unreasonably effective in production. We use them as first class backend primitives to solve a lot of problems across a lot of merchants. APIs are now agentic APIs. There's a lot of backend a lot of multi-turn interaction with them. Use this paradigm to solve the tail end of problems if you can. And second, everything is agentic. All the tools that you use to debug stuff yourself can now be given to agents. So now now is the time for recursive self recursive self-improvement. So build the agents and tools that build the agents themselves.
21:54 That's browser factory. >> I think that's that's time. Let's make some noise for
Summary
- RAMP simplifies financial workflows, acting as a supportive tool for CFOs.
- Browser agents adapt dynamically to changing websites, improving the automation of receipt collection.
- Traditional methods like direct API integrations are limited due to the growing number of merchants.
- Browser agents can perform multi-turn interactions and gather necessary information autonomously.
- RAMP's "Browser Factory" orchestrates these agents, diagnosing issues and deploying fixes autonomously.
- The system has automated nearly half a million receipts monthly, saving significant time for employees.
- Challenges include adapting to website changes, ensuring data security, and optimizing performance.
- The development of test and optimizer agents enhances the efficiency and reliability of the automation process.
Questions Answered
What are browser agents and how do they benefit RAMP?
Browser agents are backend primitives used by RAMP to automate and streamline financial workflows, allowing teams to focus on higher-value tasks. They adapt to changes in websites and help manage interactions autonomously through a platform called Browser Factory.
What challenges do browser agents face in receipt automation?
Browser agents encounter issues such as incomplete information from financial partners and the need for specific details to retrieve receipts accurately. These challenges can lead to a success rate of only 60-90%, depending on the merchant.
How are browser agents deployed in production at RAMP?
The deployment process involves starting with deterministic scripts, then evolving to agentic systems that can interact with browsers. This includes handling sensitive information securely by using placeholders and intercepting network requests.
What performance challenges do browser agents face?
Performance optimization is critical, as high costs per receipt retrieval are not sustainable. RAMP must balance speed, accuracy, and resource usage while managing the increasing complexity of tasks across various merchants.
How does RAMP test and evaluate the effectiveness of browser agents?
RAMP uses test agents to create setup and evaluation scripts that assess whether tasks are completed successfully. This includes checking if the correct receipts are generated and evaluating the overall performance of the agents.