In short
Sowjanya Pandruju, a Cloud Application Architect at AWS, argues that AI agent systems which look stable as prototypes break in production because agents are probabilistic systems running inside distributed architectures. Her answer is a serverless reference architecture: stateless agents with externalized memory, the Model Context Protocol (MCP) as a governance layer for tools, event-driven orchestration, isolation for every tenant and observability built for AI. Her central claim is that enterprise AI success is becoming as much an infrastructure problem as a model problem.
Key takeaways
- Stateless architecture enables scale: learn how stateless agent design principles eliminate traditional bottlenecks and enable horizontal scaling for enterprise-grade performance.
- MCP provides secure agent communication: understand how the Model Context Protocol creates standardized, secure communication patterns for autonomous agent collaboration.
- Serverless orchestration reduces operational overhead: discover proven serverless deployment patterns that achieve elastic scaling while eliminating infrastructure management complexity.
- Multi-tenant architecture maximizes resource efficiency: gain practical insights into implementing secure resource isolation and tenant-specific customization for diverse organizational needs.
Why prototypes give a false sense of success
Pandruju opens with what she calls the illusion of prototype success. A prototype usually runs one agent, one workflow, a tool or two and one user at a time, so demos impress and debugging is easy, but nothing has been stress tested. Production brings thousands of concurrent users, specialized agents, external APIs, retrieval systems and partial failures.
The deeper issue is that agents are probabilistic, not deterministic. An agent may recursively delegate subtasks based on its own generated reasoning, so two identical requests can produce completely different execution graphs. Retries compound the problem: a failed external API call triggers more agent calls, more retrieval operations and spikes in token usage. "So that's why scaling AI systems is fundamentally different from scaling traditional APIs." (1:54) Or, as she puts it: "And we are not simply scaling requests either. We are scaling the autonomous decision-making systems." (2:44)
A layered architecture built on stateless agents
Her reference model starts with API Gateway and WAF as the secure ingress layer, with JWT claims propagated so tenant identity persists across orchestration, retrieval, tool execution and observability. Orchestration then splits in two: Step Functions for deterministic workflows such as approval flows, and EventBridge as an asynchronous event mesh.
Each Lambda execution is a short-lived agent runtime acting as planner, researcher, validator, code generator or policy checker, holding no long-lived memory. "Statefulness is one of the biggest hidden scaling bottlenecks in AI systems." (5:43) Stateful designs eventually need sticky sessions, cache synchronization, long-running containers and complicated failover logic. In the stateless model, an execution retrieves its context, reasons, persists updated memory, publishes the next event and terminates, so it can run anywhere and scale horizontally.
The trade-off is that complexity moves into memory, where teams must separate short-term execution memory, durable workflow state, semantic memory and vector retrieval. "And this is why the production AI infrastructure, it increasingly starts to resemble distributed operating systems more than simple applications." (7:32)
MCP as the governance layer for tools
Without MCP, Pandruju says, organizations end up with hundreds of inconsistent tool integrations: drifting schemas, inconsistent authorization and unpredictable permissions, until governance collapses. With autonomous agents working across tools such as Slack, ticketing systems, cloud infrastructure and internal APIs, the blast radius becomes enormous. MCP routes requests through capability validation, permission enforcement and schema validation, bringing interoperability, auditing and isolation across the platform. "So one way I would like to think about MCP is like a service mesh for autonomous AI systems." (8:36)
She pairs this with a firm rule: "So another critical principle, I believe, is that agents should never have unrestricted tool access. Instead, tools should be exposed as explicit capabilities." (9:12) This guards against prompt injection abuse, recursive tool misuse, unauthorized operations and accidental privilege escalation.
Events over direct calls, and isolation for every tenant
Synchronous chains, such as a planner calling a researcher calling a validator calling a tool agent, create cascading failures. "If one dependency slows down the entire workflow stalls there. At scale, this becomes catastrophic." (10:23) When agents publish events to EventBridge and others subscribe asynchronously, components scale and fail independently: EventBridge fans out hundreds of subtasks, Lambda scales horizontally and queues absorb sudden pressure. Asynchronous flows also make it easy to insert compliance checks, moderation reviews, validation gates and escalation steps.
Tenant isolation, which she calls one of the least glamorous but most critical production concerns, must span memory, compute, retrieval, encryption and observability: isolated vector indexes, partitioned namespaces, scoped encryption keys, reserved concurrency pools and tenant identity carried through every step. "So even observability, as I mentioned, must remain isolated because the logs themselves can become leakage vectors." (12:50) Concurrency limits and throttling policies keep noisy neighbors in check.
Observability for probabilistic workflows, and what comes next
"Because CPU and memory metrics alone tell you almost nothing about autonomous AI workflows." (13:24) Pandruju calls for new signals: token consumption, retrieval quality, hallucination trends, workflow graphs, tool latency and retry propagation, plus end-to-end distributed tracing, since a retrieval issue may cause a hallucination several hops later. Self-healing mechanisms such as automatic retries, dead-letter queues, fallback models and automatic escalation grow in importance.
Looking ahead, she expects AI systems to orchestrate other AI systems, rerouting failures, reducing costs and selecting models dynamically, as already seen when smaller models handle simpler tasks and larger reasoning models handle complex planning. The winners, she argues, will not be the organizations with the biggest models or flashiest demos, but those with resilient infrastructure, strong governance and disciplined engineering. "And the future, it belongs to organizations that can operationalize intelligence reliably." (17:25)
Watch the talk
Code to Combat: Deploying Self-Governing AI Agent Swarms at Scale, by Sowjanya Pandruju (18 minutes): https://www.womentech.net/video/code-combat-deploying-self-governing-ai-agent-swarms-scale
About the speaker
Sowjanya Pandruju is a Cloud Application Architect at Amazon Web Services (AWS) with over 13 years of software development experience, specializing in cloud-native development, AI/ML integration, serverless computing and event-driven architecture. She has led large-scale cloud migrations from on-premises systems to AWS, delivering significant cost reductions and operational efficiencies for multiple organizations.
Questions this talk answers
- Why do AI agent prototypes break when they reach production?
- Why should AI agents be stateless?
- What role does the Model Context Protocol (MCP) play in an agent swarm?
- How should a multi-tenant AI platform keep tenants apart?
- What should observability track for autonomous AI workflows?
Drafted with AI from the talk transcript. Editor review pending.