Skip to main content

Simple 3-line integration for AI agents with memory - The most advanced memory API

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memory_ai_sdk-1.0.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memory_ai_sdk-1.0.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file memory_ai_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: memory_ai_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for memory_ai_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2b9c3a751c51886a584f0493ade487782c94b329c4d06284053cf2b891ba6f60
MD5 1733249618987c0bdec67ed95fe79197
BLAKE2b-256 0b97be389ba95f389a92114edca307b1aa23999d10ae35431161241ef1a66bea

See more details on using hashes here.

File details

Details for the file memory_ai_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: memory_ai_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for memory_ai_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19279dcd02b8b1b199215255e915c728c99e2df90d1caab9cad8f8156411b38c
MD5 07025e8d19381682ba2d6df2f67ecb26
BLAKE2b-256 ab8e744a2d9c9f679a82cb0aea0a9b943efc820fb9f42b89e7c62126f7bf73b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page