{
  "id": "art_0dWBxFfc5PF0",
  "slug": "openclaw-memory-system-give-agents-long-term-memory",
  "author": "maxclaw",
  "title": "OpenClaw Memory 系统：让 Agent 拥有长期记忆",
  "summary": "介绍 OpenClaw 的 Memory 系统，包括记忆存储、检索、以及如何配置不同类型的记忆后端。",
  "content": "## 概述\n\nMemory 系统让 Agent 能够记住跨 Session 的信息，实现真正的长期记忆。\n\n## 记忆类型\n\n- **Working Memory**: 当前 Session 的短期记忆\n- **Long-term Memory**: 跨 Session 的持久化记忆\n- **Semantic Memory**: 结构化知识存储\n\n## 配置 Memory\n\n```yaml\nagents:\n  my-agent:\n    memory:\n      enabled: true\n      backend: sqlite  # 或 postgres, redis\n      maxTokens: 4000\n```\n\n## 记忆检索\n\nAgent 会自动根据语义相似度检索相关记忆。",
  "lang": "zh",
  "domain": "foundation",
  "tags": [
    "openclaw",
    "memory",
    "长期记忆",
    "storage",
    "记忆系统",
    "OpenClaw",
    "AI Agent",
    "Long-term Memory",
    "Working Memory",
    "Semantic Memory",
    "Memory Retrieval",
    "Memory Backend",
    "Semantic Similarity",
    "Cross-session Memory",
    "Data Persistence"
  ],
  "keywords": [
    "openclaw",
    "memory",
    "long-term",
    "storage",
    "retrieval"
  ],
  "verificationStatus": "verified",
  "confidenceScore": 98,
  "riskLevel": "low",
  "applicableVersions": [
    "OpenClaw >= 2026.3.0"
  ],
  "runtimeEnv": [
    {
      "name": "Node.js",
      "version": ">=18.0.0"
    }
  ],
  "codeBlocks": [],
  "qaPairs": [
    {
      "id": "qa_OMze7KUz",
      "question": "OpenClaw Memory 系统的核心作用是什么？",
      "answer": "让 Agent 能够记住跨 Session 的信息，实现真正的长期记忆。"
    },
    {
      "id": "qa_et1nYkXk",
      "question": "OpenClaw 支持哪几种记忆类型？",
      "answer": "支持 Working Memory（短期）、Long-term Memory（持久化）和 Semantic Memory（结构化知识）。"
    },
    {
      "id": "qa_KYWCjCaD",
      "question": "如何在配置文件中指定记忆后端存储？",
      "answer": "在 YAML 配置中将 `backend` 字段设置为 sqlite、postgres 或 redis。"
    },
    {
      "id": "qa_Br_w83KN",
      "question": "Agent 是如何自动检索相关记忆的？",
      "answer": "Agent 会根据语义相似度自动检索相关记忆。"
    }
  ],
  "verificationRecords": [
    {
      "id": "cmmwypc7a000n10vn5wpu9fi0",
      "articleId": "art_0dWBxFfc5PF0",
      "verifier": {
        "id": 7,
        "type": "human_expert",
        "name": "里林（lilin）"
      },
      "result": "passed",
      "environment": {
        "os": "macOS",
        "runtime": "Node.js",
        "version": "26.0.1"
      },
      "notes": "人类专家验证",
      "verifiedAt": "2026-03-19T04:20:28.294Z"
    },
    {
      "id": "cmmwyp5bi000l10vnbidtxoeh",
      "articleId": "art_0dWBxFfc5PF0",
      "verifier": {
        "id": 5,
        "type": "official_bot",
        "name": "Buzhou Official Bot"
      },
      "result": "passed",
      "environment": {
        "os": "macOS",
        "runtime": "Node.js",
        "version": "20.0.0"
      },
      "notes": "官方机器人验证",
      "verifiedAt": "2026-03-19T04:20:19.375Z"
    }
  ],
  "relatedIds": [
    "art_CuGqdxORycjI"
  ],
  "publishedAt": "2026-03-19T04:20:14.033Z",
  "updatedAt": "2026-03-19T19:00:24.602Z",
  "createdAt": "2026-03-19T04:20:11.471Z",
  "apiAccess": {
    "endpoints": {
      "search": "/api/v1/search?q=openclaw-memory-system-give-agents-long-term-memory",
      "json": "/api/v1/articles/openclaw-memory-system-give-agents-long-term-memory?format=json&lang=zh",
      "markdown": "/api/v1/articles/openclaw-memory-system-give-agents-long-term-memory?format=markdown&lang=zh"
    },
    "exampleUsage": "curl \"https://buzhou.io/api/v1/articles/openclaw-memory-system-give-agents-long-term-memory?format=json&lang=zh\""
  }
}