Skip to main content

Memory AI Python SDK

PyPI version Python versions License

Official Python SDK for the AI Memory API - the only memory API with Reinforcement Learning.

🚀 Features

  • ✅ Complete API Coverage - All 50+ endpoints supported
  • ✅ Reinforcement Learning - Train AI agents to optimize memory operations
  • ✅ Temporal Knowledge Graphs - Track facts over time with bi-temporal model
  • ✅ Procedural Memory - Store and execute learned skills
  • ✅ Working Memory - Short-term context buffer for conversations
  • ✅ Memory Consolidation - Automatic compression of episodic memories
  • ✅ Async/Await - Full async support with httpx
  • ✅ Type Hints - Complete type annotations
  • ✅ Clean API - Pythonic, intuitive interface

📦 Installation

pip install memory-ai

🔥 Quick Start

import asyncio
from memory_ai import MemoryClient

async def main():
    # Initialize client
    client = MemoryClient(api_key="mem_sk_your_api_key")

    # Create a collection
    collection = await client.collections.create(
        name="My AI Agent",
        description="Personal memory for my chatbot"
    )

    # Store a memory
    memory = await client.memories.create(
        collection_id=collection["id"],
        content="User prefers dark mode and loves Python",
        importance=0.9
    )

    # Search memories
    results = await client.search(
        query="What programming language does user like?",
        collection_id=collection["id"],
        limit=5
    )

    print(results)

    # Close client
    await client.close()

asyncio.run(main())

📚 Complete Documentation

Visit https://docs.memory-ai.com for full documentation.

🔗 Links

📄 License

MIT License - see LICENSE for details


Built with ❤️ by the Memory AI team

Metadata

Release files for memory-ai-sdk 1.0.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 memory-ai-sdk 1.0.0
File Size Uploaded Provenance
memory_ai_sdk-1.0.0.tar.gz 10.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for memory-ai-sdk 1.0.0
File Interpreter ABI Platform
memory_ai_sdk-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / memory_ai_sdk-1.0.0.tar.gz

Download URL memory_ai_sdk-1.0.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2b9c3a751c51886a584f0493ade487782c94b329c4d06284053cf2b891ba6f60
BLAKE2b-256 checksum
How to use checksums
0b97be389ba95f389a92114edca307b1aa23999d10ae35431161241ef1a66bea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / memory_ai_sdk-1.0.0-py3-none-any.whl

Download URL memory_ai_sdk-1.0.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19279dcd02b8b1b199215255e915c728c99e2df90d1caab9cad8f8156411b38c
BLAKE2b-256 checksum
How to use checksums
ab8e744a2d9c9f679a82cb0aea0a9b943efc820fb9f42b89e7c62126f7bf73b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for memory-ai-sdk 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No 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