Skip to main content

mempill (Python)

Python bindings for the mempill AI-agent memory engine — temporal, contested-belief-aware fact storage for AI agents.

Install

pip install mempill

Prebuilt wheels are published for Python 3.11, 3.12, and 3.13 on Linux (x86_64, aarch64), macOS (x86_64, arm64), and Windows (x86_64). No Rust toolchain required to use the published wheel.

Build from source (contributors)

pip install maturin
maturin develop --release   # editable install into current venv

Usage

from mempill import open_in_memory, remember, recall

engine = open_in_memory()

remember(engine, "my-agent", "user", "city", "Berlin")
result = recall(engine, "my-agent", "user", "city")
print(result.as_str())        # "Berlin"
print(result.is_contested())  # False

Contested beliefs

When two conflicting claims exist and neither has been reconciled, recall signals a contest rather than silently returning one value:

from mempill import open_in_memory, remember, recall, RememberOptions

engine = open_in_memory()
remember(engine, "agent", "acme", "ceo", "Alice")
remember(engine, "agent", "acme", "ceo", "Bob")   # conflicts → Contested

result = recall(engine, "agent", "acme", "ceo")
if result.is_contested():
    for c in result.candidates:
        print(c.value, c.claim_ref)

Fact history

from mempill import open_in_memory, remember, recall, history, RememberOptions

engine = open_in_memory()
remember(engine, "agent", "acme", "ceo", "Alice",
         RememberOptions(valid_until="2024-01-01"))
remember(engine, "agent", "acme", "ceo", "Bob",
         RememberOptions(valid_from="2024-01-01"))

h = history(engine, "agent", "acme", "ceo")
for entry in h:
    # valid_from_display / valid_until_display render at the recorded precision
    # (e.g. "2024" for Year, "2024-01" for Month) — prefer them over the raw
    # valid_from / valid_until timestamps for honest display.
    print(entry.value, entry.status, entry.valid_from_display, entry.valid_until_display)

File-backed engine

from mempill import open_for_agent, remember, recall

# The database file is derived automatically as base_dir/agent_{agent_id}.db —
# there is no way to point two different agent_ids at the same file through this API.
engine = open_for_agent("/data", "my-agent")   # SQLite, persists across restarts
remember(engine, "my-agent", "user", "city", "Berlin")

Exceptions

MempillError (base)
  ValidationError   — invalid request fields
  NotFoundError     — claim/agent not found
  ConflictError     — write-authority violation
  StorageError      — database open/migration failure
  ConfigError       — invalid engine configuration
  InternalError     — unexpected engine failure

Type stubs

.pyi stubs and py.typed marker are included. The package is mypy and stubtest clean.

Full documentation

https://mempill.netlify.app — concepts, invariants, and the complete API reference.

Source: https://github.com/mempill-ai/mempill

License

Apache-2.0

Metadata

Release files for mempill 0.4.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 mempill 0.4.0
File Size Uploaded Provenance
mempill-0.4.0.tar.gz 427.9 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for mempill 0.4.0
File
mempill-0.4.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
mempill-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
mempill-0.4.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
mempill-0.4.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
mempill-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 10.6 MB

Release files / mempill-0.4.0.tar.gz

Download URL mempill-0.4.0.tar.gz
Size 427.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ba95fc548686f1484ab2ea88e85ef1924a0ca4ee0edd4b21ca3245610ae673e2
BLAKE2b-256 checksum
How to use checksums
40d2178fa88356834811890946b5a48a21e27ed29458d8b4b1bde8a8cd6bb5ff
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 Sep 20, 2026.

Transparency log

Release files / mempill-0.4.0-cp311-abi3-win_amd64.whl

Download URL mempill-0.4.0-cp311-abi3-win_amd64.whl
Size 1.9 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
53dd87017803b83e4c527869cf884b36acf074470d075199fb801b367bc84dbb
BLAKE2b-256 checksum
How to use checksums
2d898b6619d4bbc609a1d156f8812642667da4b6914c6bdf86b6c09f896cdbb5
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 Sep 20, 2026.

Transparency log

Release files / mempill-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mempill-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4f0e85ec3c035d94f184445b5d0c42d4d937369aebd21d978aa1f97bbc76c186
BLAKE2b-256 checksum
How to use checksums
347bf5f5244bc9e8d53e3c67b7a259dd5a5dbb435eceb77ea99d531755f9a5bd
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 Sep 20, 2026.

Transparency log

Release files / mempill-0.4.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL mempill-0.4.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.1 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
6a0f497aeb020863a85d643497aedc12de154dc74ad4dbf8056501b01afba580
BLAKE2b-256 checksum
How to use checksums
fe19cac2db2092aeab8d1c91d5b2bd906eacf250eafcdb8b69fff7f156b65a5c
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 Sep 20, 2026.

Transparency log

Release files / mempill-0.4.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL mempill-0.4.0-cp311-abi3-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
41c98bac958c66d7029350020c4e4bf5fab9fe16d3b12de41344f6f1af385e54
BLAKE2b-256 checksum
How to use checksums
8d9887522e36412bddda11d57cec1cd2f01b23cad7153f58c307d1adf46d7e28
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 Sep 20, 2026.

Transparency log

Release files / mempill-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL mempill-0.4.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 2.0 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b873c4f0fcbbe76a627b364b96f655df942db4f64264e5a0834aa6c61c24b4d1
BLAKE2b-256 checksum
How to use checksums
bfe23ddadc333d72483fb2aab3515e9a9c96accb8b3229943b8967606c52a782
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 Sep 20, 2026.

Transparency log

Security for mempill 0.4.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.

Full provenance

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

Select from 6 files

Attestation for mempill-0.4.0.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 Sep 20, 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.

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