Serverless FaaS for agentic workflows cuts latency 13×, tokens 88%, and cost 66%

January 21, 20269 min

Overview

Decision SnapshotNeeds Validation

The design is practical and validated on AWS with concrete savings; evidence is empirical but limited to two apps, specific MCP tools, and GPT-4o-mini, so expect implementation and workload-specific variance.

Citations0

Evidence Strength0.78

Confidence0.85

Risk Signals11

Trust Signals

Findings with numeric evidence: 5/5

Findings with evidence refs: 5/5

Results with explicit delta: 5/5

Reproducibility

Status: Partial assets available

Open source: Unknown

At A Glance

Cost impact: 80%

Production readiness: 70%

Novelty: 50%

Authors

Varad Kulkarni, Vaibhav Jha, Nikhil Reddy, Anand Eswaran, Praveen Jayachandran, Yogesh Simmhan

Links

Abstract / PDF / Data

Why It Matters For Business

You can host multi-step, tool-using LLM agents on serverless platforms to cut latency, token bills, and operational overhead—if you add durable memory, S3 caching, and carefully deploy MCP tools.

Who Should Care

Summary TLDR

FAME is a serverless architecture that runs multi-agent LLM workflows (ReAct pattern) as AWS Lambda functions orchestrated with Step Functions. It stores agent state in DynamoDB, wraps MCP tool servers as Lambda functions, caches deterministic tool outputs in S3, and supports function fusion. On two apps (paper summarization, log analytics) FAME achieves up to 13× lower latency, up to 88% fewer input tokens, and up to 66% lower monetary cost versus stateless baselines, while improving completion rates. Results come with caveats: tested on AWS, GPT-4o-mini, and a limited workload set.

Problem Statement

Hosting multi-step, tool-using agentic workflows on VMs is costly and hard to scale. FaaS gives autoscaling and billing per request but is stateless, which breaks multi-turn agent memory and increases redundant LLM calls and tool invocations. MCP tool servers also need special deployment and can cause cold-start and billing overheads when naively hosted.

Main Contribution

FAME: a FaaS architecture that decomposes ReAct agents into Planner, Actor, Evaluator Lambda functions orchestrated with AWS Step Functions.

Automated, durable agent memory injection using DynamoDB plus an automated wrapper to deploy FastMCP servers as Lambda functions.

Key Findings

Combined agent memory plus MCP caching reduced end-to-end latency by up to 13×

Numbersup to 13× speedup (§5.2.1 Fig.4; M+C vs baselines)

Practical UseUse session-wide agent memory + MCP caching to cut user latency for multi-step LLM agent workflows.

Evidence Ref§5.2.1 Fig.4

Input tokens to the LLM dropped by as much as 88%

Numbersinput tokens reduced ≈88%5.2.2 Fig.5, P1 example 35,6464,536)

Practical UsePersist tool outputs to S3 and inject agent memory to avoid re-sending large documents to the LLM and lower token costs.

Evidence Ref§5.2.2 Fig.5

Results

MetricValueBaselineDeltaSplit / DatasetEvidenceEvidence Ref
End-to-end latencyup to 13× reductionEmpty/naive memory configs≤13× speedup (M+C vs E/N)Research Summarization and Log Analytics (§5.2.1 Fig.4)M+C config achieved up to 13× faster E2E completion vs baselines§5.2.1 Fig.4
LLM input tokensup to 88% reductionEmpty/naive memory configs≈88% fewer input tokens (e.g., 35,6464,536)Research Summarization P1 (§5.2.2 Fig.5)Agent memory and MCP caching avoided re-ingesting full documents§5.2.2 Fig.5

What To Try In 7 Days

Break a ReAct agent into Planner/Actor/Evaluator as separate functions and orchestrate with Step Functions.

Persist session agent state in DynamoDB and inject it into Planner prompts for multi-turn continuity.

Wrap deterministic MCP tools to return S3 handles and enable TTL-based caching to reduce token and latency costs.

Agent Features

Memory
Client-side cumulative messages (naive)Durable agent memory in DynamoDB (session keyed)Configurable TTLs and pre-processing (summarize) suggested
Planning
LLM-generated multi-step plans (Planner role)Iterative re-planning via Evaluator feedback
Tool Use
MCP servers accessed via HTTP Lambda URLsFastMCP interface for tool definitions
Frameworks
LangGraphAWS Lambda / Step FunctionsAnthropic MCP / FastMCP
Is Agentic

Yes

Architectures
ReAct decomposed into Planner-Actor-EvaluatorLangGraph-based agent graphs
Collaboration
Orchestration via AWS Step Functions message passingShared state passed between agent functions

Optimization Features

Token Efficiency
Agent memory + MCP cache led to up to 88% input token reductionS3 file handling prevents passing large documents to LLM
Infra Optimization
Singleton vs consolidated MCP deployments examinedTuning Lambda memory sizes per MCP to trade cost vs cold-starts
System Optimization
Automated Lambda wrapper generation for MCP serversSeparate configuration per agent role to avoid timeouts and overprovisioning
Inference Optimization
S3-backed MCP invocation cache to avoid rerunsReturn S3 URLs instead of inlining large filesFunction fusion (consolidate MCPs) to reduce cold startsPrompt tweaks to encourage memory reuse

Reproducibility

Code AvailableNo
Data AvailableYes
Open Source StatusUnknown
LicenseUnknown

Data URLs

ArXiv papers used (references in §4.1)LogHub-style log files (Apache, Hadoop, OpenSSH) §4.1.2

Risks & Boundaries

Limitations

Experiments limited to two reference apps and a small set of MCP tools.

Evaluation done on AWS Lambda/Step Functions and GPT-4o-mini—results may differ on other clouds or LLMs.

When Not To Use

Workloads with long-running tools that exceed FaaS timeouts without async patterns.

Very high-throughput, GPU-bound inference where specialized inference infra is required.

Failure Modes

LLM ignores injected memory and reissues redundant tool calls.

Misconfigured cache TTL returns stale or incorrect tool outputs.

Core Entities

Models

GPT-4o-mini

Metrics

End-to-End latencyInput tokensLLM cost (¢)FaaS execution costMCP latencyTool call countCompletion / DNF rates

Datasets

ArXiv papers (P1-P3 examples)LogHub-style logs (Apache, Hadoop, OpenSSH sample files)