agent-memory-systems

Designs agent memory architectures using vector stores, chunking strategies, and retrieval patterns.

3|1|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/PALabs-v1/AI_friend --skill agent-memory-systems-palabs-v1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-memory-systems
Source: https://github.com/PALabs-v1/AI_friend/tree/main/.agents/skills/agent-memory-systems
Command: npx skills add https://github.com/PALabs-v1/AI_friend --skill agent-memory-systems-palabs-v1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Agents without memory start every interaction from zero, and poorly designed memory systems retrieve irrelevant or contradictory information. This Skill provides architecture guidance for building short-term and long-term agent memory using the CoALA cognitive framework (semantic, episodic, procedural memory). ## Core Features & Use Cases - Memory Type Architecture: Implement semantic, episodic, and procedural memory using frameworks like LangMem, MemGPT/Letta, and Mem0. - Vector Store Selection: Decision matrix comparing Pinecone, Qdrant, Weaviate, ChromaDB, and pgvector by scale, filtering, cost, and latency. - Chunking & Retrieval Patterns: Fixed-size, semantic, structure-aware, and contextual chunking strategies with code examples, plus background memory formation and decay patterns. - Use Case: You are building a conversational agent that must remember user preferences across sessions. Use this Skill to select a vector store, implement metadata-filtered retrieval, and add time-decay scoring so recent preferences override stale ones. ## Quick Start Ask the agent to design a long-term memory system for a chatbot that remembers user preferences across sessions using a vector database.

Frequently Asked Questions about agent-memory-systems

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add long-term memory to an AI agent?

Use a memory framework like LangMem, MemGPT, or Mem0 to store semantic, episodic, and procedural memories in a vector database. Retrieve relevant memories at runtime by combining embedding similarity with metadata filters such as user_id and memory type.

Which vector database should I use for agent memory?

Pinecone suits managed enterprise scale, Qdrant handles complex metadata filtering, Weaviate supports hybrid search, ChromaDB fits prototyping, and pgvector works if you already run PostgreSQL. Choose based on scale, filtering needs, and cost.

What chunk size should I use for vector storage?

A general range is 256-512 tokens, but optimal size depends on content type: around 512 for documentation, 1000 for code, and 256 for conversations. Test multiple sizes against real queries and measure retrieval recall before committing.

Why does semantic search return irrelevant memories?

Semantic similarity is not the same as relevance, so pure vector search can match topically similar but wrong-type content. Fix this by filtering on metadata like user_id and memory type first, using hybrid keyword search, and reranking with a cross-encoder.

How do I handle outdated or contradictory agent memories?

Apply time-decay scoring so recent memories rank higher, update preferences in place instead of appending, and run conflict detection on storage using an LLM check. Periodic consolidation merges duplicate or conflicting memories into one current version.

Can I mix different embedding models in one vector index?

No. Embedding models produce different vector spaces, so queries embedded with one model will not match documents embedded with another. Track the embedding model in metadata and re-embed all documents when migrating to a new model.