Simple 3-line integration for AI agents with memory - The most advanced memory API
Project description
Memory AI Python SDK
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
- Documentation: https://docs.memory-ai.com
- API Reference: https://api.memory-ai.com/docs
- GitHub: https://github.com/memory-ai/memory-ai
- Examples: https://github.com/memory-ai/examples
📄 License
MIT License - see LICENSE for details
Built with ❤️ by the Memory AI team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b9c3a751c51886a584f0493ade487782c94b329c4d06284053cf2b891ba6f60
|
|
| MD5 |
1733249618987c0bdec67ed95fe79197
|
|
| BLAKE2b-256 |
0b97be389ba95f389a92114edca307b1aa23999d10ae35431161241ef1a66bea
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19279dcd02b8b1b199215255e915c728c99e2df90d1caab9cad8f8156411b38c
|
|
| MD5 |
07025e8d19381682ba2d6df2f67ecb26
|
|
| BLAKE2b-256 |
ab8e744a2d9c9f679a82cb0aea0a9b943efc820fb9f42b89e7c62126f7bf73b0
|