Skip to content

Memact/Memory

Repository files navigation

Memact Memory

Memory is the storage layer that keeps the context you have approved.

What Memory Does

Memory acts as the database for your provider. It stores:

  • Your approved context (the facts you accept or edit).
  • The evidence chains showing which apps suggested what data and when.
  • The age and decay status of each fact.
  • Your review history (what you accepted, modified, or rejected).

Local Backup and Restore

You can export approved memory entries to an AES-256-GCM encrypted JSON backup and restore them later. Only approved states (active, accepted, approved, edited, user_verified) are included. Pending, deleted, or forgotten entries are skipped.

The encryption key is read from these environment variables:

  • MEMACT_MEMORY_ENCRYPTION_KEY: 32-byte key as base64 or 64-char hex (required).
  • MEMACT_MEMORY_ENCRYPTION_KEY_ID: key identifier recorded in the envelope (optional, defaults to primary).
# Back up a memory store to an encrypted file
node ./scripts/memory-backup.mjs backup --store memory.json --out backup.json

# Restrict the export to specific states
node ./scripts/memory-backup.mjs backup --store memory.json --out backup.json --states approved,user_verified

# Restore a memory store from an encrypted backup
node ./scripts/memory-backup.mjs restore --in backup.json --out restored.json

These operations are also available programmatically through backup-restore.mjs.

Development

To install and run tests:

npm install
npm test

License

Memory is open source under the Apache 2.0 license.

About

Secure database storing user approved context and evidence.

Topics

Resources

License

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors