The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
docs(api-reference): align API docs & openapi.json with v3 spec (#5848)
Kartikf38608fb5061
diff --git a/docs/api-reference/memory/create-memory-export.mdx b/docs/api-reference/memory/create-memory-export.mdxindex ca6b5f156..baaeee3be 100644--- a/docs/api-reference/memory/create-memory-export.mdx+++ b/docs/api-reference/memory/create-memory-export.mdx@@ -4,4 +4,4 @@ description: "Submit an export job to create a structured memory export using aopenapi: post /v1/exports/----Submit a job to create a structured export of memories using a customizable Pydantic schema. This process may take some time to complete, especially if you're exporting a large number of memories. You can tailor the export by applying various filters (e.g., `user_id`, `agent_id`, `run_id`, or `session_id`) and by modifying the Pydantic schema to ensure the final data matches your exact needs.+Submit a job to create a structured export of memories using a customizable Pydantic schema. This process may take some time to complete, especially if you're exporting a large number of memories. You can tailor the export by applying various filters (e.g., `user_id`, `agent_id`, `app_id`, or `run_id`) and by modifying the Pydantic schema to ensure the final data matches your exact needs.diff --git a/docs/api-reference/memory/get-memory-export.mdx b/docs/api-reference/memory/get-memory-export.mdxindex 1f3364edf..55558a0a6 100644--- a/docs/api-reference/memory/get-memory-export.mdx+++ b/docs/api-reference/memory/get-memory-export.mdx@@ -4,4 +4,4 @@ description: "Retrieve the latest structured memory export after submitting an eopenapi: post /v1/exports/get----Retrieve the latest structured memory export after submitting an export job. You can filter the export by `user_id`, `run_id`, `session_id`, or `app_id` to get the most recent export matching your filters.\ No newline at end of file+Retrieve the latest structured memory export after submitting an export job. You can filter the export by `user_id`, `agent_id`, `app_id`, `run_id`, `created_at`, or `updated_at` to get the most recent export matching your filters.\ No newline at end of filediff --git a/docs/api-reference/memory/search-memories.mdx b/docs/api-reference/memory/search-memories.mdxindex 9ec4dd76c..3e0eb4618 100644--- a/docs/api-reference/memory/search-memories.mdx+++ b/docs/api-reference/memory/search-memories.mdx@@ -24,11 +24,11 @@ The `filters` object supports complex logical operations (AND, OR, NOT) and comp### Search parameter defaults-| Parameter | V1/V2 | V3 |-| --- | --- | --- |-| `top_k` | Supported (default 10) | Supported (1-1000, default 10) |-| `threshold` | No default | Default `0.1` (pass `0.0` to disable) |-| `rerank` | Default `true` | Default `false` (pass `true` to enable) |+| Parameter | Default |+| --- | --- |+| `top_k` | `10` (range 1–1000) |+| `threshold` | `0.1` (pass `0.0` to disable) |+| `rerank` | `false` (pass `true` to enable) |<CodeGroup>```python Platform API Examplediff --git a/docs/api-reference/organizations-projects.mdx b/docs/api-reference/organizations-projects.mdxindex c1cc0c6b2..3731be514 100644--- a/docs/api-reference/organizations-projects.mdx+++ b/docs/api-reference/organizations-projects.mdx@@ -14,7 +14,7 @@ Organizations and projects are **optional** features. You can use Mem0 without t## Key Capabilities-- **Multi-org/project Support**: Specify organization and project when initializing the Mem0 client to attribute API usage appropriately+- **Multi-org/project Support**: Organization and project are resolved automatically from your API key via `/v1/ping/` — no org or project params are accepted by `MemoryClient.__init__`. Use a project-specific API key to target a particular project.- **Member Management**: Control access to data through organization and project membership- **Access Control**: Only members can access memories and data within their organization/project scope- **Team Isolation**: Maintain data separation between different teams and projects for secure collaboration@@ -79,7 +79,7 @@ new_project = client.project.create(### Update Project Settings-Modify project configuration including custom instructions, categories, and language preferences:+Modify project configuration including custom instructions, categories, language preferences, retrieval criteria, and memory decay:```python# Update project with custom categories@@ -98,6 +98,17 @@ client.project.update(# Use the input language for memory storage and retrievalclient.project.update(multilingual=True)+# Set retrieval criteria to control which memories are surfaced in search+client.project.update(+ retrieval_criteria=[+ {"name": "relevance", "description": "How directly relevant this memory is to the current topic or user query", "weight": 3},+ {"name": "access_frequency", "description": "How often this memory has been accessed or surfaced recently", "weight": 1}+ ]+)++# Enable Memory Decay (boosts recently-accessed memories at search time)+client.project.update(decay=True)+# Update multiple settings at onceclient.project.update(custom_instructions="...",@@ -109,6 +120,34 @@ client.project.update()```+#### Set Retrieval Criteria++`retrieval_criteria` is a per-project list of dictionaries (`List[Dict]`) that shapes how memories are ranked and filtered during search. Each dictionary has three fields: `name` (identifier), `description` (interpreted by the LLM to score each memory), and `weight` (relative influence on the final score). Use this to focus retrieval on intent-aligned or signal-specific memories:++```python+client.project.update(+ retrieval_criteria=[+ {+ "name": "joy",+ "description": "Measure the intensity of positive emotions such as happiness, excitement, or amusement expressed in the memory. A higher score reflects greater joy.",+ "weight": 3+ },+ {+ "name": "curiosity",+ "description": "Assess the extent to which the memory reflects inquisitiveness or interest in exploring new information. A higher score reflects stronger curiosity.",+ "weight": 2+ },+ {+ "name": "access_frequency",+ "description": "How often this memory has been accessed or surfaced recently.",+ "weight": 1+ }+ ]+)+```++Pass an empty list to clear all criteria and restore default retrieval behaviour.+#### Toggle Memory Decay`decay` is a per-project boolean that turns on [Memory Decay](/platform/features/memory-decay) — a search-time ranking bias that reinforces recently-accessed memories and gently dampens stale ones. The flag is `false` by default; set it via the same project-update endpoint:diff --git a/docs/openapi.json b/docs/openapi.jsonindex 3904ce363..3953c3aaa 100644--- a/docs/openapi.json+++ b/docs/openapi.json@@ -4883,8 +4883,7 @@"items": {"type": "object","required": [- "memory_id",- "text"+ "memory_id"],"properties": {"memory_id": {@@ -4895,6 +4894,11 @@"text": {"type": "string","description": "The new text content for the memory"+ },+ "metadata": {+ "type": "object",+ "additionalProperties": true,+ "description": "Updated metadata to associate with the memory."}}},@@ -4970,18 +4974,27 @@"schema": {"type": "object","properties": {- "memory_ids": {+ "memories": {"type": "array","items": {- "type": "string",- "format": "uuid"+ "type": "object",+ "properties": {+ "memory_id": {+ "type": "string",+ "format": "uuid",+ "description": "The unique identifier of the memory to delete."+ }+ },+ "required": [+ "memory_id"+ ]},"maxItems": 1000,- "description": "Array of memory IDs to delete."+ "description": "Array of memory objects to delete."}},"required": [- "memory_ids"+ "memories"]}}