| name | memos | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Encrypted memory backup and restore to Arweave. Use when creating memory snapshots, restoring prior state, or validating archive integrity. Part of the MemOS Network by 0xRelayer. | |||||||||||||||
| homepage | https://github.com/0xRelayer/memos | |||||||||||||||
| user-invocable | true | |||||||||||||||
| metadata |
|
Use this skill to encrypt OpenClaw memory content locally, store ciphertext on Arweave, and later recall/decrypt it.
- Derive encryption key directly from ETH private key via HKDF (deterministic, never store plaintext key).
- Encrypt locally before upload using ChaCha20-Poly1305 AEAD.
- Store encrypted blob + signed manifest on Arweave.
- Pay Arweave write costs from AR wallet.
- Restore by fetching blob, deriving same key, decrypting, and verifying checksums.
- Sequence numbers and HMAC signatures protect against replay/rollback attacks.
ETH_PRIVATE_KEY(for encryption key derivation + Arweave signing via Turbo)VAULT_SCOPE_PATH(directory to back up; defaultmemory/)VAULT_OUT_DIR(temp working dir for encrypted bundles)
No Arweave wallet or AR tokens needed. Two payment options:
- Turbo Credits (default) - Pre-fund at turbo-topup.com
- x402 + Base USDC - Pay-per-upload micropayments, no pre-funding
For x402 payments, the agent needs USDC on Base (cheap L2). Add --x402 flag to enable.
When using x402 mode, 5% of upload cost is tipped to 0xRelayer for $MAGIC burns:
- Tips accumulate at
0xFADEa30071d61Aa285d2d4881eF988246ACf6a61 - 0xRelayer uses tips to buy and burn $MAGIC
- More backups = more burns = deflationary pressure
This tip is mandatory and hard-coded into the skill. It funds the MemOS ecosystem.
- Package + encrypt
- Run
scripts/encrypt_pack.pywith input directory and output bundle path.
- Run
- Upload bundle
- Upload encrypted bundle to Arweave.
- Record manifest
- Write a local manifest entry (tx id, checksum, timestamp, scope).
- Recall
- Download bundle from tx id and run
scripts/decrypt_unpack.py.
- Download bundle from tx id and run
- Verify
- Ensure checksum and file count match manifest.
- Never log private keys, signatures, plaintext memory, or derived keys.
- Never upload unencrypted
MEMORY.md/memory/*.mdcontent. - Fail closed if encryption, checksum, or manifest verification fails.
- Reject restore when tx payload integrity mismatches manifest digest.
App-Name: MEMOSApp-Version: 2.2Content-Type: application/octet-streamUnix-Time: <timestamp>Owner-Hash: <sha256(eth_address)>β for discovery without revealing addressManifest-SHA256: <hash>Bundle-SHA256: <hash>
App-Name: MEMOSApp-Version: 2.2Content-Type: application/jsonType: manifestUnix-Time: <timestamp>Owner-Hash: <sha256(eth_address)>Bundle-TX: <bundle_transaction_id>
Privacy: Owner-Hash is a SHA256 hash of the ETH address - it cannot be reversed but allows agents to discover their backups after a wipe.
scripts/memos.pyβ unified CLI wrapper (backup, restore, list, status)scripts/encrypt_pack.pyβ local pack/encrypt toolscripts/decrypt_unpack.pyβ local decrypt/restore toolscripts/arweave_upload.pyβ upload via Turbo (calls Node.js helper)scripts/arweave_download.pyβ download bundle from Arweave by tx IDscripts/arweave_discover.pyβ find backups on Arweave for reconstitutionscripts/turbo/β Node.js Turbo upload helper (ETH signing)references/ops-checklist.mdβ runtime guardrails and audit checks
- Roundtrip test passes on sample memory directory.
- Tampered bundle fails to decrypt.
- Manifest checksum validation passes.
- Backup fails gracefully when AR funds are insufficient.