Serverless & Agentic AI: Better Together • Prashanth HN • GOTO 2025

Prashanth HN explores the powerful synergy between event-driven Agentic AI and Serverless architecture. Learn how AWS services like Lambda, Step Functions, and Bedrock provide the essential building blocks for creating sophisticated, scalable, and cost-effective AI agents, with practical examples of Agentic RAG, swarms, and orchestration patterns.

4 min read
Serverless & Agentic AI: Better Together • Prashanth HN • GOTO 2025
source: https://www.youtube.com/watch?v=FmmKRkUverw

The world of AI, at its core, is fundamentally event-driven. Every user query to a chatbot is an event, which can trigger multiple sub-events and complex processing. This event-driven nature makes Serverless architecture a natural and powerful foundation for building the next generation of Agentic AI applications.

Understanding the Modern AI Agent

An agent is a system that uses a Large Language Model (LLM) for its reasoning or “thinking” capabilities. It is connected to a set of tools which, in turn, have access to underlying data. This setup is not a static workflow; the LLM dynamically decides which tool to use for a given query to complete its execution.

Key characteristics of an agentic system include:

  • The Agentic Loop: An agent produces an answer, which is then passed through an evaluation step. If the answer is deemed insufficient, it’s looped back with feedback to the agent for refinement until a satisfactory result is achieved.
  • Multi-Agent Systems: Drawing parallels with microservices architecture, you can have an orchestrator agent managing multiple sub-agents. Each sub-agent can be specialized, using different LLMs, tools, and data sets. This approach allows for:
    • Cost and Performance Optimization: Use large, capable models for complex tasks and smaller, faster models for simpler ones.
    • Scoped Permissions: Limit the tools and data available to each agent, enhancing security and control (e.g., a Salesforce agent doesn’t need access to engineering data).

The Serverless Toolkit for Agentic AI

AWS provides a comprehensive set of serverless components that map directly to the needs of an agentic system.

Event Management

Since agents are event-driven, managing the flow of events is crucial.

  • API Gateway: Acts as the “front door” for incoming requests, such as user queries from a front-end application.
  • Amazon EventBridge: Enables complex, event-driven communication between agents, allowing any agent to publish or subscribe to events.
  • SQS and SNS: Used for decoupling components. SQS queues can buffer requests between services, while SNS can fan out events to multiple subscribers.

LLM Inference

  • AWS Bedrock: A fully serverless offering to access a variety of foundation models. You pay only for the tokens you use. It now supports open-weight models, increasing its flexibility.
  • AWS SageMaker: For hosting custom models, including those from sources like Hugging Face.

Agent and Tool Hosting

  • AWS Lambda: The ideal choice for hosting agents and tools. Lambda functions can easily access LLMs and other resources to perform their tasks.
  • ECS on Fargate: A serverless container option suitable for longer-running agentic tasks.
  • LangChain SDK: An essential toolkit with pre-built patterns that can significantly accelerate agent development.

Data, Vector Stores, and Memory

  • Amazon S3: A foundational data store that now supports native vector search, a huge advantage for RAG systems.
  • Vector Stores: Amazon Aurora PostgreSQL, OpenSearch, and the new serverless option for DocumentDB provide robust capabilities for storing and querying vectorized data.
  • DynamoDB: While not a vector database, it serves as an excellent, high-performance backend for storing conversational memory and tracking chat history.

Architectural Patterns in Action

1. Agentic RAG (Retrieval-Augmented Generation)

A common pattern can be implemented in a fully serverless manner:

  1. A request comes through API Gateway to an agent hosted in a Lambda function.
  2. The agent uses Bedrock for LLM reasoning.
  3. It accesses tools via an MCP (Meta-Controller Protocol) server, which can also be run on Lambda.
  4. The tools interact with various data stores (e.g., DocumentDB, Aurora, or third-party APIs).
  5. Another Lambda function can be used to evaluate the generated answer and trigger the agentic loop for refinement.

2. Agent Swarms

For more complex, collaborative tasks, you can create a “swarm” of agents:

  • EventBridge acts as the central bus.
  • Multiple agents, running on Lambda or ECS, are hooked up to EventBridge.
  • Agents can publish events and subscribe to events from other agents, allowing them to work together to solve a problem. Each agent in the swarm can be its own complex subsystem.

3. Orchestration with AWS Step Functions

While agents are inherently non-deterministic, their workflows often need to be guided. AWS Step Functions are perfect for blending this non-determinism with deterministic control.

  • Serial Workflow: You can enforce a sequence of operations, such as Research -> Write -> Review. The agent has autonomy within each step (e.g., how it does the research), but it cannot proceed to the next step until the previous one is complete. This guides the AI without stifling its capabilities.
  • Parallel Workflow: For requests that can be broken down, Step Functions can execute tasks in parallel. For example, a user asking for a travel itinerary to Seattle can trigger a parallel execution of three tasks: one agent finds flights, another finds hotels, and a third finds local attractions. Each of these parallel branches can be a complete subsystem with its own agents, LLMs, and data integrations. This provides a structured, deterministic workflow while still leveraging the non-deterministic power of AI in each block.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

The Future of Serverless • Nick Coult • GOTO 2025

The Future of Serverless • Nick Coult • GOTO 2025

Nick Coult from AWS explains that the future of serverless is not a replacement but an essential foundation for the rise of AI agents. This talk explores the core benefits of serverless, its synergy with event-driven architectures, and how agentic AI and agentic workflows will rely on serverless principles to scale and operate effectively.

Agentic Al in SW Development: Evolving Patterns & Protocols • Bhuvaneswari  Subramani • GOTO 2025

Agentic Al in SW Development: Evolving Patterns & Protocols • Bhuvaneswari Subramani • GOTO 2025

Bhuvaneswari Subramani details the "Agentic Shift" in AI by presenting an evolutionary journey through seven foundational system design patterns. The talk progresses from simple conversational clients to sophisticated, multi-agent systems, covering key patterns like Retrieval-Augmented Generation (RAG), Self-Correcting RAG, and the Model Context Protocol (MCP), explaining how each pattern adds new layers of context, action, and autonomy.