AgentSkillsCN

engram

为AI代理提供持久化的语义记忆——本地存储、高速访问、免费使用。当代理需要回顾过往决策、存储新事实与偏好、检索对话历史,或在不同会话间保持上下文连贯时,便可使用此功能。

SKILL.md
--- frontmatter
name: engram
description: "Persistent semantic memory for AI agents — local, fast, free. Use when agent needs to recall past decisions, store new facts/preferences, search conversation history, or maintain context across sessions."
metadata:
  openclaw:
    emoji: "🧠"
    requires:
      bins: ["engram"]
    install:
      - id: node
        kind: node
        package: engram-memory
        bins: ["engram"]
        label: "Install Engram (npm)"

Engram — Agent Memory

Local semantic memory with biological decay, typed memories, and relationship graphs. No API keys. No cloud.

Boot Sequence

bash
engram search "<current task or context>" --limit 10

Always recall before working. Accessed memories get salience-boosted.

Storing

bash
engram add "Client uses React with TypeScript" --type fact --tags react,client
engram add "We decided to pause ads" --type decision --tags ads
echo "Raw conversation text" | engram ingest

Types: fact, decision, preference, event, relationship

Searching

bash
engram search "what tech stack"
engram search "pricing decisions" --type decision
engram search "client status" --agent client-agent

Relationships

bash
engram relate <src> <tgt> --type supports
engram auto-relate <id>
engram relations <id>

Types: related_to, supports, contradicts, caused_by, supersedes, part_of, references

Key Concepts

  • Decay: Unused memories lose salience daily. Recalled ones get boosted.
  • Types: Filter by fact, decision, preference, event, relationship.
  • Scoping: global, agent, private, shared.
  • Dedup: >92% similarity auto-merges.

Quick Reference

bash
engram stats
engram recall --limit 10
engram export > backup.json
engram import backup.json