Atxp Memory

atxp-dev/cli/skills/atxp-memory

作者 atxp-devf3c10247687d無授權條款11 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫5 個月前更新

Agent memory management — cloud backup, restore, and local vector search of .md memory files

僅含說明AI & Agents
AI 產生的概覽

透過 ATXP CLI 備份、還原並在本機以向量檢索代理的 .md 記憶檔案。

功能
透過 ATXP CLI 管理代理的 .md 記憶檔案。它會把指定目錄下的所有 .md 檔案推送到 ATXP 雲端伺服器,並可拉取回來用於還原;同時為這些檔案建立本機 zvec 向量索引,以便用自然語言查詢進行檢索。它也會顯示雲端備份資訊與本機索引統計。只會收集與傳輸 .md 檔案。
適用情境
在 SOUL.md、MEMORY.md 等記憶檔案有重要變更後或工作階段結束時,用於備份。用於初始化新的工作區或從環境遺失中還原。用於為記憶檔案建立索引,並在需要回憶的任務前檢索過往記憶中的相關脈絡。
執行需求
需要 Node.js >= 18 與 npx。雲端 push/pull/status 需要 ATXP 驗證權杖(ATXP_CONNECTION,透過 npx atxp@latest login 或 agent register 建立)以及網路存取。本機 index/search 需要選用的 @zvec/zvec 套件,不需要驗證或網路。不附帶指令碼,僅提供說明。

ATXP Memory — Agent Memory Management

Manage your agent's .md memory files: back up and restore to/from ATXP cloud servers, and search your local memories using zvec vector similarity search.

Capabilities

CapabilityDescription
Cloud BackupPush/pull .md files to ATXP servers for disaster recovery
Local SearchIndex .md files into a local zvec vector database, then search by natural language query
StatusView cloud backup info and local index statistics

Security Model

  • Only .md files are collected and transmitted (push/pull). No credentials, JSON configs, binaries, or other file types are ever sent.
  • Files are sent to ATXP servers over HTTPS, associated with the authenticated agent's identity.
  • push replaces the server snapshot entirely (latest snapshot only, no history).
  • pull is non-destructive — it writes server files to the local directory but does not delete local files absent from the server.
  • Local search index is stored in a .atxp-memory-index/ subdirectory inside --path. It never leaves the local machine.
  • index and search do not require authentication or network access.
  • Filesystem access: reads from --path directory (push/index), writes to --path directory (pull) and --path/.atxp-memory-index/ (index). No other directories are touched.
  • No modification of OpenClaw config or auth files.

When to Use

SituationCommand
After meaningful changes to SOUL.md, MEMORY.md, or at end of sessionpush
Bootstrapping a fresh workspace or recovering from environment losspull
After updating memory files and before starting a task that requires recallindex
Looking for relevant context in past memoriessearch
Verify backup exists before risky operationsstatus

Commands Reference

CommandDescription
npx atxp@latest memory push --path <dir>Recursively collect all *.md files from <dir> and upload to server
npx atxp@latest memory pull --path <dir>Download backup from server and write files to <dir>
npx atxp@latest memory index --path <dir>Chunk .md files by heading and build a local zvec search index
npx atxp@latest memory search <query> --path <dir>Search indexed memories by similarity
npx atxp@latest memory status [--path <dir>]Show cloud backup info and/or local index stats

Options

OptionRequiredDescription
--path <dir>Yes (push/pull/index/search)Directory to operate on
--topk <n>No (search only)Number of results to return (default: 10)

How Local Search Works

  1. Indexing (memory index):

    • Scans all .md files recursively from --path
    • Splits each file into chunks at heading boundaries (h1/h2/h3)
    • Converts each chunk into a 256-dimensional feature vector using locality-sensitive hashing (unigrams + bigrams)
    • Stores vectors and metadata in a local zvec database (HNSW index) at <path>/.atxp-memory-index/
  2. Searching (memory search):

    • Converts the query text into the same vector representation
    • Performs approximate nearest neighbor search via zvec's HNSW index
    • Returns the top-k most similar chunks with file paths, headings, line numbers, and similarity scores

The search is purely local — no network requests, no API keys, no cost. Re-index after modifying memory files.

Path Conventions

Typical OpenClaw workspace paths:

~/.openclaw/workspace-<id>/~/.openclaw/workspace-<id>/SOUL.md~/.openclaw/workspace-<id>/MEMORY.md~/.openclaw/workspace-<id>/memory/~/.openclaw/workspace-<id>/AGENTS.md~/.openclaw/workspace-<id>/USER.md

Backward Compatibility

The backup command is still accepted as an alias for memory:

bash
npx atxp@latest backup push --path <dir>   # works, same as memory pushnpx atxp@latest backup pull --path <dir>   # works, same as memory pullnpx atxp@latest backup status              # works, same as memory status

Limitations

  • .md files only — all other file types are ignored during push/index and not present in pull.
  • Latest snapshot only — each push overwrites the previous backup. There is no version history.
  • Requires ATXP auth for cloud operations — run npx atxp@latest login or npx atxp@latest agent register first.
  • --path is required — there is no auto-detection of workspace location.
  • Local search requires @zvec/zvec — install with npm install @zvec/zvec before using index/search.
  • Feature-hash embeddings — local search uses statistical text hashing, not neural embeddings. It works well for keyword and phrase matching but is not a full semantic search. For best results, use specific terms from your memory files.

來源與署名

來源:atxp-dev/cli位於skills/atxp-memory提交f3c1024

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架