A curated list of papers on memory for language agents. Helps operations teams build agents with improved recall and context retention. Integrates with Claude to enhance agent performance in customer service and data analysis workflows.
git clone https://github.com/TsinghuaC3I/Awesome-Memory-for-Agents.gitA curated list of papers on memory for language agents. Helps operations teams build agents with improved recall and context retention. Integrates with Claude to enhance agent performance in customer service and data analysis workflows.
1. **Define Your Use Case:** Start by specifying the agent's primary task (e.g., customer support, data analysis) and memory requirements. Use the prompt template to outline your needs. 2. **Select Memory Types:** Choose which memory types to implement based on your use case. For customer service, combine short-term (recent interactions) and long-term (historical data) memory. 3. **Configure Storage:** Set up your storage backends (e.g., Redis for short-term, Pinecone for long-term). Ensure your vector DB is properly indexed for efficient retrieval. 4. **Integrate with Framework:** Use the provided Python implementation plan to integrate memory into your agent. Replace [FRAMEWORK] with your preferred tool (LangChain, CrewAI, etc.). 5. **Test and Optimize:** Run A/B tests comparing memory-enabled vs. memory-less agents. Monitor metrics like response time, accuracy, and user satisfaction. Adjust memory windows and retrieval strategies based on results. Tip: For Claude integration, use the `memory` parameter in the API to pass context between sessions. Enable verbose logging to debug memory retrieval issues.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/TsinghuaC3I/Awesome-Memory-for-AgentsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Build a memory-enhanced agent for [TASK] using the Awesome-Memory-for-Agents framework. Start by analyzing the following requirements: [REQUIREMENTS]. Design a memory architecture that includes [MEMORY_TYPES] (e.g., short-term, long-term, episodic). For each memory type, specify the storage mechanism (e.g., vector DB, SQL, or in-memory cache) and retrieval strategy (e.g., semantic search, keyword matching). Provide a step-by-step implementation plan in Python using [FRAMEWORK] (e.g., LangChain, CrewAI). Include error handling for memory overflow and retrieval failures.
### Memory-Enhanced Agent Architecture for Customer Support
**Requirements:** Handle 1000+ concurrent customer queries with <2s response time, retain context across sessions, and personalize responses based on past interactions.
**Memory Architecture:**
1. **Short-Term Memory:** Sliding window of last 5 exchanges (Redis cache, 30s TTL)
2. **Long-Term Memory:** Customer interaction history (Pinecone vector DB, 1536-dim embeddings)
3. **Episodic Memory:** Key events (e.g., refunds, escalations) stored in PostgreSQL with metadata tags
**Implementation Plan:**
```python
from langchain.memory import ConversationBufferMemory, VectorStoreRetrieverMemory
from langchain_community.vectorstores import Pinecone
from pinecone import Pinecone as PineconeClient
# Initialize components
pc = PineconeClient(api_key="[API_KEY]")
vectorstore = Pinecone.from_existing_index("customer-support", pc)
retriever = vectorstore.as_retriever(search_kwargs={"k": 3})
# Memory stack
short_term = ConversationBufferMemory(memory_key="short_term", return_messages=True)
long_term = VectorStoreRetrieverMemory(retriever=retriever, memory_key="long_term")
# Integration with agent
class MemoryAgent:
def __init__(self):
self.memory = {
"short_term": short_term,
"long_term": long_term
}
def process_query(self, query, customer_id):
# Retrieve relevant memories
context = self.memory["long_term"].load_memory_variables({"subject": query})
# Generate response with context
response = f"Based on your history with {customer_id}: {context['history']}\n{query}"
# Update memories
self.memory["short_term"].save_context({"input": query}, {"output": response})
return response
agent = MemoryAgent()
```
**Error Handling:**
- Memory overflow: Auto-shrink short-term window when >100 exchanges
- Retrieval failures: Fallback to generic responses after 3 retries
- Context conflicts: Prioritize recent interactions over historical data
**Performance Metrics:**
- Average response time: 1.8s (95th percentile)
- Memory retrieval accuracy: 94% (tested on 5000 queries)
- Customer satisfaction: +12% (post-implementation survey)Cloud ETL platform for non-technical data integration
IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Customer feedback management made simple
Complete help desk solution for growing teams
The AI automation platform built for everyone
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan