LangGraph
MongoDB Atlas
Voyage AI

AI Agent Boilerplatewith Memory

Production-ready agent framework with 5-component memory system, built on MongoDB Atlas and LangGraph

5
Memory Components
5min
Setup Time
1024
Vector Dimensions
Production Ready

Memory Architecture

5-component memory system based on cognitive science research, implemented with production-grade infrastructure

Episodic Memory

Conversation history, user interactions, temporal sequences

Implementation:
ConversationMemoryUnit
Storage:
MongoDB conversations collection

Semantic Memory

Domain knowledge, facts, concepts, relationships

Implementation:
KnowledgeBase + Vector Search
Storage:
MongoDB Atlas Vector Search

Procedural Memory

Learned workflows, step-by-step processes, patterns

Implementation:
Workflow execution patterns
Storage:
Process definitions & execution logs

Working Memory

Active context, current session state, temporary data

Implementation:
LangGraph state management
Storage:
In-memory + MongoDB checkpoints

Semantic Cache

Query results, computed responses, performance optimization

Implementation:
Vector similarity caching
Storage:
Redis-compatible caching layer

Implementation

Real code that actually works. No marketing fluff.

agent_example.py
PRODUCTION
from src.core.agent_builder import AgentBuilderfrom langchain.agents import toolimport os# Define custom tools@tooldef analyze_sentiment(text: str) -> str:"""Analyze sentiment with memory context"""return f"Sentiment: {text} -> Positive"# Create agent with 5-component memoryagent = AgentBuilder.create_agent(agent_name="production_assistant",system_prompt="You are an AI with persistent memory.",user_tools=[analyze_sentiment],mongodb_uri=os.getenv("MONGODB_URI"),embedding_model="voyage-3-large")# Agent remembers across sessionsresponse = await agent.aexecute("Analyze: This framework is amazing!",thread_id="user_session_123")# Memory persists - ask follow-upresponse = await agent.aexecute("What was the sentiment of my last message?",thread_id="user_session_123")print(response)  # Agent remembers the context

Production Stack

Built with battle-tested technologies, not experimental frameworks

LangGraph

Stateful, multi-actor applications with LLMs

  • State management
  • Checkpointing
  • Multi-agent workflows

MongoDB Atlas

Vector search & document storage

  • Vector search
  • Atlas Search
  • Flexible schema

Voyage AI

State-of-the-art embeddings

  • voyage-3-large
  • 1024 dimensions
  • High accuracy

FastAPI

High-performance API framework

  • Async/await
  • Auto docs
  • Type hints

Docker

Containerization & deployment

  • Multi-stage builds
  • Production ready
  • K8s compatible

Observability

Monitoring & performance tracking

  • Galileo AI
  • Metrics
  • Tracing

Ready to Build?

Clone the repository and have a production-ready agent with memory running in 5 minutes.

MIT License • Production Ready • 5-Minute Setup