redis / agent-memory-server
Fast and flexible memory for agents and AI applications using Redis
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing redis/agent-memory-server in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewRedis Agent Memory Server A memory layer for AI agents. **Documentation** • **GitHub** • **Docker** Features • **Dual Interface**: REST API and Model Context Protocol (MCP) server • **Two-Tier Memory**: Working memory (session-scoped) and long-term memory (persistent) • **Configurable Memory Strategies**: Customize how memories are extracted (discrete, summary, preferences, custom) • **Semantic Search**: Vector-based similarity search with metadata filtering • **Flexible Backends**: Pluggable memory vector database factory system • **Multi-Provider LLM Support**: OpenAI, Anthropic, AWS Bedrock, Ollama, Azure, Gemini via LiteLLM • **AI Integration**: Automatic topic extraction, entity recognition, and conversation summarization • **Python SDK**: Easy integration with AI applications Quick Start • Installation Using Docker Pre-built Docker images are available from: • **Docker Hub**: redislabs/agent-memory-server • **GitHub Packages**: ghcr.io/redis/agent-memory-server **Quick Start (Development Mode)**: By default, the image runs the API with the **Docket** task backend, which expects a separate process for non-blocking background tasks. The example above shows how to override this to use the asyncio backend for a single-container development setup. If you are connecting to a Redis Cluster and want Docket-backed workers, set to a or URL. AMS will translate that URL for its other Redis clients internally. **Production Deployment**: For production, run separate containers for the API and background workers: From Source • Python SDK Allowing the server to extract memories from working memory is easiest. However, you can also manually create memories: > **Note**: While you can call client functions directly as shown above, using **MCP or SDK-provided tool calls** is recommended for AI agents as it provides better integration, automatic context management, and follows AI-native patterns. For the best performance, you can add messages to working memory and allow the server to extract memories in the background. See **Memory Integration Patterns** for guidance on when to use each approach. LangChain Integration For LangChain users, the SDK provides automatic conversion of memory client tools to LangChain-compatible tools, eliminating the need for manual wrapping with decorators. • MCP Integration MCP config via uvx (recommended) Use this in your MCP tool configuration (e.g., Claude Desktop mcp.json): Notes: • API keys: Set either (default models use OpenAI) or switch to Anthropic by setting and to an Anthropic model (e.g., ). • Make sure your MCP host can find (on its PATH or by using an absolute command path). • macOS: • If not on PATH, set to the absolute path (e.g., on Apple Silicon, on Intel macOS). On Linux, is common. See https://docs.astral.sh/uv/getting-started/ • For production, remove and configure proper authentication. LLM Provider Configuration The server uses LiteLLM to support 100+ LLM providers. Configure via environment variables: See **LLM Providers** for complete configuration options. Documentation 📚 **Full Documentation** - Complete guides, API reference, and examples Key Documentation Sections: • **Quick Start Guide** - Get up and running in minutes • **Python SDK** - Complete SDK reference with examples • **LangChain Integration** - Automatic tool conversion for LangChain • **LLM Providers** - Configure OpenAI, Anthropic, AWS Bedrock, Ollama, and more • **Embedding Providers** - Configure embedding models for semantic search • **Custom Memory Vector Databases** - Configure custom memory vector databases • **Authentication** - OAuth2/JWT setup for production • **Memory Types** - Understanding semantic vs episodic memory • **API Reference** - REST API endpoints • **MCP Protocol** - Model Context Protocol integration Architecture Use Cases • **AI Assistants**: Persistent memory across conversations • **Customer Support**: Context from previous interactions • **Personal AI**: Learning user preferences and history • **Research Assistants**: Accumulating knowledge over time • **Chatbots**: Maintaining context and personalization Development License Apache License 2.0 - see LICENSE file for details. Contributing We welcome contributions! Please see the development documentation for guidelines.