Skip to main content

Official Python SDK for MemoryLayer

Project description

memorylayerai

Official Python SDK for MemoryLayer - Add memory capabilities to your AI applications.

Installation

pip install memorylayerai

Quick Start

from memorylayerai import MemoryLayerClient, CreateMemoryRequest
import os

client = MemoryLayerClient(
    api_key=os.environ['MEMORYLAYER_API_KEY']
)

# Add a memory
memory = client.memories.add(CreateMemoryRequest(
    content='User prefers dark mode',
    metadata={'category': 'preferences'},
    project_id='proj_abc123'
))

# Search memories
results = client.search.search(
    query='user preferences',
    project_id='proj_abc123'
)

print(results)

Async Support

from memorylayerai import AsyncMemoryLayerClient

async_client = AsyncMemoryLayerClient(
    api_key=os.environ['MEMORYLAYER_API_KEY']
)

# Use async methods
memory = await async_client.memories.add(...)

Documentation

For full documentation, visit https://docs.memorylayer.com

License

MIT

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

memorylayerai-0.1.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

memorylayerai-0.1.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file memorylayerai-0.1.1.tar.gz.

File metadata

  • Download URL: memorylayerai-0.1.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for memorylayerai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 037bf5cd83e5906f45c7405e8d94f4dd89f5ff81c1cbdaa2c840249d39d6a661
MD5 d5b5533578aa6f559c84f65709a488a4
BLAKE2b-256 7b0dda76ceea6f28ddbff5e8e644cf11eb1fe36a6082ddc7f6412352848d0aea

See more details on using hashes here.

File details

Details for the file memorylayerai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: memorylayerai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for memorylayerai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd92518f79b8c052a0adc8a9bc0aa15b08c37d145dbb9f4f21b6b3ae463e2351
MD5 1851ec32e5317c94db6dc9407d8d6aca
BLAKE2b-256 360a327a77f3525433d60200f8b3b82389b87a3647b14651c298e723fcb41b40

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