Building an Agent Memory Layer with NVIDIA NeMo Agent Toolkit and S3 Vectors

Use Amazon S3 Vectors as a low-cost, scalable persistent vector memory backend for NVIDIA NeMo Agent Toolkit on EKS.
LLM agents struggle with long-cycle complex tasks due to the lack of cross-session memory. This article introduces a cloud-native agent memory solution using NVIDIA NeMo Agent Toolkit (NAT) for orchestration, Amazon S3 Vectors as the persistent vector storage backend, and Amazon EKS as the elastic runtime. NAT's pluggable memory subsystem abstracts vectorized writes and semantic retrieval into a unified interface, letting developers connect S3 Vectors via a custom memory provider at lower cost than dedicated vector databases. A multi-agent investment research scenario illustrates how persistent memory enables agents to share historical findings and maintain analytical continuity across days-long analysis cycles, with EKS providing on-demand horizontal scaling and production-grade operations.
Why Agents Need Persistent Memory
LLM-based agents perform impressively within a single conversation, but once the session ends, context typically vanishes with it. For complex applications that need to maintain state across sessions and tasks — such as long-running investment research, customer service, or scientific assistants — the lack of persistent memory means starting from scratch every time. The core value of a memory layer is enabling agents to remember past interactions, retrieve relevant historical information, and incorporate it into new reasoning.
NVIDIA NeMo Agent Toolkit (NAT) is a development framework designed precisely around this need. It includes a built-in memory subsystem that allows developers to plug different storage backends into the agent's memory pipeline. Amazon S3 Vectors, meanwhile, provides a low-cost, scalable vector storage solution. Together, the two can serve as a reliable long-term memory foundation for multi-agent systems.

How NAT's Memory Subsystem Works
NAT's memory subsystem is built around a pluggable architecture. It abstracts memory "writes" and "reads" into a unified interface, so the specific storage implementation underneath doesn't affect the agent logic above. This decoupling lets developers freely choose a backend based on their needs — a local vector library for rapid prototyping, or a managed cloud service for production workloads.
In practice, key information generated by agents is vectorized and stored in the memory layer. When a subsequent task requires relevant context, the system retrieves the most relevant memory fragments via semantic similarity search and injects them into the model's reasoning context. This vector retrieval-based memory mechanism is essentially applying the RAG (Retrieval-Augmented Generation) paradigm to agent state management.
RAG (Retrieval-Augmented Generation) was originally designed to address the knowledge cutoff problem in large language models: retrieving relevant document fragments from an external knowledge base at inference time and appending them to the prompt, allowing the model to answer questions beyond its training data. The key difference when applying this to agent state management is that what gets retrieved shifts from static documents to the agent's own historical actions and intermediate conclusions — content that grows dynamically after each session. The vectorization process is typically handled by an embedding model, which maps text fragments to high-dimensional dense vectors where semantically similar content sits closer together in vector space, enabling approximate nearest neighbor (ANN) retrieval. Overall pipeline latency and precision depend heavily on the choice of embedding model and the vector index construction strategy.
Implementing S3 Vectors as a Custom Memory Provider
The core demonstration in the article is implementing Amazon S3 Vectors as a "custom memory provider" for NAT. Developers simply need to follow the memory interface specification defined by NAT, mapping vector storage, querying, and update operations to the S3 Vectors API — enabling the entire toolkit to seamlessly use S3 as its persistent backend.
There are several practical reasons to choose S3 Vectors as the backend. First is cost — compared to dedicated vector databases, object storage-based solutions are generally more economical at scale. Second is scalability, as S3's storage capacity is virtually unlimited. Third is native integration with the AWS ecosystem, making it easier to manage permissions, monitoring, and operations in one place. For teams already building on AWS, this approach significantly lowers the barrier to introducing a new component.
Amazon S3 Vectors is a native vector storage feature launched by AWS in 2025, providing vector indexing and approximate nearest neighbor query capabilities directly on top of S3 — no separate vector database infrastructure required. Traditional vector databases (such as Pinecone, Weaviate, and Milvus) typically require independent deployment, separate billing, and self-managed high availability. S3 Vectors folds vector storage into the pricing and operational model of object storage, billing by storage volume and query count. The cost advantage is especially pronounced for write-heavy workloads or scenarios with unpredictable data growth. The trade-off is that query latency and high-concurrency throughput may lag behind engines purpose-built for vector retrieval, so SLA requirements should be carefully weighed during the selection process.
A Real-World Scenario: Multi-Agent Investment Research
The article uses a multi-agent investment research use case to tie the entire solution together. In this type of scenario, multiple specialized agents collaborate — for example, one agent scrapes earnings data, another analyzes market sentiment, and a third consolidates findings into a research report. The discoveries each agent accumulates during its work can be written to a shared memory layer.
Persistent memory is particularly valuable here: investment research is often a long-cycle task spanning days or even weeks, requiring agents to remember previously analyzed companies, conclusions reached, and data sources used. With a memory layer backed by S3 Vectors, the system can quickly retrieve historical judgments in a new round of analysis, eliminating redundant work and maintaining analytical continuity.
Production Considerations When Deploying on Amazon EKS
The entire solution is deployed on Amazon Elastic Kubernetes Service (EKS). Choosing Kubernetes as the runtime environment means the multi-agent system can scale horizontally on demand — dynamically adding agent instances when concurrent tasks increase, and scaling back down when load drops. EKS's managed nature also reduces the burden of cluster operations.
This "NAT + S3 Vectors + EKS" combination essentially outlines a complete path for deploying agent applications in a cloud-native environment: NAT handles agent orchestration and memory abstraction, S3 Vectors provides persistent vector storage, and EKS supports elastic compute. Each component solves a distinct layer of the problem, and together they form a scalable, operable production-grade architecture.
Amazon EKS (Elastic Kubernetes Service) is AWS's managed Kubernetes service, where users don't need to manage the control plane themselves. In multi-agent deployment scenarios, Kubernetes's key value lies in its declarative workload management: developers describe the desired state using resources like Deployments and HorizontalPodAutoscalers, and the cluster automatically handles scheduling, failure recovery, and elastic scaling. For agent systems, this means different agent roles (e.g., data scraping, sentiment analysis, report generation) can each be encapsulated as independent microservices, coordinated through unified service discovery and messaging mechanisms, while scaling independently based on their respective loads — improving resource utilization and preventing single-point failures from cascading across the entire system.
Summary
For agents to move from "capable of conversation" to "capable of long-term collaboration," a memory layer is an unavoidable requirement. This solution demonstrates how to connect mature cloud storage services to an agent framework through standardized interfaces, achieving production-grade persistence while keeping costs under control. For teams building complex multi-agent systems, this modular, pluggable design philosophy is well worth adopting. It's worth noting that this article is based on a single technical blog source; specific implementation details and performance characteristics should be further validated against official documentation and real-world testing.
Related articles

Chain of Thought Isn't Just for AI: How Humans Can Use CoT to Improve Thinking Quality
Chain of Thought isn't just a prompt trick for large models. Starting from a Hacker News discussion, this article analyzes why CoT works for human thinking too, breaks down actionable ways to transfer it, and highlights the key differences between human CoT and machine CoT.
Cloudflare Teams Up with OpenAI: Closi…
Cloudflare Teams Up with OpenAI: Closing the Loop from Vulnerability Discovery to Defense with AI
Cloudflare uses OpenAI Daybreak to investigate security vulnerabilities and generate reviewable remediation plans, while developers use Codex to boost coding efficiency and quality.

Orca Multi-Agent Orchestration in Practice: A Guide to Parallel Collaboration with Claude and Codex
Orca is Stable AI's free open-source agent workbench supporting 34 agents like Claude Code and Codex in parallel. Learn its Git worktree isolation, multi-model orchestration, and mobile management.