store-memory

X-McKay 的头像作者 X-McKay

Store information in the hierarchical memory system. Supports three tiers: working (ephemeral), episodic (recent events), and semantic (permanent patterns). Use for learning from observations. Keywords: memory, store, learn, remember, episodic, semantic, pattern.

📖 中文导读:Store information in the hierarchical memory system. Supports three tiers: working (ephemeral), episodic (recent events), and semantic (permanent patterns). Use for learning from observations. Keywords: memory, store, learn, remember, episodic, semantic, pattern. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: store-memory description: > Store information in the hierarchical memory system. Supports three tiers: working (ephemeral), episodic (recent events), and semantic (permanent patterns). Use for learning from observations. Keywords: memory, store, learn, remember, episodic, semantic, pattern. metadata: domain: general category: memory requires-approval: false confidence: 0.9 mcp-servers: []

Store Memory

Preconditions

Before applying this skill, verify:

  • Memory system is initialized (Qdrant available)
  • Content to store is meaningful
  • Appropriate tier is selected

Actions

1. Classify Memory Tier

Determine which memory tier to use:

  • Working: Temporary context, 1-hour TTL, max 20 items
  • Episodic: Recent events, 7-30 day retention, time-decayed
  • Semantic: Permanent patterns, never expires

2. Extract Structured Facts

Use LLM to extract key facts from content:

input: $raw_content
max_length: 4000
temperature: 0.1
output: list[str]

3. Store in Memory Tier

For Working Memory:

memory.add_working(
    content=content,
    metadata={"source": source, "timestamp": now}
)

For Episodic Memory:

memory.add_episodic(
    content=content,
    user_id=user_id,
    metadata={"event_type": type, "timestamp": now}
)

For Semantic Memory:

memory.add_semantic(
    content=content,
    user_id=user_id,
    metadata={"pattern_type": type, "confidence": confidence}
)

Success Criteria

The skill succeeds when:

  • Content successfully stored
  • Memory retrievable via search
  • Metadata properly indexed

Failure Handling

If storage fails:

  1. Check Qdrant connectivity
  2. Verify content is not empty
  3. Fall back to working memory if persistent storage unavailable

Examples

Input Context:

{
  "tier": "episodic",
  "content": "Pod nginx-abc123 crashed due to OOM. Increased memory limit from 512Mi to 1Gi.",
  "user_id": "k8s-monitor",
  "event_type": "remediation_success",
  "source": "healer-agent"
}

Expected Output:

{
  "stored": true,
  "tier": "episodic",
  "memory_id": "mem_abc123",
  "facts_extracted": 2
}