AI Engineer World's Fair 2026
The Missing Layer in Agentic AI — Giedrius Šteimantas, Oxylabs
Read the talk
The Missing Layer in Agentic AI
Giedrius Šteimantas walks through a shopping agent’s redesign: search for candidates, validate product content before spending model tokens, ask the user to approve, and reserve browser automation for checkout.
From a talk by Giedrius Šteimantas
At a glance
Ideas worth remembering
Choose web-access tools by task: search for candidate URLs, extract validated product content, and use a browser for interactive checkout after user approval.
HTTP
200and response size cannot establish that a page contains useful product information. Explicit retrieval errors keep known blocked responses out of model input.Validate before compression: shrinking invalid content does not make it useful, and asking the model to reject it still spends tokens.
An extraction API can hide browser orchestration while retaining conditional browser rendering for dynamic pages.
Align geolocation across product verification and checkout so regional stock, sizes, and options are evaluated in the same context.
A personal shopper meets the open web
The shopping chatbot could discuss a customer’s style and turn their preferences into prompts. A second agent was supposed to take those prompts, find suitable items online, and purchase them. Getting from a plausible recommendation to an actual product page proved harder: requests often returned CAPTCHAs, and browser automation throughout the workflow made the product slow, expensive, and unreliable.
Giedrius Šteimantas of Oxylabs introduces this friend’s project as an example of the infrastructure layer agents need to work on the open web. Oxylabs had spent ten years helping companies obtain data, including companies training large language models. The same web-access infrastructure could now support agents.
The redesign starts with three scraping principles:
- Use a browser selectively. Pay for browser execution when the task requires it.
- Validate content. HTTP
200means the request received a successful response; it does not establish that the response contains the requested product page. - Send lighter content. JavaScript, CSS, and HTML can contribute many bytes without helping the model choose a product.
The operating constraint behind these choices is simple: “cost matters.”
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Discovery: search for candidates without opening every store
The workflow separates four jobs. Discovery finds product URLs. Decision checks whether the products have the right price, stock, description, and details. The user accepts or rejects the proposed purchase. Execution makes the purchase. Keeping these jobs separate allows each web-access step to use a tool suited to what it actually needs to accomplish.
Originally, discovery opened the search pages of a predefined list of major retailers in an automated browser. Sites challenged or blocked that browser, interrupting the flow. Retries added time and expense without guaranteeing access, making the final cost per transaction difficult to predict. The fixed retailer list also constrained the agent’s choices to stores its developer had selected.
Heavy JavaScript made those searches costly even when they succeeded. Location introduced another failure: an item could appear available early in the workflow and become unavailable at checkout. Retailers can show different stock, sizes, and options depending on the user’s location, and the original discovery stage lacked geolocation controls. A usable listing therefore needed more than a product match; its availability had to apply to the customer’s region.
The replacement, Fast Search API, gives the agent search results as compact JSON. The agent formulates fan-out queries—several searches for the shopping task—and selects relevant URLs from the results. Search engines supply the indexed candidates, removing the need to navigate each retailer’s search interface or restrict discovery to a hardcoded list.
Šteimantas reports responses below 2,000 tokens and average response times below 700 milliseconds, alongside high success rates and predictable low pricing. These are reported service characteristics rather than a controlled comparison of the two shopping agents. Small responses also reduce the need for a complicated model at this stage: the immediate job is to select promising links, with detailed product verification still to come.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Decision: validate the page before the model reads it
Selected URLs now need inspection. The decision stage reads the product pages to confirm price, stock, description, and other details before choosing an item. The original agent ran many browsers in parallel to accelerate this work. Parallelism helped with speed, but it could not make blocked pages useful. Failed access left the agent with few options and excluded many popular retailers.
Observability let the friend notice these failures. Other implementations can miss them by checking only response size and HTTP status before sending the HTML to an LLM. A substantial CAPTCHA page can pass both checks. The model may recognize it as invalid product content, but the application has already spent tokens to find that out.
Consider the talk’s concrete example: ten attempted pages return three valid product pages and seven invalid responses, yet all ten go to the model. Šteimantas estimates that this wastes 70% of the tokens. Seven out of ten establishes the fraction of invalid responses; the token fraction also depends on their lengths. The practical failure is the same: blocked content consumes model input while supplying no products to compare.
Compression initially looked like the fix. Smaller HTML would cost fewer tokens. But compressing a CAPTCHA still leaves a CAPTCHA, so validation has to come first. Once a blocked response becomes an explicit retrieval error, the application can exclude it before inference. Better retrieval can expand the usable choice set; filtering keeps unsuccessful retrievals from becoming model work.
Where does the wasted model work disappear? The diagram follows the ten-response example through the original path, then shows the redesigned routing. Previously, valid and blocked pages traveled together into the model. The new service sends useful content onward and reports blocks separately. Validation changes which data reaches inference, rather than merely shortening every response.
Three valid product pages and seven invalid responses.
The original ten-response example sends seven invalid pages to the model. The redesign separates retrieval errors from product content without assuming that the new service has the same success count.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Move retrieval complexity behind an extraction service
The rebuilt decision stage uses Oxylabs Web Scraper API through a lightweight REST interface. Explicit errors establish which responses should stay out of the LLM call. The service then addresses several other costs independently:
- Concurrent requests: Hundreds of requests can run in parallel without the shopping application orchestrating a browser for each one.
- Markdown output: Product content can reach the model in a lighter form than raw HTML.
- Dynamic rendering: When a site requires it, the service runs a full browser internally to render the content.
- Geolocation: Requests can retrieve localized product information, including the regional context relevant to availability.
- Successful-result billing: Under the described pricing model, failed scraper requests incur no scraper charge.
A browser may still perform some retrieval work. The important change is that the application calls an extraction service, and that service handles rendering when needed. This preserves access to dynamic pages while removing browser management from the agent’s ordinary product-reading step. Failure also becomes a visible outcome with a clear billing rule: “No cure, no pay.”
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Checkout: keep the browser and align its location
With product information available, the agent presents its choice to the user. Only an affirmative answer starts the purchase stage. Here the browser earns its cost: checkout requires processing inputs and interacting with highly dynamic content. Extracted Markdown can help choose an item, but it cannot select a size or add the item to a cart.
Both implementations retain Playwright MCP, a browser, and an LLM for execution. The remaining obstacle is familiar: the original automated browser gets challenged repeatedly and cannot complete the flow. Šteimantas replaces it with Oxylabs Headless Browser, described as a drop-in replacement because it supports Playwright MCP.
The replacement supplies three access capabilities:
- Browser-level stealth: Changes at the browser source-code level address detection of automation.
- Residential proxy: A residential proxy comes attached to the browser.
- Consistent geolocation: Checkout uses the same location context as product verification, addressing the earlier mismatch between displayed availability and what can be purchased.
Return to the item that appeared available and then vanished at checkout. The redesigned flow checks localized product content, presents the choice for approval, and opens the interactive purchase flow using the same location. Playwright can then select the size specified in the prompt, add the item to the cart, and proceed through purchase. Šteimantas describes this as the intended working flow; the account does not establish an observed completed transaction or guarantee that inventory cannot change between verification and checkout.
The ending brings the implementation choices back to their purpose. Search handles discovery, extraction handles product reading, and a browser handles the interaction that remains. Infrastructure absorbs the web-access work so builders can focus on the shopping experience. The rules apply throughout: use browsers when necessary, validate content before feeding it to an LLM, and keep cost in view.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Related talks
- How Web Data Infrastructure Powers the Next Generation of AI
A related talk on the web-data infrastructure that forms this recording’s central subject.
- The Agentic Commerce Stack — Ahnaf Prio, Best Buy
A related commerce-focused talk for readers interested in the shopping-agent setting.
Read the complete timestamped transcript
- 0:01
[music]
- 0:13
What a beautiful voice.
- 0:16
All right, thank you for coming. Um,
- 0:18
today I'm going to talk a lot about
- 0:20
about missing layer of Aentic AI and
- 0:22
explain a little bit about how web
- 0:24
scraping infrastructure can actually
- 0:26
help you. But first, let me talk uh a
- 0:30
little bit about my friend's idea. So,
- 0:32
my friend had this idea. Uh he built
- 0:35
this AI chatbot that, you know, chatted
- 0:38
with people about their style and it was
- 0:40
supposed to help them pick out new items
- 0:44
uh as you know, some sort of a personal
- 0:47
shopper. And once those items were
- 0:49
picked out, you know, this uh this this
- 0:51
this chatbot would uh produce prompts
- 0:55
that a shopping agent would then take
- 0:57
and attempt to find them online and
- 1:00
purchase them for uh you know for for
- 1:02
for the customers. Um this idea I know
- 1:05
is not new and uh it could be applicable
- 1:07
to many scenarios but my friend was kind
- 1:09
of you know uh he was u he was good at
- 1:12
building agents uh but u he ran into
- 1:15
different problems and asked me for
- 1:17
advice and when he ran it
- 1:20
he he would usually you know instead of
- 1:23
you know product pages or whatever he
- 1:25
would get things like that it's uh you
- 1:28
know he would get captured
- 1:30
you know and uh you know of course you
- 1:33
So he was uh he was doing it very very
- 1:35
quickly. So he wipe coded the whole
- 1:36
thing while having a you know a thought
- 1:39
about you know infrastructure and
- 1:40
underlying layers and how it should
- 1:42
work. I didn't at all. Uh he was using a
- 1:46
browser automation framework for
- 1:48
everything and it was slow,
- 1:52
expensive and unreliable.
- 1:55
So at the end he made a product that uh
- 1:58
uh that does not work and is expensive
- 2:01
to run.
- 2:03
So he asked me for help and you know I
- 2:05
was a little bit reluctant at first
- 2:07
because uh you know I don't like giving
- 2:09
out professional advice you know for
- 2:11
free but uh I took a look at it and uh
- 2:15
you know I got a little curious I have
- 2:17
to be honest. I noticed that he was
- 2:20
missing something.
- 2:22
Um he was missing a layer an
- 2:25
infrastructural layer that would allow
- 2:27
this agent to operate freely on the open
- 2:30
web.
- 2:32
My name is Gedrus. I I work for Oxyabs
- 2:35
uh where in the past 10 years we've
- 2:37
helped you know companies that trained
- 2:40
large language models uh get their data
- 2:44
and now we use this infrastructure to
- 2:47
help AI agents to access uh web on scale
- 2:53
and at low cost.
- 2:56
And uh before we go into this agent and
- 2:59
see how we can build it, I wanted to
- 3:01
talk a little bit about the scraping
- 3:02
industry and how we operate. And uh the
- 3:06
principles that we operate on can be
- 3:08
summed up by one uh sentence. You know,
- 3:12
cost matters.
- 3:15
And the first principle is use a browser
- 3:18
when you absolutely have to
- 3:21
validate content. HTTP response 200 does
- 3:25
not mean that we are good to go.
- 3:28
Lighter content is preferred. Websites
- 3:31
are full of JavaScript, CSS,
- 3:34
HTML, and there's a lot of bites that do
- 3:36
not deliver any value whatsoever.
- 3:40
And today I will demonstrate how these
- 3:42
principles are also applicable when
- 3:45
building agents that interact with the
- 3:47
web.
- 3:49
So coming back to my friend's agent,
- 3:51
right? Let's uh let's take a look and
- 3:53
see how uh we could do a better job and
- 3:56
uh making this agent run more reliably.
- 3:58
So here's how my friends set it all up,
- 4:01
you know? So four different stages.
- 4:03
Discovery, the agent was supposed to
- 4:06
find products pages on websites where
- 4:09
these items can be bought. Then a
- 4:11
decision stage, right? and uh where an
- 4:14
agent can decide uh what products to buy
- 4:16
based on you know uh the the content of
- 4:20
these pages. So the agent has to visit
- 4:22
them verify that the the stock is there
- 4:25
the price is right the the description
- 4:28
fits uh you know the prompt and once
- 4:31
that decision is made user is given with
- 4:33
a choice you know whether to go ahead
- 4:36
with the purchase or you know reject it
- 4:39
altogether. The problem was that
- 4:42
sometimes and of course we go to
- 4:44
execution right away then execution just
- 4:47
making the purchase but the problem was
- 4:49
that sometimes it worked and sometimes
- 4:51
it did not that was a little
- 4:53
problematic.
- 4:55
So let's dissect it step by step and see
- 4:58
how we could build this differently
- 5:00
while improving performance and reducing
- 5:02
the cost dramatically by using the same
- 5:05
principles from the scraping industry.
- 5:09
So the first stage discovery. So my
- 5:13
friend uh you know he chose to go with a
- 5:16
predefined list of websites major
- 5:18
retailers uh and query their search
- 5:21
pages in order to find these products.
- 5:23
He used the browser automation tool for
- 5:26
that. It kind of worked but you know it
- 5:28
did have challenges. So their browser
- 5:31
automation tool lacked what we call
- 5:33
stealth. So they could so they would get
- 5:35
captures and sometimes fail access to
- 5:37
access the sites. all together. This
- 5:39
would break down the flow. So a retry
- 5:42
mechanism would have to be put in place
- 5:44
making the whole process very long. Uh
- 5:46
you know costly um and sometimes the
- 5:50
size would not be uh accessed at all and
- 5:54
also you know as a result also became
- 5:57
very difficult to predict the final cost
- 5:59
per transaction.
- 6:01
The list of websites that my friend was
- 6:03
checking was also deterministic. So
- 6:05
selection of items would only be limited
- 6:08
to the few choices he put in.
- 6:12
Websites themselves were heavy on
- 6:13
JavaScript, making the whole process
- 6:15
very slow and costly.
- 6:18
And finally, even if it worked, items
- 6:22
ended up being unavailable at checkout
- 6:25
because in the discovery phase, the he
- 6:28
was not able to use energy location
- 6:30
capabilities and a lot of e-commerce
- 6:32
websites are uh you know uh they take
- 6:36
your users location into account when
- 6:38
displaying stock options sizes and
- 6:40
soever.
- 6:45
So now we solve these problems at Oxabs
- 6:47
every day. So when scraping you always
- 6:50
want the results to appear on the first
- 6:52
try and to not to use browser unless
- 6:55
absolutely necessary. However, for this
- 6:58
specific discovery phase, you also want
- 7:01
to use to allow your agent to search the
- 7:03
web. Doing so with a browser is very
- 7:06
cumbersome. That is why I chose to use a
- 7:09
product that we built especially for
- 7:11
agents fast search API.
- 7:14
It returns a compact JSON which is less
- 7:17
than 2,000 tokens per response. Has fast
- 7:20
response times less than 700
- 7:22
milliseconds on average. And it's uh has
- 7:25
a a high success rate at a predictable
- 7:28
low price. And most importantly, it
- 7:31
gives your agent access to the mo to you
- 7:33
know to many popular search engines that
- 7:37
all of these websites have been instant
- 7:40
indexed already a long time ago.
- 7:42
So in the discovery phase instead of
- 7:44
predefined list and the browser we give
- 7:47
agent a tool to search the web fast
- 7:48
search API agent formulates fan out
- 7:52
queries and selects the relevant URLs
- 7:53
from search results. Since the responses
- 7:56
are quite small and there's no need for
- 7:58
complicated models we can have the agent
- 8:00
run quite quickly in this stage.
- 8:05
Um, yeah. So, so now the agent has
- 8:09
searched the web and selected some
- 8:11
relevant URLs. It is time for those for
- 8:14
for the agent to visit those pages to
- 8:16
see what they're all about in order to
- 8:19
confirm price, stock level, description,
- 8:22
and product details and so on.
- 8:25
With this, we can go to in the decision
- 8:27
phase. This is where agent selects the
- 8:30
items we will purchase. For this, my
- 8:32
friend also used the browser. He ran
- 8:35
many browsers on parallel so it could uh
- 8:37
you know so the whole process could
- 8:39
happen faster and that is not a bad
- 8:41
thing. He managed to get some results
- 8:44
however many of the results would end up
- 8:47
like this
- 8:51
and the result
- 8:53
the agent would be left with very few
- 8:55
choices with the majority of popular
- 8:57
retailers being left out. It's a good
- 9:01
thing he did well with observability. So
- 9:03
he actually noticed when it happened.
- 9:05
But what we see when working with these
- 9:08
types of customers is that they often
- 9:11
fail to detect the failure. They end up
- 9:14
checking only the content size and HTTP
- 9:16
response code and then feeding this
- 9:18
large HTML to an LLM. Now an a large
- 9:22
language model of course can distinguish
- 9:24
between valid esop content and a
- 9:26
capture. But we need to spend tokens in
- 9:29
order to do that.
- 9:30
And when we attempt to open 10 websites,
- 9:33
but only three return valid content
- 9:38
but feed all of the 10 to the to the
- 9:40
model, it is a problem.
- 9:44
It means that we waste 70% of the tokens
- 9:47
and that is a little crazy in my in my
- 9:50
opinion.
- 9:53
So I noticed this problem as well. Uh my
- 9:56
initial hunch was compression was to
- 9:59
compress the output. But then I thought
- 10:01
wait the problem is not the compression.
- 10:04
The problem is that the content is not
- 10:06
valid. We need to make sure that the
- 10:09
content is valid before even attempting
- 10:11
any compression. This will lead to more
- 10:13
options for the agent to choose from and
- 10:16
fewer wasted tokens. And then I remember
- 10:20
rule number one of scraping. Use the
- 10:22
browser when you absolutely need it.
- 10:26
Otherwise look for other solutions.
- 10:29
So I I tried to rebuild the stage
- 10:31
without a browser and I uh only by using
- 10:34
ox web scraper API and this gave me many
- 10:38
benefits. Uh but firstly only valid
- 10:41
content was returned. In case of
- 10:43
captures or other blocks the request
- 10:46
would fail with an explicit error
- 10:47
message. So I know not to include it
- 10:49
when sending to a large language model.
- 10:51
But the success rates are quite high and
- 10:54
even for protected websites. So that
- 10:56
wasn't that much of you know much of a
- 10:58
problem.
- 11:00
So no browser was needed and uh
- 11:02
everything is a lightweight rest API. I
- 11:05
can run hundreds of requests in parallel
- 11:07
and receive content at the same time.
- 11:11
Also the API supports markdown. So no
- 11:14
need to submit raw HTML uh to LLMs. If a
- 11:18
website is dynamic, it runs a full
- 11:20
browser under the hood to render the
- 11:22
content correctly.
- 11:25
And finally, it supports geoloccation
- 11:27
options. So I can localize my results
- 11:30
and get relevant content.
- 11:33
The best part,
- 11:36
customers only pay for successful
- 11:37
results. So actually, yeah, that's uh
- 11:43
that's what's uh that's what that's what
- 11:44
the best thing about it. No cure or no
- 11:46
pay. If if the scraper fails, there's no
- 11:49
cost and it fails loudly.
- 11:54
So now we have all of the information to
- 11:57
make a decision. We present a decision
- 12:00
to the user and the user makes the final
- 12:02
call. Once it's affirmative, we move to
- 12:05
the last stage of the workflow, the
- 12:07
purchase.
- 12:09
So I remember what I said a couple of
- 12:11
times about browsers. This time, but
- 12:14
this time is different. you this time
- 12:16
you absolutely need to use a browser. We
- 12:20
need to process inputs and the content
- 12:22
is highly dynamic.
- 12:24
Now this time my implementation, my
- 12:26
friend's implementation does not differ
- 12:29
much. We both use playright MCP with a
- 12:31
browser and a large language model.
- 12:37
The main problem my friend faced however
- 12:40
just like in in the previous stages
- 12:42
while using browser was access. Just
- 12:46
like in the beginning as he was using
- 12:48
the browser he was getting captured into
- 12:50
oblivion making it impossible to
- 12:52
automate the flow.
- 12:55
Well the fix was quite easy. I just
- 12:58
connected Oxab's headless browser since
- 13:00
it supports playright MCP is just a drop
- 13:03
in replacement. With this replacement, I
- 13:06
hardened this agent with years of
- 13:08
scraping experience and got proper
- 13:11
stealth done at the browser source code
- 13:13
level, a residential proxy attached to
- 13:16
it out of the box, and most importantly
- 13:20
in this in this case, a geoloccation
- 13:22
capability. So my results are localized
- 13:25
the same way as in the verification
- 13:29
stage.
- 13:31
So if we run it,
- 13:33
we actually have a a a a browser that
- 13:38
that access the content and can actually
- 13:41
automate the flow by, you know,
- 13:42
selecting the right size from the
- 13:44
prompt, add it to cart and complete the
- 13:47
purchase.
- 13:49
And boom,
- 13:51
we have an agent that commands a
- 13:54
powerful infrastructure hardened by
- 13:57
years of web scraping experience.
- 14:00
Not only does it open the up the web,
- 14:03
but also saves the time on
- 14:05
implementation and token cost.
- 14:08
And if I can leave you with a few
- 14:10
lessons we learned today was that you
- 14:15
know when building agents use the same
- 14:18
principles from the scraping industry.
- 14:20
Use the browser when you absolutely need
- 14:23
to.
- 14:24
You have to validate content before
- 14:27
feeding it to the large language models
- 14:30
and most importantly fill the missing
- 14:33
layer with the proper infrastructure so
- 14:36
you can focus on building stuff. But
- 14:39
remember cost matters.
- 14:42
Thank you very much.
- 14:44
[applause]