Skip to main content

Synapse Memory Python SDK

Python distribution for the Synapse Memory engine. The distribution name is synapse-memory-engine; the import package is synapse_memory.

Features

  • Encrypted SQLite Storage: Fernet AES-128-CBC with HMAC-SHA256 authenticated encryption at rest.
  • Dynamic Programming Knapsack Packing: Exact 0/1 Knapsack optimizer for packing high-relevance memories into strict token envelopes.
  • Ebbinghaus Decay Engine: Continuous temporal decay with positive/negative reinforcement factors.
  • Semantic Deduplication: Dual lexical Jaccard and dense cosine similarity detection to prevent node fragmentation.
  • Hybrid Retrieval: BM25 sparse lexical ranking fused with dense vector embeddings via Reciprocal Rank Fusion (RRF).
  • Framework Integrations: True drop-in adapters for LangChain (BaseMemory) and LlamaIndex (BaseMemory).

Installation

pip install synapse-memory-engine          # from PyPI
# or, from a checkout of this repository:
pip install -e .

REST client quick start

Use SynapseClient when connecting an application to a running Synapse API:

from synapse_memory import SynapseClient, SynapseError

with SynapseClient(
    "http://127.0.0.1:8008",
    api_key="syn_live_your_key",
    tenant_id="your-tenant",
) as client:
    created = client.create_memory("Customer selected the annual plan.", category="fact")
    result = client.retrieve("Which plan did the customer select?")
    print(created.id, result.fused_context)

The client automatically retries idempotent GET/HEAD/OPTIONS requests and honours Retry-After. It does not automatically replay POST requests (including /query, which updates access metadata) after an ambiguous failure; callers should reconcile the operation before manually retrying, or provide their own idempotency mechanism.

Testing

From the repository root:

pip install -e "sdk/python[pgvector,langchain,llamaindex,dev]"
PYTHONPATH=sdk/python pytest sdk/python/tests -v

Database-gated tests require a disposable PostgreSQL/pgvector database and explicitly documented environment flags. Passing the offline suite alone is not production verification.

Licence: proprietary. Installation does not grant unrestricted usage or deployment rights; obtain written permission under ../../LICENSE before using this package outside the permissions granted by the copyright holder.

Metadata

Release files for synapse-memory-engine 1.3.1

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

Source distribution (sdist)

Source distribution for synapse-memory-engine 1.3.1
File Size Uploaded Provenance
synapse_memory_engine-1.3.1.tar.gz 134.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for synapse-memory-engine 1.3.1
File Interpreter ABI Platform
synapse_memory_engine-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 228.5 kB

Release files / synapse_memory_engine-1.3.1.tar.gz

Download URL synapse_memory_engine-1.3.1.tar.gz
Size 134.2 kB
Tags Source
SHA-256 checksum
How to use checksums
39fdfd9a2eabdf38a131db1f7544ae3d1e452b8352e6682c892d3756b9823042
BLAKE2b-256 checksum
How to use checksums
de4b61e927b7b1ec3488adb975e47dafa3e8d840ba951b7b03333e59a7f8d29d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / synapse_memory_engine-1.3.1-py3-none-any.whl

Download URL synapse_memory_engine-1.3.1-py3-none-any.whl
Size 94.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02af3f9ec755b13901ac76e136ed686b27794882e0a451e31645819dc3c1254b
BLAKE2b-256 checksum
How to use checksums
6bdcd870af3743eb9180d8c72e191b92bf22cc2d6fe7b5feea1c30c3be8e4604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for synapse-memory-engine 1.3.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for synapse_memory_engine-1.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files Full provenance

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