Skip to content
Back to skills

Memory Systems

ASecurity

Design memory architectures for agents with layered persistence from working memory to knowledge graphs.

  • 7 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 3, 2026
ai-agentspythongodatabase

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 3, 2026

npx -y skills add mediar-ai/skillhubz --skill memory-systems --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Memory Systems?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Memory Systems
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mediar-ai-memory-systems/badge)](https://www.skillsdirectory.com/skills/mediar-ai-memory-systems)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Memory System Design

Design memory architectures for agents with layered persistence from working memory to knowledge graphs.

## Prerequisites

- Understanding of vector embeddings
- Familiarity with graph databases

## Instructions

### Memory Layers

| Layer | Persistence | Access | Use Case |
|-------|-------------|--------|----------|
| Working | Context window | Zero latency | Current task |
| Short-term | Session | Searchable | Conversation state |
| Long-term | Cross-session | Structured | Learning over time |
| Entity | Permanent | Queryable | Entity consistency |

### Memory Architecture Comparison

| System | Accuracy | Latency | Notes |
|--------|----------|---------|-------|
| Temporal KG | 94.8% | 2.58s | Best accuracy |
| MemGPT | 93.4% | Variable | Good general |
| GraphRAG | 75-85% | Variable | 20-35% over RAG |
| Vector RAG | 60-70% | Fast | Loses relationships |

### Why Vector Stores Fall Short

Vector stores lose relationship information. If agent learns "Customer X purchased Product Y on Date Z," it cannot answer "What did customers who bought Y also buy?"

### Knowledge Graph Advantages

- Preserve relationships between entities
- Enable queries that traverse relationships
- Support temporal validity periods

### Temporal Knowledge Graphs

Add validity periods to facts:

```python
# What was user's address on January 15?
temporal_graph.query("""
    MATCH (user)-[r:LIVES_AT]->(address)
    WHERE r.valid_from <= $date AND r.valid_until > $date
    RETURN address
""", {"date": "2024-01-15"})
```

### Memory Selection Guide

- **Simple persistence**: File-system memory
- **Semantic search**: Vector RAG with metadata
- **Relationship reasoning**: Knowledge graph
- **Temporal validity**: Temporal knowledge graph

## Guidelines

1. Match architecture to query requirements
2. Use temporal validity to prevent outdated conflicts
3. Consolidate memories periodically
4. Design for retrieval failures gracefully
5. Consider privacy implications of persistence

## Notes

- Zep showed 90% retrieval latency reduction vs full-context
- GraphRAG reduces hallucination by up to 30%
- Entity memory maintains consistency across conversations

Source: muratcankoylan/Agent-Skills-for-Context-Engineering

Files in this skill

  • manifest.json338 B
  • skill.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.