Skip to main content

memcell

Official Python SDK for MemCell—persistent cognitive memory and reasoning substrate for AI coding agents.

Installation

pip install memcell
# or
uv add memcell
# or
poetry add memcell

Quickstart

Asynchronous Client (AsyncMemCell)

import asyncio
from memcell import AsyncMemCell

async def main():
    async with AsyncMemCell(api_key="mc_live_...") as memory:
        # Pre-flight recall before an agent acts
        recall = await memory.recall(
            namespace="acme/devops",
            query="how to deploy the canary pipeline"
        )
        print(recall.prompt_context)

        # In-flight scoped execution with automatic reinforcement
        devops = memory.scope("acme/devops", subject="pipeline:canary")
        result = await devops.wrap_execution(
            action="deploy_canary",
            external_ref="ci:run:1049",
            fn=lambda ctx: print("Deploying with context:", ctx.prompt_context)
        )

asyncio.run(main())

Synchronous Client (MemCell)

from memcell import MemCell

memory = MemCell(api_key="mc_live_...")

recall = memory.recall(
    namespace="acme/backend",
    query="database connection pool configuration"
)
for statement in recall.statements:
    print(f"[{statement.kind}] {statement.title} (confidence: {statement.confidence})")

OAuth 2.0 Machine-to-Machine (M2M)

from memcell import AsyncMemCell

memory = AsyncMemCell(
    client_id="client_xyz",
    client_secret="secret_xyz",
    scope="memory:read:acme/* memory:write:acme/backend"
)
# Automatically handles token exchange and proactively refreshes before expiration!

Rate Limiting & Resilience

from memcell import AsyncMemCell

memory = AsyncMemCell(
    api_key="mc_live_...",
    max_retries=3,
    on_rate_limit_warning=lambda warning, response: print(f"Warning: {warning}")
)
# Automatically performs jittered exponential backoff respecting server Retry-After!

License

Apache-2.0 © MemCell

Metadata

Release files for memcell 0.1.2

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

Source distribution (sdist)

Source distribution for memcell 0.1.2
File Size Uploaded Provenance
memcell-0.1.2.tar.gz 12.5 kB With provenance Details

Built distribution (wheel)

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

Total release size: 25.2 kB

Release files / memcell-0.1.2.tar.gz

Download URL memcell-0.1.2.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
74b6e9aa03175ad6825b050db74814b9a971c949abecfc8a82ef0c4be39c1e44
BLAKE2b-256 checksum
How to use checksums
c10f6ac83a79001c6746b4dc6cd75f4ec0113786508d385d9ab0f3d2a9cbd521
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 17, 2026.

Transparency log

Release files / memcell-0.1.2-py3-none-any.whl

Download URL memcell-0.1.2-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3f73d6a7dcbab04838534c6482f2c53abe03317b0585ffbc48f3ab3c71d485f
BLAKE2b-256 checksum
How to use checksums
d9268d042466930a2d01ec9b4653daaa29ea0ca42243b4d6d8ac04390ec14790
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 17, 2026.

Transparency log

Security for memcell 0.1.2

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 memcell-0.1.2.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 17, 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.

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