Delegate independent tasks to specialized agents working concurrently with isolated context.
Hierarchical Memory System
hierarchical-memory
Hierarchical memory architecture combining short-term, long-term, and episodic memory layers. Based on Mem0 research showing 26% accuracy improvement. Use for persistent knowledge, context management, and RAG optimization.
SKILL.md
Full skill instructions
Hierarchical Memory System
TAISUN's hierarchical memory architecture based on Mem0 research, providing 26% accuracy improvement through structured memory layers.
Architecture Overview
┌─────────────────────────────────────────────────────────────────┐
│ HIERARCHICAL MEMORY │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ SHORT-TERM │ │ LONG-TERM │ │ EPISODIC │ │
│ │ (Session) │ │ (Persistent) │ │ (Events) │ │
│ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤ │
│ │ taisun-proxy │ │ Qdrant Vector │ │ claude-mem │ │
│ │ InMemoryStore │ │ Database │ │ Observations │ │
│ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤ │
│ │ TTL: Session │ │ TTL: Permanent │ │ TTL: 30 days │ │
│ │ Size: 100 items │ │ Size: Unlimited │ │ Size: 50/day │ │
│ │ Search: Token │ │ Search: Vector │ │ Search: ID/Time │ │
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
│ │ │ │ │
│ └───────────────────┼────────────────────┘ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ MEMORY ROUTER │ │
│ │ (Consolidation)│ │
│ └─────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Memory Layers
1. Short-Term Memory (Working Memory)
System: taisun-proxy InMemoryStore Purpose: Current session context
| Property | Value |
|---|---|
| Storage | In-memory |
| TTL | Session duration |
| Max Items | 100 |
| Search | Token-based |
| Use Cases | Current task context, recent commands, temp data |
# Store in short-term
memory_add type="short-term" content="現在のタスク: API実装"
# Retrieve
memory_search query="タスク"
2. Long-Term Memory (Semantic Memory)
System: Qdrant Vector Database Purpose: Persistent knowledge and patterns
| Property | Value |
|---|---|
| Storage | Qdrant (localhost:6333) |
| TTL | Permanent |
| Max Items | Unlimited |
| Search | Vector similarity |
| Use Cases | Code patterns, learned solutions, domain knowledge |
# Store important pattern
qdrant-store text="認証にはJWTを使用し..." metadata={topic: "auth"}
# Semantic search
qdrant-find query="認証の実装方法"
3. Episodic Memory (Event Memory)
System: claude-mem Observations Purpose: Decision history and context trails
| Property | Value |
|---|---|
| Storage | JSONL files |
| TTL | 30 days |
| Max Items | ~50/day |
| Search | ID, timestamp, type |
| Use Cases | Past decisions, debugging context, learning history |
# Auto-captured by hooks
# Access via MCP
mcp__claude-mem-search__search query="bugfix"
mcp__claude-mem-search__timeline date="2026-01-19"
Memory Flow
Information Lifecycle
1. CAPTURE (Short-Term)
User input → Session context → Working memory
2. CONSOLIDATE (Short → Long)
Important patterns → Vector embedding → Qdrant storage
3. OBSERVE (Episodic)
Decisions, discoveries → claude-mem → Timestamped records
4. RETRIEVE (All Layers)
Query → Router → Best matching layer → Response
Consolidation Rules
| Trigger | Action |
|---|---|
| Session end | Important short-term → Long-term |
| Pattern detected | Auto-store in Qdrant |
| Decision made | Log to episodic |
| Error resolved | Store solution in long-term |
Usage Patterns
1. Remember Important Information
User: このAPIパターンを覚えておいて
[code snippet]
AI: 1. Short-term に即座に保存
2. 重要度判定(コードパターン = HIGH)
3. Qdrant に永続化
4. claude-mem に観察記録
2. Retrieve Past Knowledge
User: 以前話した認証の実装方法は?
AI: 1. Qdrant でセマンティック検索
2. claude-mem でエピソード検索
3. 関連情報を統合
4. コンテキスト付きで回答
3. Learn From Session
# Session end hook automatically:
1. Extracts key decisions
2. Stores successful patterns
3. Records errors and solutions
4. Updates long-term memory
Performance Benefits (Mem0 Research)
| Metric | Improvement |
|---|---|
| Accuracy | +26% |
| P95 Latency | -91% |
| Token Usage | -90% |
Source: Mem0 Research Paper
Integration Points
With Existing TAISUN Systems
| System | Integration |
|---|---|
| taisun-proxy | memory_add, memory_search tools |
| Qdrant MCP | qdrant-store, qdrant-find tools |
| claude-mem | Auto-observation hooks |
| SessionStart | State injection |
| SessionEnd | Memory consolidation |
With Other MCPs
# Context7 + Long-Term Memory
「use context7 でReact 19の新機能を学習して、覚えておいて」
# GPT Researcher + Memory
「市場調査して、重要なポイントを長期記憶に保存」
Best Practices
-
Explicit Memory Commands
✅ 「これを長期記憶に保存して」 ✅ 「前回のセッションで話した〇〇について」 ❌ 「覚えておいて」(曖昧) -
Tag Important Information
metadata: { topic: "auth", type: "pattern", priority: "high" } -
Regular Memory Cleanup
Outdated patterns should be removed from long-term memory -
Trust the Consolidation
Let auto-hooks handle session → long-term migration
Troubleshooting
Memory Not Found
- Check if Qdrant is running (
curl localhost:6333/health) - Verify collection exists
- Check search query specificity
Slow Retrieval
- Limit search scope with filters
- Use appropriate memory layer
- Check Qdrant index status
Sources
More Other skills
brand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
