Catalog PyPI
PACKAGE EXPLORERView in registry

aimemoryapi

PyPI

Official Python SDK for AI Memory API

Versions collected1
Direct dependencies5From release 0.1.0
Last observed21 Oct, 11:17 UTC

README

Version 0.1.0 documentation

AI Memory Python SDK

Official Python SDK for AI Memory API — persistent memory for AI agents.

Installation

pip install aimemoryapi

Quick Start

from aimemoryapi import AiMemory

client = AiMemory()

# Register a user (starts 7-day free trial)
user = client.users.register(
    user_id="my_user_001",
    email="user@example.com",
)

# Create a project
project = client.projects.create(
    user_id="my_user_001",
    name="My AI Project",
)

# Start a session
session = client.sessions.start(
    user_id="my_user_001",
    project_id=project["id"],
)

# Add messages
client.messages.add(
    session_id=session["id"],
    role="user",
    content="Hello, AI!",
)

# Retrieve session context
full_session = client.sessions.get(session["id"])
print(f"Messages: {full_session['messageCount']}")

Resources

ResourceMethodAPI Endpoint
healthcheck()GET /health
metricsget()GET /metrics
tierslist()GET /api/tiers
usersregister()POST /api/register
trialstatus()GET /api/trial/status/:id
trialcheckout()POST /api/trial/checkout
projectscreate()POST /api/project
sessionsstart()POST /api/session
sessionsget()GET /api/session/:id
messagesadd()POST /api/message

Error Handling

from aimemoryapi.errors import (
    AuthenticationError,
    InvalidRequestError,
    APIError,
)

try:
    client.users.register(user_id="user_1")
except AuthenticationError as e:
    print(f"Auth error: {e}")
except InvalidRequestError as e:
    print(f"Invalid request: {e}")
except APIError as e:
    print(f"Server error: {e}")

Requirements

  • Python 3.8+
  • requests >= 2.31.0
  • pydantic >= 2.0.0

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.029 Apr 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:17 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:aa64f662f3feb8aa80b39356d9e82cb545d1517b990f63c9b0708ec41408b25e