{
  "schemaVersion": "1.0",
  "item": {
    "slug": "faya-session-memory",
    "name": "Faya Session Memory",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/moltbotmolty-del/faya-session-memory",
    "canonicalUrl": "https://clawhub.ai/moltbotmolty-del/faya-session-memory",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/faya-session-memory",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=faya-session-memory",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/build-glossary.py",
      "scripts/cron-optimizer.py",
      "scripts/session-to-memory.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/faya-session-memory"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/faya-session-memory",
    "agentPageUrl": "https://openagent3.xyz/skills/faya-session-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/faya-session-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/faya-session-memory/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Session Memory",
        "body": "Solve the #1 problem with long-running AI agents: knowledge loss after context compaction."
      },
      {
        "title": "The Problem",
        "body": "When sessions compact (summarize old messages to free context), specific details are lost:\nnames, decisions, file paths, reasoning. The agent retains a summary but loses the ability\nto recall \"What exactly did Annika say?\" or \"When did we decide to use v6 format?\""
      },
      {
        "title": "The Solution: Three-Layer Memory Architecture",
        "body": "Layer 1: MEMORY.md          — Curated long-term memory (human-edited)\nLayer 2: SESSION-GLOSSAR.md — Auto-generated structured index (people/projects/decisions/timeline)\nLayer 3: memory/sessions/   — Full session transcripts as searchable Markdown\n\nAll three layers live under memory/ and are automatically vectorized by OpenClaw's\nmemory search, creating a navigational hierarchy: glossary finds the right session,\nsession provides the details."
      },
      {
        "title": "Step 1: Convert existing sessions to Markdown",
        "body": "python3 scripts/session-to-memory.py\n\nThis scans all JSONL session logs in ~/.openclaw/agents/*/sessions/ and converts\nthem to memory/sessions/session-YYYY-MM-DD-HHMM-*.md. Truncates long assistant\nresponses to 2KB, skips system messages, tracks state to avoid re-processing.\n\nOptions:\n\n--new — Only convert sessions not yet processed (for incremental runs)\n--agent main — Specify agent ID (default: main)"
      },
      {
        "title": "Step 2: Build the glossary",
        "body": "python3 scripts/build-glossary.py\n\nScans all session transcripts and builds memory/SESSION-GLOSSAR.md with:\n\nPeople — Who was mentioned, in how many sessions, date ranges\nProjects — Which projects discussed, with relevant topic tags\nTopics — Categorized themes (Email Drafts, Website Build, Security, etc.)\nTimeline — Per-day summary (session count, people, topics)\nDecisions — Extracted decision-like statements with dates\n\nOptions:\n\n--incremental — Only process new sessions (uses cached scan state)"
      },
      {
        "title": "Step 3: Set up cron jobs for auto-updates",
        "body": "Create two cron jobs (use a cheap model like Gemini Flash):\n\nJob 1: Session sync + glossary rebuild (every 4-6 hours)\n\nTask: Run `python3 scripts/session-to-memory.py --new` then\n      `python3 scripts/build-glossary.py --incremental`.\n      Report how many new sessions were converted and indexed.\n\nOptional Job 2: Pre-compaction memory flush check\nAlready built into AGENTS.md by default — just ensure the agent writes to\nmemory/YYYY-MM-DD.md before each compaction."
      },
      {
        "title": "Customizing Entity Detection",
        "body": "Edit scripts/build-glossary.py to add your own known people and projects:\n\nKNOWN_PEOPLE = {\n    \"alice\": \"Alice Smith — Project Manager\",\n    \"bob\": \"Bob Jones — CTO\",\n}\n\nKNOWN_PROJECTS = {\n    \"website-redesign\": \"Website Redesign — Q1 Initiative\",\n    \"api-migration\": \"API Migration — v2 to v3\",\n}\n\nThe glossary also detects topics via regex patterns. Add new patterns in the\ntopic_patterns dict for your domain."
      },
      {
        "title": "How It Works With memory_search",
        "body": "Once set up, memory_search(\"Alice project decision\") will find:\n\nThe glossary entry for Alice (which sessions she appears in)\nThe actual session transcript where the decision was discussed\nAny MEMORY.md entry about Alice\n\nThis gives the agent a navigation layer (glossary) plus detail access\n(transcripts) — much better than either alone."
      },
      {
        "title": "File Structure After Setup",
        "body": "memory/\n├── MEMORY.md                    — Curated (you maintain this)\n├── SESSION-GLOSSAR.md           — Auto-generated index\n├── YYYY-MM-DD.md                — Daily notes\n├── .glossary-state.json         — Glossary builder state\n├── .glossary-scans.json         — Cached scan results\n└── sessions/\n    ├── .state.json              — Converter state\n    ├── session-2026-01-15-0830-abc123.md\n    ├── session-2026-01-15-1200-def456.md\n    └── ..."
      },
      {
        "title": "Cron Memory Optimizer",
        "body": "Cron jobs run in isolated sessions with zero memory context. The optimizer analyzes your cron jobs and suggests memory-enhanced versions:\n\npython3 scripts/cron-optimizer.py\n\nThis scans ~/.openclaw/cron/jobs.json, identifies jobs that would benefit from memory context, and generates memory/cron-optimization-report.md with before/after prompts and implementation guidance.\n\nExample optimization:\n\nOriginal: \"Run daily research scout...\"\nEnhanced: \"Before starting: Use memory_search to find recent context about research activities. Check memory/SESSION-GLOSSAR.md for relevant people, projects, and recent decisions. Then proceed with the original task using this context.\n\nRun daily research scout...\"\n\nThe script is conservative (suggests only, never auto-modifies) and skips monitoring jobs that don't need context."
      },
      {
        "title": "Tips",
        "body": "Run the full rebuild (python3 scripts/build-glossary.py without --incremental)\noccasionally to pick up improvements to entity detection\nThe glossary is most useful when KNOWN_PEOPLE and KNOWN_PROJECTS are populated —\nspend 5 minutes adding your key contacts and projects\nFor agents that run 24/7, the cron job keeps everything current automatically\nSession transcripts can get large (our 297 sessions = 24MB) — this is fine,\nOpenClaw's vector search handles it efficiently\nUse the cron optimizer after setting up memory to enhance existing automation"
      }
    ],
    "body": "Session Memory\n\nSolve the #1 problem with long-running AI agents: knowledge loss after context compaction.\n\nThe Problem\n\nWhen sessions compact (summarize old messages to free context), specific details are lost: names, decisions, file paths, reasoning. The agent retains a summary but loses the ability to recall \"What exactly did Annika say?\" or \"When did we decide to use v6 format?\"\n\nThe Solution: Three-Layer Memory Architecture\nLayer 1: MEMORY.md          — Curated long-term memory (human-edited)\nLayer 2: SESSION-GLOSSAR.md — Auto-generated structured index (people/projects/decisions/timeline)\nLayer 3: memory/sessions/   — Full session transcripts as searchable Markdown\n\n\nAll three layers live under memory/ and are automatically vectorized by OpenClaw's memory search, creating a navigational hierarchy: glossary finds the right session, session provides the details.\n\nSetup (run once)\nStep 1: Convert existing sessions to Markdown\npython3 scripts/session-to-memory.py\n\n\nThis scans all JSONL session logs in ~/.openclaw/agents/*/sessions/ and converts them to memory/sessions/session-YYYY-MM-DD-HHMM-*.md. Truncates long assistant responses to 2KB, skips system messages, tracks state to avoid re-processing.\n\nOptions:\n\n--new — Only convert sessions not yet processed (for incremental runs)\n--agent main — Specify agent ID (default: main)\nStep 2: Build the glossary\npython3 scripts/build-glossary.py\n\n\nScans all session transcripts and builds memory/SESSION-GLOSSAR.md with:\n\nPeople — Who was mentioned, in how many sessions, date ranges\nProjects — Which projects discussed, with relevant topic tags\nTopics — Categorized themes (Email Drafts, Website Build, Security, etc.)\nTimeline — Per-day summary (session count, people, topics)\nDecisions — Extracted decision-like statements with dates\n\nOptions:\n\n--incremental — Only process new sessions (uses cached scan state)\nStep 3: Set up cron jobs for auto-updates\n\nCreate two cron jobs (use a cheap model like Gemini Flash):\n\nJob 1: Session sync + glossary rebuild (every 4-6 hours)\n\nTask: Run `python3 scripts/session-to-memory.py --new` then\n      `python3 scripts/build-glossary.py --incremental`.\n      Report how many new sessions were converted and indexed.\n\n\nOptional Job 2: Pre-compaction memory flush check Already built into AGENTS.md by default — just ensure the agent writes to memory/YYYY-MM-DD.md before each compaction.\n\nCustomizing Entity Detection\n\nEdit scripts/build-glossary.py to add your own known people and projects:\n\nKNOWN_PEOPLE = {\n    \"alice\": \"Alice Smith — Project Manager\",\n    \"bob\": \"Bob Jones — CTO\",\n}\n\nKNOWN_PROJECTS = {\n    \"website-redesign\": \"Website Redesign — Q1 Initiative\",\n    \"api-migration\": \"API Migration — v2 to v3\",\n}\n\n\nThe glossary also detects topics via regex patterns. Add new patterns in the topic_patterns dict for your domain.\n\nHow It Works With memory_search\n\nOnce set up, memory_search(\"Alice project decision\") will find:\n\nThe glossary entry for Alice (which sessions she appears in)\nThe actual session transcript where the decision was discussed\nAny MEMORY.md entry about Alice\n\nThis gives the agent a navigation layer (glossary) plus detail access (transcripts) — much better than either alone.\n\nFile Structure After Setup\nmemory/\n├── MEMORY.md                    — Curated (you maintain this)\n├── SESSION-GLOSSAR.md           — Auto-generated index\n├── YYYY-MM-DD.md                — Daily notes\n├── .glossary-state.json         — Glossary builder state\n├── .glossary-scans.json         — Cached scan results\n└── sessions/\n    ├── .state.json              — Converter state\n    ├── session-2026-01-15-0830-abc123.md\n    ├── session-2026-01-15-1200-def456.md\n    └── ...\n\nCron Memory Optimizer\n\nCron jobs run in isolated sessions with zero memory context. The optimizer analyzes your cron jobs and suggests memory-enhanced versions:\n\npython3 scripts/cron-optimizer.py\n\n\nThis scans ~/.openclaw/cron/jobs.json, identifies jobs that would benefit from memory context, and generates memory/cron-optimization-report.md with before/after prompts and implementation guidance.\n\nExample optimization:\n\nOriginal: \"Run daily research scout...\"\nEnhanced: \"Before starting: Use memory_search to find recent context about research activities. Check memory/SESSION-GLOSSAR.md for relevant people, projects, and recent decisions. Then proceed with the original task using this context.\n\nRun daily research scout...\"\n\n\nThe script is conservative (suggests only, never auto-modifies) and skips monitoring jobs that don't need context.\n\nTips\nRun the full rebuild (python3 scripts/build-glossary.py without --incremental) occasionally to pick up improvements to entity detection\nThe glossary is most useful when KNOWN_PEOPLE and KNOWN_PROJECTS are populated — spend 5 minutes adding your key contacts and projects\nFor agents that run 24/7, the cron job keeps everything current automatically\nSession transcripts can get large (our 297 sessions = 24MB) — this is fine, OpenClaw's vector search handles it efficiently\nUse the cron optimizer after setting up memory to enhance existing automation"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/moltbotmolty-del/faya-session-memory",
    "publisherUrl": "https://clawhub.ai/moltbotmolty-del/faya-session-memory",
    "owner": "moltbotmolty-del",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/faya-session-memory",
    "downloadUrl": "https://openagent3.xyz/downloads/faya-session-memory",
    "agentUrl": "https://openagent3.xyz/skills/faya-session-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/faya-session-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/faya-session-memory/agent.md"
  }
}