Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.memmachine.ai/llms.txt

Use this file to discover all available pages before exploring further.

The client.memories namespace provides methods for storing and searching “Episodic” memories—the raw stream of interactions and events associated with a project.

Ingestion

add

Adds a new interaction or observation to the episodic memory store.
client.memories.add(
    org_id="my_org",
    project_id="my_proj",
    content="The user prefers Python over JavaScript.",
    role="user",
    metadata={"source": "chat_v3"}
)
ParameterTypeDefaultDescription
org_idstrRequiredOrganization identifier.
project_idstrRequiredProject identifier.
contentstrRequiredThe actual text of the memory episode.
rolestr"user"The role of the speaker (e.g., "user", "assistant", "system").
producerstrNoneIdentifier of the entity that produced the message.
produced_forstrNoneIdentifier of the entity the message was intended for.
timestampstrNoneISO-8601 timestamp string. Defaults to current server time.
metadatadictNoneArbitrary key-value pairs for filtering and categorization.

Performs a hybrid semantic search across the episodic memory store to find relevant context.
results = client.memories.search(
    org_id="my_org",
    project_id="my_proj",
    query="What are the user's coding preferences?",
    limit=5,
    expand_context=2,
    score_threshold=0.65,
    agent_mode=True,
    filter_dict={"source": "chat_v3"},
)
ParameterTypeDefaultDescription
org_idstrRequiredOrganization identifier.
project_idstrRequiredProject identifier.
querystrRequiredThe natural language search query.
limitint10Maximum number of results to return.
expand_contextint0Number of neighboring episodic entries to include around each long-term match.
score_thresholdfloatNoneMinimum episodic retrieval score to keep. Not supported when agent_mode=True.
agent_modeboolFalseWhether to use retrieval-agent search orchestration.
filter_dictdictNoneKey-value filters to apply to the search (metadata matching).
timeoutintNoneRequest timeout in seconds. Uses client default if omitted.

Management

list_episodic

Retrieves a paginated list of raw memory episodes.
ParameterTypeDefaultDescription
org_idstrRequiredOrganization identifier.
project_idstrRequiredProject identifier.
limitint50Number of items per page.
offsetint0Number of items to skip.

delete_all_episodic

Permanently removes all episodic memories from a specific project.
client.memories.delete_all_episodic(org_id="my_org", project_id="my_proj")

Configuration

configure_episodic_memory

Adjusts the behavior of episodic memory for a project at runtime.
ParameterTypeDefaultDescription
enabledboolTrueWhether to allow episodic memory ingestion/retrieval.
long_term_memory_enabledboolTrueEnable vector-based retrieval for older memories.
short_term_memory_enabledboolTrueEnable retrieval of the most recent interactions.

Advanced semantic structures like Sets, Categories, and Tags have been moved to the client.semantic namespace to provide better structural clarity.