AI Agents on Serverless
Автор: Unknown Programmer
Загружено: 2026-06-14
Просмотров: 16
Описание:
In this video, we explore why modern AI agents challenge many of the assumptions that made serverless computing successful.
We'll break down four core serverless principles and see how agents push against each one:
• Memory and persistent context
• Long-running execution
• Cold starts and heavyweight dependencies
• The hidden orchestration costs of coordinating agent workflows
This isn't a criticism of serverless. Serverless remains one of the best approaches for APIs, automation, event-driven systems, and many other workloads.
But AI agents are different.
As agent architectures become more common, cloud platforms may need to evolve beyond traditional stateless execution models.
#AIAgents #Serverless #AWSLambda #GenerativeAI #LLM #CloudComputing #AWS #ArtificialIntelligence #SoftwareArchitecture #agenticai
-- Transcript --
Turns out, serverless — the thing that was supposed to make infrastructure disappear — is fundamentally broken for AI agents.
And it breaks for four reasons. And last one will make you think twice before using AI agents with serverless
The first one is memory.
Lambda forgets everything.
The problem isn't that AI agents need memory. Every application needs memory.
The problem is that agents continuously accumulate state while they work.
something you may call context enrichment, [Very classy You know]
A checkout API can process a request and forget everything.
but AI agent need Every tool call, observation, plan, and
decision becomes part of the context needed for the next step.
And that's where the conflict begins.
Serverless assumes state should disappear.
Agents assume state should persist.
The second assumption behind serverless is that work should be short-lived.
Your agent searched through documents.
Built a plan.
Called five different tools.
Collected evidence.
Almost reached a conclusion.
All that in-memory context disappears, and the workflow has to be reconstructed from external state.
Serverless platforms were designed for fast request/response transactions, usually completing in milliseconds or seconds.
That's why platforms enforce hard execution limits. For instance, AWS Lambda has a maximum execution time of 15 minutes.
But agents don't always work like that.
An agent can take minutes or even hours to complete.
If a Lambda function spends most of its time waiting, you're effectively paying for idle compute.
And if the workflow exceeds the platform's timeout limit, the function is terminated.
The third assumption behind serverless is that functions start quickly.
That assumption worked well for traditional applications because most functions were lightweight. A few dependencies, a small amount of memory, process the request, return a response.
AI agents are the exact opposite.
If you've worked with RAG systems, you've probably must have used rerankers to find the most relevant documents before sending them to the LLM.
Those rerankers are not lightweight. They often load large machine learning models into memory.
Agents also depend on tool registries, embedding models, document processors, database clients, browser automation frameworks, and a growing collection of supporting libraries.
The result is that before the agent can even start thinking, a significant amount of infrastructure has to wake up and load.
In a serverless environment, it can be paid over and over again.
Every cold start means loading dependencies, initializing models, creating connections, and rebuilding execution context before useful work can begin.
And when an agent workflow is split across multiple function invocations, those delays start to compound.
What should have been a sub-second operation can easily turn into several seconds of waiting, not because the model is thinking, but because the infrastructure is still getting ready.
If traffic is unpredictable or arrives in bursts, serverless can be incredibly cost effective.
But AI agents introduce a new problem.
Because Lambda functions can't naturally pause and resume, architects often rely on orchestration systems such as AWS Step Functions to coordinate the workflow.
And that's where the hidden cost appears.
But an agent might perform dozens or even hundreds of actions to complete a single task.
Suddenly you're no longer paying primarily for compute.
Some engineers call this the "integration tax" — the cost of stitching together stateless functions to behave like a stateful system.
Serverless was designed to simplify infrastructure.
But AI agents need memory, long-running execution, persistent context, and complex coordination.
In other words, agents violate many of the assumptions that made serverless successful in the first place.
Now, does this mean serverless is dead?
Serverless remains an excellent choice for APIs, event processing, automation, and countless other workloads.
But AI agents are forcing cloud platforms to rethink what serverless should look like in the future.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: