Skip to main content
Mem0 logo

Overview

Add Mem0 to any ModuleX agent or workflow. Persistent agent memory management against the Mem0 REST API (api.mem0.ai) — add, search, and retrieve long-term memories so AI agents can recall user context, preferences, and prior conversations across sessions.
Categories: AI & Machine Learning · Knowledge Base · Agentic · Auth: API Key · Actions: 3

Authentication

API Key Authentication

Authenticate using your Mem0 API key
1

Step 1

Go to https://app.mem0.ai and sign up or log in
2

Step 2

Open the dashboard and navigate to the ‘API Keys’ section
3

Step 3

Create a new API key or copy your existing one
4

Step 4

Paste the API key below

Required Credentials

FieldDescriptionRequiredFormat
Mem0 API KeyYour Mem0 API key from app.mem0.aiYes-

Available Actions

Parameters

user_id
string
required
User ID associated with the memory (e.g., “user_123”, “alice@example.com”)
messages
array
required
Array of message objects with role and content (e.g., [{“role”: “user”, “content”: “Hello”}])

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Message"
    },
    "status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Status"
    },
    "event_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Event Id"
    }
  },
  "required": [
    "success"
  ],
  "title": "AddMemoriesOutput",
  "type": "object"
}

Parameters

user_id
string
required
User ID to retrieve memories for (e.g., “user_123”, “alice@example.com”)
memory_id
string
Specific memory ID to retrieve (e.g., “mem_abc123”)
start_date
string
Start date for filtering by created_at (e.g., “2024-01-15”)
end_date
string
End date for filtering by created_at (e.g., “2024-12-31”)
limit
integer
Maximum number of results to return (e.g., 10, 50, 100) (Default: 10)
page
integer
Page number to retrieve for paginated list results (Default: 1)

Response

{
  "$defs": {
    "MemoryRecord": {
      "additionalProperties": false,
      "description": "A single memory object returned by ``get_memories``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "memory": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Memory"
        },
        "user_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "User Id"
        },
        "agent_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Agent Id"
        },
        "app_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "App Id"
        },
        "run_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Run Id"
        },
        "hash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Hash"
        },
        "metadata": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Metadata"
        },
        "categories": {
          "items": {
            "type": "string"
          },
          "title": "Categories",
          "type": "array"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created At"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Updated At"
        }
      },
      "title": "MemoryRecord",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "memories": {
      "items": {
        "$ref": "#/$defs/MemoryRecord"
      },
      "title": "Memories",
      "type": "array"
    },
    "ids": {
      "items": {
        "type": "string"
      },
      "title": "Ids",
      "type": "array"
    },
    "count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Count"
    },
    "next": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Next"
    },
    "previous": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Previous"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetMemoriesOutput",
  "type": "object"
}

Limits & Quotas

  • Rate limits and quotas depend on your Mem0 plan; see https://docs.mem0.ai for current tiers.
  • add_memories is processed asynchronously — the response returns a status (initially PENDING) and an event_id for polling progress, not the stored memory records themselves.
  • Error model: non-2xx responses and timeouts are caught and returned as success=False + error rather than raising. Plan for retries on the agent side based on the error string.

Airweave

Amazon Alexa

Browser Use