Skip to main content
The memorymachines package is the current Python SDK for the Engramme API. Use it from notebooks, scripts, backend services, and internal tools.

Installation

The SDK source lives in MemoryMachinesInc/memorymachines_sdk_v0.

Quick Start

Memorization starts asynchronous LMM training. A successful memorize response means the content was accepted and training started; the content may not be immediately recallable.

Authentication

API key resolution order:
  1. Explicit api_key passed to MemoryMachines(...)
  2. ENGRAMME_API_KEY
  3. MM_API_KEY
  4. Active profile in ~/.memorymachines/config.yaml
You can also save and manage a local key with the CLI:
Local credentials are stored in ~/.memorymachines/config.yaml. Override that path with MM_CONFIG_PATH or ENGRAMME_CONFIG_PATH.

Methods

MemoryMachines(...)

MemoryClient and Engramme are aliases for MemoryMachines.
str
API key to use directly. If omitted, the SDK checks environment variables and local profiles.
str
Local profile name from ~/.memorymachines/config.yaml.
str
API base URL.

memorize(...)

Submit a document for LMM training.
str | pathlib.Path | bytes
required
File path, pathlib.Path, or raw bytes to train on.
str
Name associated with the memories.
str
default:"text"
Type of content, such as text, email, pdf, github, or google_meets.
str
Optional stable identifier for the submitted item.
str
Filename to send when file is bytes.

recall(...)

Retrieve memories by semantic similarity.
str
required
Query text, max 1,000 characters.
str
Optional source filter.

ask(...)

Ask for an AI-generated response based on memories.

feedback(...)

Rate a memory for a specific query.

health_check()

Check API status.
Returns True when GET /v1/health returns HTTP 200.

Error Handling

Next Steps

API Reference

Full REST API documentation.

Authentication

API key best practices.