Skip to main content

Matriosha is a Python CLI for an encrypted, auditable AI context engine.

Project description

Matriosha

Encrypted, auditable, model-agnostic, local-first AI memory for agents.

Hold AI accountable. Own your data.

PyPI Python License

Install

Matriosha supports Python 3.11, 3.12, 3.13, and 3.14.

python3 -m pip install matriosha

If your environment already points pip to Python 3.11+, this also works:

pip install matriosha

Quickstart

Initialize an encrypted local vault:

matriosha --mode local vault init

Remember text:

matriosha --mode local memory remember "Important launch context" --tag launch

Remember a file:

matriosha --mode local memory remember --file ~/Documents/agent-notes/launch-context.md --tag launch

Search semantically:

matriosha --mode local memory search "What is the launch motto?"

Verify the audit trail and vault integrity:

matriosha audit verify
matriosha vault verify
matriosha vault verify --deep

Connect an agent locally

Generate a local-only token:

matriosha token generate my-agent --local --scope write --expires 30d

Connect a local desktop agent:

matriosha agent connect --local --name my-agent --kind desktop --token <token>

List local agents:

matriosha agent list --local

Treat generated tokens like passwords. Tokens are shown once.

Optional custom vault location

Set MATRIOSHA_HOME before initializing a vault if you want a predictable local memory directory:

export MATRIOSHA_HOME=./memory
matriosha --mode local vault init

Local and managed modes

Local mode is offline-first and does not require authentication.

Managed mode is optional and is designed for cloud-backed operational workflows such as login, workspace, sync, policy, quota, token workflows, and agent workflows.

matriosha auth login
matriosha --mode managed status

For local-only token and agent setup, use --local on token and agent commands.

Why Matriosha?

AI agents are gaining longer memories, but many memory systems are opaque, vendor-bound, or difficult to verify.

Matriosha keeps AI context outside the model provider and makes it:

  • Encrypted: vault data is protected with modern cryptography.
  • Auditable: local audit events and vault integrity can be verified.
  • Model-agnostic: memory is not tied to one AI vendor.
  • Local-first: start offline, then opt into managed workflows when needed.
  • Agent-ready: local, managed, desktop, server, and CI agent workflows are supported.

Security model

  • Argon2id passphrase hardening
  • AES-256-GCM authenticated encryption
  • SHA-256 and Merkle-root integrity checks
  • Local audit verification
  • Ed25519 signature-ready workflows
  • Local-only tokens for local agent access

Requirements

  • Python >=3.11,<3.15
  • A Unix-like shell for the examples, such as Terminal on macOS, Linux shells, or WSL/Git Bash on Windows

Agent setup guide

For interactive VM or local-machine setup, use the public JSON guide:

This guide is designed so AI agents can help users install, initialize, verify, and connect Matriosha safely.

Project links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matriosha-2.0.4.tar.gz (175.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matriosha-2.0.4-py3-none-any.whl (237.5 kB view details)

Uploaded Python 3

File details

Details for the file matriosha-2.0.4.tar.gz.

File metadata

  • Download URL: matriosha-2.0.4.tar.gz
  • Upload date:
  • Size: 175.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for matriosha-2.0.4.tar.gz
Algorithm Hash digest
SHA256 ac47831c1fb276a2ec03388cf048046e98862abb135f14be436a5bacec93c409
MD5 5925b4be7daeba317141979689335a0f
BLAKE2b-256 9c2c8a6f3c6deb197015844e11eb8e48ff684a74a9fdb70cfca08ab38a250153

See more details on using hashes here.

File details

Details for the file matriosha-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: matriosha-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 237.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for matriosha-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 673ebaefc58bd116650b2753b5c26615e38c115a57e9603c67e380b5712fe37f
MD5 18c0c4688a0e19009557ca3da369ca5d
BLAKE2b-256 099a06ac98e65389390dc7b7596450613d12f9db74b07266d7d4a74a99a276a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page