Install
$ agentstack add skill-sickn33-antigravity-awesome-skills-agent-memory-systems ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Agent Memory Systems
Memory is the cornerstone of intelligent agents. Without it, every interaction starts from zero. This skill covers the architecture of agent memory: short-term (context window), long-term (vector stores), and the cognitive architectures that organize them.
Key insight: Memory isn't just storage - it's retrieval. A million stored facts mean nothing if you can't find the right one. Chunking, embedding, and retrieval strategies determine whether your agent remembers or forgets.
The field is fragmented with inconsistent terminology. We use the CoALA cognitive architecture framework: semantic memory (facts), episodic memory (experiences), and procedural memory (how-to knowledge).
Principles
- Memory quality = retrieval quality, not storage quantity
- Chunk for retrieval, not for storage
- Context isolation is the enemy of memory
- Right memory type for right information
- Decay old memories - not everything should be forever
- Test retrieval accuracy before production
- Background memory formation beats real-time
Capabilities
- agent-memory
- long-term-memory
- short-term-memory
- working-memory
- episodic-memory
- semantic-memory
- procedural-memory
- memory-retrieval
- memory-formation
- memory-decay
Scope
- vector-database-operations → data-engineer
- rag-pipeline-architecture → llm-architect
- embedding-model-selection → ml-engineer
- knowledge-graph-design → knowledge-engineer
Tooling
Memory_frameworks
- LangMem (LangChain) - When: LangGraph agents with persistent memory Note: Semantic, episodic, procedural memory types
- MemGPT / Letta - When: Virtual context management, OS-style memory Note: Hierarchical memory tiers, automatic paging
- Mem0 - When: User memory layer for personalization Note: Designed for user preferences and history
Vector_stores
- Pinecone - When: Managed, enterprise-scale (billions of vectors) Note: Best query performance, highest cost
- Qdrant - When: Complex metadata filtering, open-source Note: Rust-based, excellent filtering
- Weaviate - When: Hybrid search, knowledge graph features Note: GraphQL interface, good for relationships
- ChromaDB - When: Prototyping, small/medium apps Note: Developer-friendly, ~20ms p50 at 100K vectors
- pgvector - When: Already using PostgreSQL, simpler setup Note: Good for 1:
merged = await llm.invoke(f''' Consolidate these related memories into one: {cluster}
Preserve all important information. ''') await memory.semantic.upsert( namespace="userinsights", key=generatekey(merged), content=merged ) # Delete originals for old in cluster: await memory.semantic.delete(old.id) """
Memory Decay Pattern
Forgetting old, irrelevant memories
When to use: Memory grows large, retrieval slows down
MEMORY DECAY:
""" Not all memories should live forever:
- Old preferences may be outdated
- Task details lose relevance
- Conflicting memories confuse retrieval
Implement intelligent decay based on:
- Recency (when was it created/accessed?)
- Frequency (how often is it retrieved?)
- Importance (is it a core fact or detail?)
"""
Time-Based Decay
""" from datetime import datetime, timedelta
async def decayoldmemories(namespace: str, maxagedays: int): cutoff = datetime.now() - timedelta(days=maxagedays)
oldmemories = await memory.episodic.list( namespace=namespace, filter={"lastaccessed": {"$lt": cutoff.isoformat()}} )
for mem in oldmemories: # Soft delete (mark as archived) await memory.episodic.update( id=mem.id, metadata={"archived": True, "archivedat": datetime.now()} ) """
Utility-Based Decay (MIRIX Approach)
""" def calculatememoryutility(memory): ''' Composite utility score inspired by cognitive science:
- Recency: When was it last accessed?
- Frequency: How often is it accessed?
- Importance: How critical is this information?
''' now = datetime.now()
# Recency score (exponential decay with 72h half-life) hourssinceaccess = (now - memory.lastaccessed).totalseconds() / 3600 recencyscore = 0.5 ** (hourssince_access / 72)
# Frequency score frequencyscore = min(memory.accesscount / 10, 1.0)
# Importance (from metadata or heuristic) importance = memory.metadata.get("importance", 0.5)
# Weighted combination utility = ( 0.4 recencyscore + 0.3 frequencyscore + 0.3 * importance )
return utility
async def prunelowutilitymemories(threshold=0.2): allmemories = await memory.listall() for mem in allmemories: if calculatememoryutility(mem) data-engineer (Production vector store operations)
- user needs embedding model optimization -> ml-engineer (Custom embeddings, fine-tuning)
- user needs knowledge graph -> knowledge-engineer (Graph-based memory structures)
- user needs RAG pipeline -> llm-architect (End-to-end retrieval augmented generation)
- user needs multi-agent shared memory -> multi-agent-orchestration (Memory sharing between agents)
Related Skills
Works well with: autonomous-agents, multi-agent-orchestration, llm-architect, agent-tool-builder
When to Use
- User mentions or implies: agent memory
- User mentions or implies: long-term memory
- User mentions or implies: memory systems
- User mentions or implies: remember across sessions
- User mentions or implies: memory retrieval
- User mentions or implies: episodic memory
- User mentions or implies: semantic memory
- User mentions or implies: vector store
- User mentions or implies: rag
- User mentions or implies: langmem
- User mentions or implies: memgpt
- User mentions or implies: conversation history
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: sickn33
- Source: sickn33/antigravity-awesome-skills
- License: MIT
- Homepage: https://sickn33.github.io/antigravity-awesome-skills/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.