Skip to main content

MemoraEU SDK — Python

🇬🇧 English | 🇫🇷 Français


English

Zero-knowledge persistent memory layer for AI agents — official Python SDK

MemoraEU gives your agents a persistent, encrypted memory. All content is encrypted client-side with AES-256-GCM before reaching the server — the server never sees your plaintext. Compatible with any Python project, sync or async.

Installation

pip install memoraeu

Requires Python ≥ 3.11. Dependencies: httpx, cryptography.

Quick start

1. Get your credentials

  1. Create an account at app.memoraeu.com
  2. Settings → Encryption keys → copy MEMORAEU_SALT
  3. Settings → API keys → create a key → copy MEMORAEU_API_KEY (meu-sk-…)
  4. secret = your MemoraEU login password

2. Sync client

from memoraeu import MemoraEU

client = MemoraEU(
    api_url="https://api.memoraeu.com",
    api_key="meu-sk-...",        # API key (HTTP auth)
    secret="your-password",      # MemoraEU password (local key derivation)
    salt="your-kdf-salt",        # account-unique salt (from Settings)
)

# Store a memory
memory = client.remember(
    "Philippe prefers Python and FastAPI",
    category="prefs",
    tags=["python", "stack"],
)
print(memory.id)  # mem_01HV...

# Semantic search
results = client.recall("tech preferences", limit=3)
for r in results:
    print(f"[{round(r.score*100)}%] {r.memory.content}")

# List memories
memories = client.list_memories(category="prefs", limit=20)

# Typed memory (decision), replacing an earlier one
adr = client.remember("Stripe over Paddle", mtype="decision", title="Billing provider",
                      fields={"decision": "Stripe"}, supersedes=["a1b2c3d4"])
print(adr.seq)  # ADR number

# List categories
categories = client.list_categories()

# Delete
client.forget(memory.id)

3. Async client

from memoraeu import AsyncMemoraEU

async with AsyncMemoraEU(
    api_url="https://api.memoraeu.com",
    api_key="meu-sk-...",
    secret="your-password",
    salt="your-kdf-salt",
) as client:
    memory = await client.remember("...")
    results = await client.recall("...")

Understanding the parameters

Parameter Role
api_key HTTP authentication — Bearer token sent with every request (meu-sk-…)
secret Your MemoraEU password — used as PBKDF2 input to derive the encryption key locally
salt Account-unique KDF salt generated by the server — combined with secret to produce the AES key

Zero-knowledge: the encryption key is derived on your machine using PBKDF2(secret, salt, 210 000 iterations). The server receives only the encrypted ciphertext — it cannot read it even if compromised.

⚠️ If you lose your secret or salt, your encrypted memories are unrecoverable.

Method reference

Method Description
remember(content, category?, tags?, scope?) Store a memory (client-side encrypted)
recall(query, limit=3, category?, scope?) Semantic search in natural language
forget(memory_id) Delete a memory by its ID
list_memories(category?, limit=20, scope?) List recent memories
list_categories() Categories sorted by usage

Error handling

from memoraeu import APIError, CryptoError, ConnectionError

try:
    client.remember("...")
except APIError as e:
    print(e.status_code, str(e))   # e.g. 401, 409
except CryptoError as e:
    print("Encryption error:", e)
except ConnectionError as e:
    print("API unreachable:", e)

Self-hosting

client = MemoraEU(
    api_url="http://localhost:8000",
    api_key="meu-sk-...",
    secret="...",
    salt="...",
)

License

MIT © 2026 MemoraEU — ISQUARECUBE SAS


Français

Couche mémoire persistante zero-knowledge pour agents IA — SDK Python officiel

MemoraEU donne à vos agents une mémoire persistante et chiffrée. Tout le contenu est chiffré côté client en AES-256-GCM avant d'atteindre le serveur — le serveur ne voit jamais le texte en clair. Compatible avec tout projet Python, sync ou async.

Installation

pip install memoraeu

Nécessite Python ≥ 3.11. Dépendances : httpx, cryptography.

Démarrage rapide

1. Obtenir vos clés

  1. Créez un compte sur app.memoraeu.com
  2. Paramètres → Clés de chiffrement → copiez MEMORAEU_SALT
  3. Paramètres → Clés API → créez une clé → copiez MEMORAEU_API_KEY (meu-sk-…)
  4. secret = votre mot de passe de connexion MemoraEU

2. Client sync

from memoraeu import MemoraEU

client = MemoraEU(
    api_url="https://api.memoraeu.com",
    api_key="meu-sk-...",        # clé API (authentification HTTP)
    secret="votre-mot-de-passe", # mot de passe MemoraEU (dérivation de clé locale)
    salt="votre-kdf-salt",       # salt unique à votre compte (depuis les Paramètres)
)

# Mémoriser
memory = client.remember(
    "Philippe préfère Python et FastAPI",
    category="prefs",
    tags=["python", "stack"],
)
print(memory.id)  # mem_01HV...

# Recherche sémantique
results = client.recall("préférences tech", limit=3)
for r in results:
    print(f"[{round(r.score*100)}%] {r.memory.content}")

# Lister les mémoires
memories = client.list_memories(category="prefs", limit=20)

# Mémoire typée (décision), qui en remplace une autre
adr = client.remember("Stripe plutôt que Paddle", mtype="decision", title="Fournisseur de facturation",
                      fields={"decision": "Stripe"}, supersedes=["a1b2c3d4"])
print(adr.seq)  # numéro ADR

# Lister les catégories
categories = client.list_categories()

# Supprimer
client.forget(memory.id)

3. Client async

from memoraeu import AsyncMemoraEU

async with AsyncMemoraEU(
    api_url="https://api.memoraeu.com",
    api_key="meu-sk-...",
    secret="votre-mot-de-passe",
    salt="votre-kdf-salt",
) as client:
    memory = await client.remember("...")
    results = await client.recall("...")

Comprendre les paramètres

Paramètre Rôle
api_key Authentification HTTP — Bearer token envoyé à chaque requête (meu-sk-…)
secret Votre mot de passe MemoraEU — utilisé comme entrée PBKDF2 pour dériver la clé de chiffrement localement
salt Salt KDF unique à votre compte, généré par le serveur — combiné avec secret pour produire la clé AES

Zero-knowledge : la clé de chiffrement est dérivée sur votre machine avec PBKDF2(secret, salt, 210 000 itérations). Le serveur reçoit uniquement le contenu chiffré — il ne peut pas le lire même s'il est compromis.

⚠️ Si vous perdez votre secret ou votre salt, vos mémoires chiffrées sont irrécupérables.

Référence des méthodes

Méthode Description
remember(content, category?, tags?, scope?) Mémorise une information (chiffrée côté client)
recall(query, limit=3, category?, scope?) Recherche sémantique en langage naturel
forget(memory_id) Supprime une mémoire par son ID
list_memories(category?, limit=20, scope?) Liste les mémoires récentes
list_categories() Catégories triées par usage

Gestion des erreurs

from memoraeu import APIError, CryptoError, ConnectionError

try:
    client.remember("...")
except APIError as e:
    print(e.status_code, str(e))  # ex: 401, 409
except CryptoError as e:
    print("Problème de chiffrement :", e)
except ConnectionError as e:
    print("API inaccessible :", e)

Auto-hébergement

client = MemoraEU(
    api_url="http://localhost:8000",
    api_key="meu-sk-...",
    secret="...",
    salt="...",
)

Liens

Licence

MIT © 2026 MemoraEU — ISQUARECUBE SAS

Metadata

Release files for memoraeu 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for memoraeu 0.2.0
File Size Uploaded Provenance Actions
memoraeu-0.2.0.tar.gz 13.0 kB Without provenance Details for memoraeu-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for memoraeu 0.2.0
File Interpreter ABI Platform Actions
memoraeu-0.2.0-py3-none-any.whl Python 3 none any Details for memoraeu-0.2.0-py3-none-any.whl

Total release size: 25.7 kB

Release files / memoraeu-0.2.0.tar.gz

Download URL memoraeu-0.2.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
270f8dd45c41b9577dc0d1022ffa7d01befefc2e17e3fd2097a254bf0ef11f2f
BLAKE2b-256 checksum
How to use checksums
40642007ca5a3fe25dae4b94cf982cc0cd27534bb5427d5bb3a11f61f862cc18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / memoraeu-0.2.0-py3-none-any.whl

Download URL memoraeu-0.2.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72b8b84cccd210f06ebbefec1e27ec32af03d5a29342c709b432bbea6a42f80e
BLAKE2b-256 checksum
How to use checksums
7b79ed7e5a91a8afdcd35c9e0bbec7ae28d77fb26838cc5b310fceee0d1853ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for memoraeu 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page