Latest / Agentic Conversations (formally mlops.community) / Getting to Grips with Web Agents
Transcript
- 0:00Today we're talking web agents. This episode is going to be all
- 0:05about how the Process team has been leveraging web agents and
- 0:10why you would even want to go down the path of trying to get
- 0:15web agents to work. Because that was my biggest
- 0:18question. Isn't it just adding complexity
- 0:20and you can use these API agents?
- 0:23Let's get into this episode. This is the ML OPS Community and
- 0:26Process collab. We are doing this limited series
- 0:29all on agents in production. All right, man, Web agents, here
- 0:38we go. We're getting into what they
- 0:40are, what they aren't. And you told me something
- 0:44yesterday or two days ago about how computer use is full use of
- 0:52the computer like it, the name States.
- 0:54And then Web agents is almost a hybrid of AP is and computer
- 1:00use. What exactly is a web agent?
- 1:02Why are they useful? Let's get into it.
- 1:04Yeah. So we talked about the fact
- 1:07that, you know, what are agents and that my simple definition
- 1:09going back to that is agents are LMS that interact with the
- 1:12world. And one way to interact with the
- 1:15world, certainly one way that we as humans interact with the
- 1:19world, is through. The Internet.
- 1:21The web. Right.
- 1:23And browsers more specifically. And because at pros, you know,
- 1:27we're a large tech company, we interface with our consumers,
- 1:29about 2 billion of them all over the world through our companies
- 1:32and their products, which are almost all entirely on the web
- 1:36or through apps. As we think about what's the
- 1:39next stage of agents, of course, we're, you know, we're, we're
- 1:42also exploring how the web can be used by agents to help users
- 1:49navigate, find, discover, transact, buy and so on.
- 1:53And and that's why we have an active, let's say team working
- 1:58on on web use for agents. Why only web agents and why not
- 2:02just go full all in with computer use?
- 2:05Yeah, I think the way we're starting to to, to, to give
- 2:09these agents ability to interact with the world is gradual.
- 2:13And, and that graduality, sort of incrementality sits in the
- 2:16fact that you kind of increase complexity.
- 2:19And think about the 1st access that we gave LMS to the rest of
- 2:23the world were through simple APIs and function calling.
- 2:27And now we're saying, well, maybe they can actually interact
- 2:30with the world through a browser.
- 2:32And then of course, after that it will be very likely the
- 2:35computer as we're already seeing and then maybe after that the
- 2:38physical world. And so web browser sort of the
- 2:42next step, the natural step that we wanted to take also because a
- 2:47lot of as I said, are, are are interfacing with our consumers,
- 2:51customers happen happens through the web.
- 2:54I, I know that there is a ton of e-commerce stuff that you all
- 2:58are doing like OLX for example is a huge one.
- 3:01And if you have web browsing with agents, why would you use
- 3:07that instead of AP is why would you?
- 3:10How would you build AE commerce site that's optimized for web
- 3:14browsing for agents? Like how do you think about
- 3:17that? Yeah, let let's start with a
- 3:19question. Why would why would we want to
- 3:20do that? Well, as I mentioned, I think
- 3:23the IT, it isn't a very important way that we interact
- 3:27with the world today. The way we discover things, we
- 3:31learn, we may buy and shop and, you know, exchange goods in
- 3:36general. And so that's why we're trying
- 3:41to solve that process. All of our companies have a web
- 3:44interface to, to the world. And then the question is, OK,
- 3:51well, how do you start going down that road?
- 3:53I mean, why not just through API as well?
- 3:55The the truth is that actually, you know, we're most of the
- 3:58things that we want to give agents access to aren't made for
- 4:01agents to access. They aren't API FIDE yet.
- 4:05And so. What do you mean by that?
- 4:06Like a photo on a website or what is not API ified.
- 4:13Well, if I, let's say I, I want, so one of the predictions we've
- 4:16made at the marketplace at 10% of the e-commerce transactions
- 4:20will be done by agents on behalf of consumers in the next year,
- 4:24right. Whether it's 10% or not or not,
- 4:27I think we, we, it's safe to assume that agents will start to
- 4:31take actions on behalf of us on the web in some near future.
- 4:36But then the question is, OK, which types of action?
- 4:38Let's say you want to order a flight or you want to order, you
- 4:42know, some a pizza to be delivered to your house today.
- 4:46You obviously go to the browser, you have a mouse, you click
- 4:49around. There's no API for all those
- 4:52actions yet, right? You go to URL and the agent
- 4:56needs to then figure out, OK, what, where does it click?
- 4:59For example, does it do that based on vision on the, the,
- 5:02the, the site map? And so that's not a, a regular
- 5:06API. Obviously there's a lot of AP is
- 5:08behind the website that you're interacting with, but there's no
- 5:13obvious place to kind of plug the agent into in a very
- 5:17structured way that the agent, for example, today interacts
- 5:20with all sorts of other tools that we're giving them access
- 5:23to. Yeah, and I want to call out to
- 5:27that. I've heard the pros and cons for
- 5:29both API and web browsing or computer use agents and we're
- 5:36going to be having a full debate on this particular topic to hear
- 5:42different thoughts and viewpoints from engineers on why
- 5:46to use one and why to use the other and why it's the future.
- 5:50So when I think about web agents, one of the clear value
- 5:54props is that you can build it once and it can go out and do
- 5:59what it needs to do and you don't rely on AP is which is a
- 6:02huge selling point because AP is are very finicky.
- 6:07And so I've said this before that you don't have to think
- 6:12about building a bunch of different API calls.
- 6:15And then the agent has to choose which tool it's going to use,
- 6:20which API it's going to go out and find in.
- 6:22And you don't have to worry about, oh, this API now changed
- 6:25it the way that it works. And so we have to update.
- 6:28And then it wrecks the agent. You just build the web agent, it
- 6:32goes out, it explores, it interacts with the web in the
- 6:35way that we think about interacting with the web.
- 6:39And so it is more human like. Now let's take the second part
- 6:43of this, which is how do you think about building websites,
- 6:49particularly in e-commerce that are agent friendly, web browser
- 6:55agent friendly, I mean. That's as agents are developing.
- 7:00It's even unclear what agent friendly means.
- 7:03But you know, to go back to your question, you know, why just not
- 7:06use an API like AP is today, as you will understand, listen to
- 7:09this podcast is you've got some kind of parameter and input, you
- 7:13send it somewhere else and you expect a standard response.
- 7:16It could be, you know, even in the Jenny I world, it could be
- 7:18like, hey, I've got a prompt. It goes to an API and that
- 7:22prompt is used to take text to image.
- 7:24Head to a text image model and returns an image in a certain
- 7:27format and you know what's expected in and you know what
- 7:31you can expect back. There's no API, for example for
- 7:36Amazon or. Even LinkedIn doesn't have an
- 7:40API. You can't say them all.
- 7:41Let's say Amazon, you know, a gift for my niece.
- 7:44There's not something you can say.
- 7:46That's the query. And then, you know, add
- 7:48something to my shopping bag basket back.
- 7:50There's actually a set of steps that we do as humans to get
- 7:52there. You obviously look at that.
- 7:54You, you search, use the query, you search, you look at certain
- 7:56items, you click around, you maybe you read and reviews.
- 7:59So a lot of things that go into the shopping experience.
- 8:03And the same is true, by the way, for the food ordering
- 8:06experience, which we do a lot of as we talked about, or finding
- 8:10secondhand goods in the classifieds space where you need
- 8:13to talk to sellers. And so all those steps are
- 8:16things that we now use the web and the browser for that we're
- 8:20exploring how well agents could do any of these steps in the
- 8:24value chain. And you can't do that with AP is
- 8:27that's a very clear, yeah, reason why you would want to do
- 8:30it with a web agent, yeah. Well, if it's already designed
- 8:32for us, I mean, that's how you know, billions of us interact
- 8:35with the web today is the browser.
- 8:38If you can do that reliably, then that means you can, you can
- 8:43very quickly start to give these agents a whole bunch of other
- 8:46capabilities because you can say, hey, go check online and
- 8:50book me a restaurant for two, right?
- 8:52And then tonight at 7:00 PM and it will be able to look at
- 8:55what's available and so on because you can just browse the
- 8:57web like you or I would do that. I will say since we've been
- 9:02talking about agents so much in the last couple days that this
- 9:04whole week I've had like agent Boot camp coming to the process
- 9:09offices and talking to everybody on the AI team about what
- 9:12they're working on, how they're dealing with agents.
- 9:14What are some of the challenges when I open my calendar to find
- 9:21the location of this place that we're recording this podcast at
- 9:26and then I have to copy and paste the location into Uber or
- 9:30into Google Maps. I'm sitting there and I'm like
- 9:33this is so backwards because agents will be taking over this
- 9:39or how does my phone? At least it doesn't need to be
- 9:42an agent. How does the intelligence of my
- 9:45phone not know that I have a calendar invite for this time?
- 9:50Maybe I should just already have an Uber that is being ordered so
- 9:54that I can get there on time. Yeah, I think you're already
- 9:58thinking a couple of steps ahead in terms of navigating or first
- 10:01across an operating system, multiple apps.
- 10:05You know, we're looking at frameworks that are made to do
- 10:07that. So they really that's sort of
- 10:09computer use across apps, you know, certain benchmarks like OS
- 10:13world. And so those are measured
- 10:14against these kinds of tasks that, you know, require opening
- 10:18a directory, loading some files, reading them and putting them
- 10:22into Excel and opening a pivot table, right.
- 10:24Those are sort. Of multi multiple steps.
- 10:27Yeah, multiple. Actions.
- 10:28Maybe you could copying the address like you mentioned and
- 10:30ordering an Uber through the their app.
- 10:33That's I think that's definitely coming.
- 10:38But even the step beforehand where you within one website,
- 10:44right, Let's say within an e-commerce website like oh,
- 10:47Alexis, website glove or ifood or emag or take a lot.
- 10:50All these websites we have along the group.
- 10:53If you want to go and buy something, even that is
- 10:55difficult because there are pop ups coming in.
- 10:59There are, you know, if you're trying to order some food, it'll
- 11:01say what, you know, what side dishes do you want, what
- 11:04toppings do you want? Obviously there will be, you
- 11:08know, a whole bunch of other filters.
- 11:10Sometimes we've designed things. Am I human or are, you know, are
- 11:14you a robot like captchas and so on.
- 11:16Those are all things that make it it's a hard to solve the
- 11:22entire task of or getting food or ordering, whatever.
- 11:25Hard for humans, even. Well.
- 11:28Hard for some of us, for sure, and even harder for agents at
- 11:31this moment. Yeah, it just reminds me of the
- 11:34whole conversation we had a few episodes ago about the cognitive
- 11:38load and how we want certain things that we do want to be the
- 11:45least amount of cognitive load possible so that we can use all
- 11:49that precious brain juice for something that actually is going
- 11:53to take us the whole cognitive load.
- 11:55But let's now skip into the part where we get to talk with Kiara,
- 12:00who has been working on web agents for the last six months.
- 12:04She spent a half year diving into it and getting real contact
- 12:09with what's been working, what hasn't been working, playing
- 12:12around with web frameworks and learn from her and get her
- 12:16insights. Great.
- 12:19Chiara, you're here. Thank you for joining us.
- 12:21And I would love to start out with a brief overview of the
- 12:27project that you've been working on so that people can know the
- 12:30web agent journey that you've taken.
- 12:35So the first project that I worked on when I joined the team
- 12:39was to build an agent that will help people order food.
- 12:43And it's, it sounds like a simple task, but it's really
- 12:48complex. So you need to understand the
- 12:50user, what, what would they like, what are the dietary
- 12:53restriction context? Also what time of the day it is,
- 12:57where are they located? Are there events in the area?
- 13:01And this agent should be able to order food.
- 13:05So go to food platforms, maybe several of them, advise the user
- 13:10on what's available where, the promotions, and ultimately being
- 13:15able to order food. And as Paul said before, not
- 13:20everything is available through an API.
- 13:22So we decided to delegate this task to a web agent.
- 13:28And web agents, I mean, there's a reason why they're popular
- 13:32right now. You've talked about it already,
- 13:36and they're really powerful. And we saw that there were a lot
- 13:41available at the moment, few, few of them were coming every
- 13:45month. So it was really a challenge to
- 13:47understand how to navigate this landscape of agents.
- 13:51So I immediately started to try out all these tools.
- 13:55So there are a lot like multi own is probably the most famous
- 14:02at the moment, but there are a lot of open source projects as
- 14:05well from companies and research groups.
- 14:08And these tools are all really nice, but we discovered pretty
- 14:14soon that they have a lot of limitations.
- 14:17So one thing that is really a big problem for agents is that
- 14:23websites are built for humans. So there is a lot of information
- 14:27that is not agent friendly at all.
- 14:30You have dynamic content and loads the the Dom of the page
- 14:34could be huge, could change. There are of course the standard
- 14:40things like captchas. It sounded like something that
- 14:45would be really easy for us, so we will just delegate execution
- 14:49of these tasks to an agent, but it was not at all.
- 14:52I mean, at this point, we already been building the data
- 14:54analysts and other things which are, you know, from our magic
- 14:58for it seemed like much more complex to get right.
- 15:00Because you have to get the database, you have to run
- 15:02queries, you have the code executor, you have to validate
- 15:04like, well, what we're going to do now is just we're going to
- 15:06send this agent to to a web and basically, you know, navigate to
- 15:10beautiful soup style, just go and cycle.
- 15:12Yeah, yeah. And actually it, you know, it
- 15:15took, it took forever. It didn't complete any of the
- 15:17tasks even multi on at that time.
- 15:19We looked at all the other frameworks so.
- 15:24Yeah, we saw one good example is Web Voyager is one of the first
- 15:28web agents. They also published a benchmark.
- 15:33It's public. Many agents benchmark against
- 15:35this and what this is that the success rate can change a lot
- 15:39from one website to the to the other and from 1 task to the
- 15:42other. For instance, website where you
- 15:44need to perform a lot of actions like booking.com or Google
- 15:49Flights, they're really hard to navigate for an agent,
- 15:52especially when an action can trigger something else that the
- 15:57agent doesn't expect. Like when you book a flight, you
- 15:59select an airport and the destination airport changes
- 16:03depend on depending on the starting airport, right?
- 16:08So this is all really complicated for an agent.
- 16:11So yeah, we've started trying out all these tools.
- 16:16We built a lot of internal knowledge about them and all the
- 16:19techniques that they use, and at the end we decided to build our
- 16:24own basically. Framework like your own.
- 16:27Build our own web agent. Yeah, and how does the logic
- 16:32work? Or what is the backbone of a web
- 16:35agent do? Because I know the API agents
- 16:40use tools and you have the potential to do function calling
- 16:45or whatever, but what is with web agents?
- 16:47What does it look like? So it boils down to something
- 16:51really similar, actually. An agent is something that has
- 16:55access to information and can decide what to do next, right?
- 16:59So the information in this case could be the screenshot of the
- 17:02page or the Dom HTML. Lots of things that you can get
- 17:06from a browser and what it can do are the actions that the
- 17:10human can also do, like clicking, entering text,
- 17:14scrolling and so on. Those are like the tools it has.
- 17:17Yeah, those are nothing but tools that the agent can call.
- 17:22So the way it goes that the usually, usually there is a
- 17:26planner that decides once it gets the task, decides how to
- 17:31perform it. It could be several steps for
- 17:34instance, to go involving several websites.
- 17:36And then there is an agent that chooses which tool to use, like
- 17:44if there is a cookie banner and it's to click accept for
- 17:46instance. It's something that could be
- 17:48unexpected. So that's why you need an agent.
- 17:51You need to be able to react to an open world.
- 17:55And by the way, this is a great example because there's, you
- 17:58know, we were benchmarking on, you know, and looking at others
- 18:00benchmarking on web Arena, which turns out it doesn't translate
- 18:03at all to the tests we were doing, right?
- 18:05It is one that the, the actual average results didn't, didn't
- 18:09compare, but also they were super unpredictable, right?
- 18:13So one time they worked, one time they didn't.
- 18:15So we'd have to devise simulations where we go to look
- 18:18at how many times out of 20 would this thing succeed on on a
- 18:22task that we care about, right? Wow.
- 18:24Yeah, and most of the times we saw agents getting stuck in
- 18:27loops and yeah, just not knowing what to do next.
- 18:34You ended up stopped because maybe the task was not clear or
- 18:37the task that the planner gave was not clear so.
- 18:40Or the action space is not clear because we also saw that, you
- 18:43know, you're looking at a website and for us it's very
- 18:45obvious, right? You look at a website and
- 18:47there's all these, you know by now, like patterns that we're
- 18:50all familiar with. Their search bar scrolling is
- 18:52one that was super hard for these agents to do.
- 18:55But you basically have, you've determined this is the, the
- 18:58website you, you know, you've got some reasoning through some
- 19:00LLM that tells you what you want to do next.
- 19:02But where on this website do you Click to do that?
- 19:05Just understanding what is the coordinate that corresponds to
- 19:10the action I wanna take, right? And that's not something these
- 19:15multimodal image models were good at.
- 19:17Like just taking an image, understanding what are the kinds
- 19:21of actions are there is fine, but then saying okay then you
- 19:23need to click on such and such coordinate to execute that
- 19:25action or Scroll down because it's probably lower on the page.
- 19:29Because I don't see it. Or you don't see it because
- 19:31there's a privacy or a cookie banner in the way.
- 19:33Yeah. Yeah, one of the first things we
- 19:36worked on was scrolling actually.
- 19:38So we looked at the open source frameworks that were around and
- 19:42we tried to use similar strategies, but we chose only
- 19:48specific strategies that applied to a use case.
- 19:51And I think this is really important because the way to
- 19:54make an agent succeed is to limit the amount of choices it
- 19:57has to do as much as possible. This all these tools were
- 20:02optimised for specific goal which is being able to surf the
- 20:06web. But our goal was different.
- 20:09So in our case, we couldn't use a tool like that.
- 20:14It wouldn't work for us. So we needed to build a web
- 20:17agent that could interact with platforms to order food and
- 20:21that's a different task. And since the the scope of this
- 20:25this task is smaller than we could optimize for that.
- 20:29So we built an agent that could get more informations about the
- 20:33page depending on on the platform that we were working
- 20:39with, We could prompt the agent to behave in a certain way, like
- 20:42first you search the search bar, maybe you need to enter your
- 20:46postal address and so on. There are certain things that
- 20:50always put together. And yeah, this is also another
- 20:55thing we did. We took certain tools and we
- 20:59merged them. Oh, nice.
- 21:00So if there are actions that you always do at the same time, why
- 21:05would you use two tools for that?
- 21:07For instance, when you search for something, you type in and
- 21:11then you press enter. Yeah, so these are two separate
- 21:15actions, but you can combine them into one tool because we
- 21:19needed that. You basically never type without
- 21:23pressing Enter. Yeah.
- 21:27Another thing was improving the scrolling.
- 21:29When you have long menus, lists of restaurants, you need to be
- 21:33able to fetch all the information.
- 21:35So we adopted the strategies to work with our use case and we
- 21:40got a good success rate for that.
- 21:42So I think the lesson here is that if you want to build a web
- 21:46agent for a specific task, keep in mind the task that you have
- 21:50to do and be smart about it. If if there are things that you
- 21:56don't need to, don't, don't add them to the agent.
- 22:00And so did you go and map out the trajectories and the user
- 22:04flow on these food ordering apps?
- 22:07And maybe it was like you would go to I food and say, hey, I
- 22:12want to order pizza. And then go through that flow
- 22:15yourself so that you could use it as a golden data set for the
- 22:19evals of the web agent. So one thing that we did was to
- 22:24do all this flows manually, like I think you cannot build
- 22:28something until you try to do it yourself and understand what are
- 22:31the pain points. So this was first thing that we
- 22:34did and then we tried to prompt the agent to interact with the
- 22:41web page in a certain way and this instruction were loaded
- 22:44dynamically based on the page it was on.
- 22:47This was one thing. So all this these methods don't
- 22:54really change the speed at which the agent works.
- 22:59But what what we did was also storing all the trajectories
- 23:03that the agent had done. We defined 3 modes that the
- 23:08agent could operate. So one was the traditional mode
- 23:12where it would grab a screenshot of the page, load the content
- 23:16and then decide what what action to take next.
- 23:20The other was faster mode that didn't involve a screenshot.
- 23:25And we would do that on pages that we knew.
- 23:27So if we would search for a certain food and the food would
- 23:32be different, but the task would be similar, we would not load
- 23:35the screenshot of the page because that was not needed.
- 23:38So the agent would know exactly where to click because it had
- 23:42seen that task before. And there there was a third
- 23:47mode, which we called reflex mode, in which we would automate
- 23:52the web actions directly, like sort of a macro, let's say.
- 23:57Some parts of this can be automated.
- 23:59So why would you have an agent do it right?
- 24:02So yeah, we combine all these things and the agent would try
- 24:06to do things in a fast way and then if it would not succeed,
- 24:09would do it in a slower way. So it was almost like the slow.
- 24:13It was the Plan B. In case it couldn't do it fast,
- 24:16it would do it slow and you would give it a little bit more
- 24:19reasoning or you would give it the screenshots and it was more
- 24:22thorough. I think that's an interesting if
- 24:26you try to understand like what what do we think these things go
- 24:29is? You know, we start with a set of
- 24:31tools and frameworks that aren't really made to interface with
- 24:34the web necessarily. But through those 3 modes that
- 24:37can I just explained, we were able to actually have it, you
- 24:42know, because of these trajectories that it knew were
- 24:45successful on specific sites for specific tasks access that, you
- 24:50know, that learned, let's say, learned action space for
- 24:56websites. It was then sort of quote UN
- 24:58quote familiar with. And I think that's something
- 25:00that if we think about our world like you would want to have,
- 25:04like when we go to websites, we know we're familiar, we can
- 25:06navigate, right? You evolve into booking.com, you
- 25:08go there, right? You know exactly what to do if
- 25:10you order your food many times and you can see and you, you
- 25:13don't need to kind of rediscover that page.
- 25:15And these agents essentially we're starting to see as we as
- 25:18we are able to create that persistent or you know, learned
- 25:23intuition about a website. They become experts, well first
- 25:26familiar than experts and can get you to the your desired
- 25:29output much much faster. And I know that I'm still trying
- 25:33to just separate like what's different and what's newer with
- 25:37the web agents And with that learned experience, something
- 25:41that it's seen, How are you saving it and how are you making
- 25:44sure that the agent has access to it?
- 25:46Are you thrown it in a database? Are you caching it?
- 25:48What does that look like? I think the storage itself
- 25:52doesn't matter that much as long as this is something that is
- 25:58privacy compliant and doesn't lead to leaking user
- 26:02information. But you're storing the path that
- 26:05it took or you're storing the action.
- 26:08What are you? Because you're not storing the
- 26:10screenshot and then loading that up again, right?
- 26:12No, we store all the path and the state that the page was on
- 26:17so the agent knows how the Dom looks like, what are the
- 26:20elements it can click on. OK, another thing I didn't
- 26:23mention before is that we did some work to understand how to
- 26:28clean this Dom because there is a lot of information there, but
- 26:31the agent doesn't need all of it.
- 26:33It should get as least information as possible, so we
- 26:38only took the elements that were clickable, for instance, and we
- 26:41combined this with a screenshot in fast mode.
- 26:45The agent could be a bit more blind, let's say, and knowing
- 26:49where to click because the task was really similar.
- 26:53Nice. Now the other thing that I think
- 26:56we wanted to talk about was this, the differences between
- 27:01planning and execution and the models that you use for each of
- 27:05these. Because we know that there's the
- 27:07reasoning that models that you probably are using for the
- 27:11planning. But then do you offload that
- 27:13onto a model that is smaller and just executes or is it
- 27:17fine-tuned? What does it look like?
- 27:20So for this specific task, we use foundation models.
- 27:25We did experiments with all the major foundation models and we
- 27:29saw of course some differences. For the planner, of course, it
- 27:33helps to have a model that is good at planning, like a one for
- 27:38instance. And for execution itself, you
- 27:42don't really need the model that is is good at planning, let's
- 27:47say, because as long as it knows what to do, this is a very
- 27:52limited action space, right? It's an important sort of
- 27:57pattern that's emerging, the separation of the planning and
- 27:59the execution as you start to interface with the world, right.
- 28:03We're talking about now, of course, web is, is one of those
- 28:06interfaces because planning itself requires a lot of
- 28:09reasoning of understanding the intent of the user.
- 28:12If you do the execution, that basically means I actually need
- 28:15to know the action space really well and to be able to translate
- 28:18that plan into the action space of my, you know, world, which
- 28:22could be at the broadest sense could be the web or could be a
- 28:25domain like I food or OLX, right?
- 28:27Or pay you or any of those you know, basically websites that we
- 28:31know and understand well that the second execution agent then
- 28:36needs to navigate to help to get to that outcome successfully.
- 28:40Is that where the simulations were coming in?
- 28:42And tell me more about what the simulations were and how those
- 28:46helped. In terms of the simulations, I
- 28:49think what it's also really nice with the web, which is different
- 28:53from other places we've been applying LMS. You you can just
- 28:57send these agents out to go and explore the websites like a web.
- 29:00Crawler. Right.
- 29:01Essentially, you can basically say go and find me a blue couch
- 29:06in Warsaw and OLX and it can then go and explore.
- 29:10And as long as we've defined what success looks like, like
- 29:14for example, found the couch or added it to cart or whatever it
- 29:19is, then we can do this 100 times.
- 29:22And it learns what the trajectories are that are most
- 29:24likely to get it to that state. And that's where it's sort of
- 29:28it's, it's, you know, it's simulate, it's more exploration
- 29:32to learn what these websites can and cannot do that allow you to
- 29:36get to a system that actually is really good at executing within
- 29:40your, your catalogue or your e-commerce environment.
- 29:43It's basically like you're mapping out the space, correct?
- 29:48And then once you have the map you can traverse it easier.
- 29:52Well, no, I I think we're seeing it in computer use similarly
- 29:55that people are starting to map out the applications, right.
- 29:58So if you were to know every button on Excel or on Word or,
- 30:02you know, the commonly used apps, and if I go to you and
- 30:06say, hey, you know, please make me a presentation in dark mode
- 30:10with certain such fun and background and you've done
- 30:13powerful many times, you know where to go.
- 30:14Yeah. You know, and I think that kind
- 30:16of mapped action space is something you can simulate
- 30:21essentially because you just go and have your Agents Explorer
- 30:24apps. Are you using hotkeys for as
- 30:27tools? You could.
- 30:28Yeah, yeah. Top, for instance, is a very
- 30:31useful hotkey. You can do most of the things,
- 30:35you can do most of the things on a web page through the top.
- 30:38And yeah, this is also. This is also one of the reasons
- 30:44why it's good to separate planner and execution, because
- 30:47execution only has limited tools and does only it needs to
- 30:52understand whether it has finished or not.
- 30:55So we would have a planner telling the the executor a very
- 31:01specific task. For instance, if I would search
- 31:06for AT shirt on OLX, first thing would be open the OLX page,
- 31:09search in the bar and so on and the planner would take all the
- 31:14sub tasks and execute them and stop when it was finished and
- 31:18give the response to the main agent that then would process it
- 31:21and decide what to do next. Oh.
- 31:24Nice. So yeah, it's you can map the
- 31:27space and give a better information to the execution
- 31:32agent. So, but from both sides
- 31:34basically both from the planner and execution side.
- 31:38So I think there's a lot of room for improvement once we will get
- 31:43more data all. Right.
- 31:45So now let's talk about some of the frameworks that you used.
- 31:48You did mention Web Voyager, you also mentioned multi on.
- 31:51I imagine there were things that you really liked from some of
- 31:54these and is there anything that just stands out at you from one
- 32:00of these web frameworks that was particularly, maybe it's a novel
- 32:05way of doing things or a good way that you feel like was
- 32:09something that you brought back into the own your own framework
- 32:12that you created. So something I really liked was
- 32:18Web Voyager. It was the simplest.
- 32:22All the other frameworks, many of them they built on top of
- 32:26that, but it was really clear the separation between planner,
- 32:30executor, executor didn't have many tools available, just basic
- 32:37web interaction through an SDK. Like in that case it was using
- 32:42Selenium, which is a testing tool.
- 32:46We, we decided to choose another one.
- 32:48But the the strength there, it's it's simplicity.
- 32:54So yeah, I think that's really powerful.
- 32:57And I also liked the visual approach because the the Dom
- 33:04does does not always bring you in the right direction because
- 33:09you could have misleading information there.
- 33:12But what the user sees is what what is important at the end of
- 33:17the day. So yeah, that that approach I
- 33:20think is really is really useful.
- 33:23Other frameworks built on top of that and they added more
- 33:26complexity in terms of planner. For instance, we saw agent E
- 33:30that added the more hierarchical type of planning, which
- 33:34increases the success rate it does, but it also makes the task
- 33:37more difficult and slower to execute.
- 33:41We saw other approaches like Monte Carlo 3 search for
- 33:44planning. This is open source project from
- 33:49multi on as well. At the end, we decided to choose
- 33:52the simplest, simplest possibility because our task was
- 33:58clear, we knew what we had to do and we ended up using this agent
- 34:02sort of an API. We we created a code that was
- 34:05very modular so we could delegate things to a web agent
- 34:09that we wouldn't know what it was doing.
- 34:12It was kind of a black box within our application and would
- 34:16give us the response and with that we could take action and
- 34:20interact with the user because at the end that's what's
- 34:22important. Basically, we're six months in
- 34:26the future of your journey. Knowing what you know now, what
- 34:30would you tell yourself if you could six months ago about this
- 34:34whole journey? A lot of things, so let's start
- 34:41with. I think the most important one
- 34:43is to really understand what is the problem you're trying to
- 34:47solve. Dive in, try to do the things
- 34:50yourself because web agents are automating tasks, so try to do
- 34:53it yourself. Try to see what are the pain
- 34:55points. I would explore all
- 34:59possibilities that are around, but reminding myself that these
- 35:05tools are not necessarily what I need.
- 35:07The other thing that helps is to approach this as a software
- 35:12engineering problem rather than data science.
- 35:14And I say that because I come from data science background, so
- 35:17this was really, really big for me.
- 35:21What does that mean? What's?
- 35:22The difference, Yeah, I'll come to that.
- 35:24So this is not the data science project, but software
- 35:29engineering project where there are some, some LLM steps in.
- 35:36And this means that you can adopt all the good practices of
- 35:39software engineering like keeping things modular,
- 35:41separating responsibilities, and keeping things as simple as
- 35:47possible, like trying to have more control.
- 35:51I think you discussed this about the SQL agent.
- 35:54This is even even more important there.
- 35:57But yeah, it's it's important to understand where you need the
- 36:04agent and where you don't and try to limit the amount of LLM
- 36:07calls as much as possible. Why I say this?
- 36:11Because when you approach this agent projects, it's really
- 36:15tempting to use all this high level frameworks with high level
- 36:18of of abstraction, do everything through an agent.
- 36:22But this is not the right way to do that.
- 36:24I mean, it's nice to do proof of concept play around, but if you
- 36:29need to build something that works, you need to have control.
- 36:34So you it really helps to think of different modules.
- 36:39So I have a planner that needs to think very well, but the
- 36:42execution part doesn't need to be done necessarily by an agent.
- 36:50Like if there are things that can go through a deterministic
- 36:55approach, it's much better. An example, in this tool, we had
- 37:00to pull user information because we had to understand user
- 37:04background, whether they had data restriction, for instance,
- 37:08things like that. We didn't always need it, but
- 37:11most of the times we needed it. And I very naively built an
- 37:15agent that could interact with the database, retrieve the
- 37:18information, but actually we didn't need to do that.
- 37:21Why? Why would you use an agent if
- 37:23you can just pull the data and add it to the context, like to
- 37:27the prompt? So that was a big revelation for
- 37:31me because it made things much more simple and give us control.
- 37:38So make use of the frameworks where you need them, but keep in
- 37:43mind that you can go low level and have more control over the
- 37:47parts that are important and test things.
- 37:51Try try to find edge cases, try to find what doesn't work and
- 37:56have fun. That's also.
- 37:58That's what you would have told yourself, but you didn't have
- 38:00fun. Yeah, I had a lot of fun, yeah.
- 38:05The the idea of where to use an agent and when to use it is
- 38:12really a fascinating point because like you're saying, you
- 38:17can build an agent to do this thing, but if you can do it
- 38:19without an agent, it's going to be more predictable.
- 38:22I've heard the other side of the argument be I can prototype an
- 38:27agent or I can create an agent so fast it's almost faster if I
- 38:31do it through an agent versus if I do it through traditional
- 38:34software development. Have you seen or do you have
- 38:38thoughts on that? I mean, I think in general for
- 38:40prototyping, that's definitely true.
- 38:42You can prototype a lot of stuff very quickly, but at the end of
- 38:45the day, you know, we our, our main job is to take something
- 38:48that we can see work and scale it.
- 38:53Yeah. And so our next step is always
- 38:55because of the the size of our platforms is to scale it to 10s,
- 38:58hundreds of millions of users and their deterministic
- 39:02workflows are much more preferred if you can or at least
- 39:06narrow. Down so many reasons, right?
- 39:08So I think we tend to, yes, prototype, you know, in any way
- 39:12we can quickly. But then after that to Kiata's
- 39:14point, we can start. We need to distill the the
- 39:17actual essence of, you know, the system to one that can be put
- 39:22into production and scale. And often that may so include
- 39:25function calling and agentic components, but it's not as sort
- 39:29of free reign or as as you know, maybe we do and when we just
- 39:35start exploring it. Yeah, yeah, yeah.
- 39:37Did you create any benchmarks or or particular evals for this
- 39:42project? Yeah, we had, we chose some
- 39:46tasks that were representative of typical e-commerce
- 39:51interactions and we tried to optimize for those and then we
- 39:56added variations of those and yeah, try and different
- 40:00possibilities and until we were happy with it.
- 40:04Did you have a certain accuracy score that you needed to get
- 40:07above? So our target was 80%, yeah.
- 40:11OK. But it of course it heavily
- 40:13depends on the task and on the website and on the user itself.
- 40:17Because it really it depends what the user wants and like how
- 40:24specific the request is as well. So of course, there is a whole
- 40:29planning step where the agent talks with the user and tries to
- 40:33understand whether it has all the information.
- 40:36And then the other part, the execution is to have all, all
- 40:41the right information to be able to perform the task.
- 40:44So this was very important. For instance, you cannot order
- 40:48food if you don't have an address.
- 40:51Like the user has to be willing to to provide the address.
- 40:55Yeah. So yeah, this was was a
- 40:59challenge and to be back to go back to the deterministic
- 41:03approach. There is some deterministic
- 41:06component in here as well, because if I need to perform a
- 41:10certain task, I need to inform the the web agent, I need to
- 41:14give give it the right information to be able to do
- 41:16that. And that's deterministic.
- 41:19Like the planner needs to know that it needs to provide an
- 41:22address list of dishes and so on.
- 41:26And yeah, that's, that's really important and it increases
- 41:30accuracy a lot. We we tried both ways and that's
- 41:34definitely better. I think one way to kind of see
- 41:39what, what we concluded from doing all this work is that, you
- 41:42know, on the one hand, I think if we just take an agent and
- 41:44want to go to, you know, one of our existing websites or
- 41:49platforms, we can get pretty far.
- 41:52But I think there's a sweet spot where we can also, because
- 41:54there's a lot of things we don't display on websites that may be
- 41:57useful to help a user, you know, going through an ecommerce
- 42:00journey. To give you an example, like
- 42:02when we're in OLX, you actually, you know, as OLX, we know it's,
- 42:06it's a classified space, you know, buyers and sellers of
- 42:08secondhand goods. We know what the reputations
- 42:11are, certain sellers, we know, you know, location of people, we
- 42:15know what kind of things they've searched in the past.
- 42:17We know what the supply and demand are.
- 42:19We know what reasonable prices are for categories.
- 42:21Those are not things that necessarily an agent has access
- 42:24to if they just act, you know, just go to the website of the
- 42:27marketplace. But if we're building the agent,
- 42:30you know, as the marketplace and we've got access to all that
- 42:33rich marketplace dynamics and information and customer
- 42:36reviews, there's certainly relevant at the moment of going
- 42:40through a transaction. That's where I think we can, you
- 42:43know, create really useful agents.
- 42:45And that's certainly a conclusion we we drew away from
- 42:48because of course here the experimenting we're doing is
- 42:50just purely from the outside in. But if we combine that and and
- 42:53sort of build a agent that has, you know, is integrated with the
- 42:57with the platform and is available to the user at the
- 43:00moment they want to, you know, find or exchange things, that's
- 43:04going to create a completely new AI first.
- 43:08Yeah. You know e-commerce experience
- 43:09and you know, we'll hopefully be able to talk about some of that
- 43:12in well it goes. Back to building your website
- 43:15for humans or for agents, because you can also expose that
- 43:19data for other agents to use, or you can choose to not expose
- 43:25that. And I know that's a, a debate
- 43:27topic that we're going to have too, because it's like, well, if
- 43:30this is useful for me, then it might be useful for other
- 43:33agents. And if we expose it in a way
- 43:37that a human's not going to see it, but if an agent is using the
- 43:41website for some reason, they will be able to see it.
- 43:44I don't know how that would look, because if it's not
- 43:47exposed in the GUI and you're using a web agent, the web agent
- 43:51has access to the GUI, right? Or it also has access to the
- 43:53Dom, so maybe you put it there and then that exposes it.
- 43:57We saw some website that started to add the markdown, for
- 44:01instance with the description of the page.
- 44:03That's already really helpful. So I see some progress in this
- 44:08direction. This helps especially with
- 44:11e-commerce because you might have a lot of items in a page,
- 44:14so it's just much faster if the agent can load them.
- 44:18The lessons we learned is that we had to be very specific with
- 44:22the, with the instructions, break them down as much as
- 44:25possible. So limit the amount of of.
- 44:30Sorry, limit the limit the amount of thinking that the
- 44:34executor has to do. Delegate that to the planning
- 44:36agent. So have the instructions as
- 44:40detailed as possible. Break them down steps.
- 44:43Try to make use of all the tools you have available, but select
- 44:50them in a smart way. Like if you if you only need to
- 44:54do a certain interaction in the page, just make only those tools
- 44:57available for the agent doesn't need to have all the space.
- 45:02I've learned so much in the six months.
- 45:04I don't know what like if I look back six months ago, I'm, I'm,
- 45:08I'm a totally different person now, so.
- 45:11Well, we're always looking for more, more smart people.
- 45:15So interns, others, if you want to come check out what we're
- 45:19doing, reach out to us. Nice, yeah.
- 45:22Really smart people, except for some of them that sit at this
- 45:25table. That's awesome.
- 45:30You too, to me too. That's how we work together.
- 45:32Exactly. Yeah, there we go.
- 45:40The Process AI team is hiring, and you can find all the links
- 45:44to everything you need to know in the show notes below.