Mem0 Integration for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Mem0 MCP or direct API to take notes, recall information, organize content, and automate productivity tasks through natural language.
Mem0 Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Supported Tools

Tools
Add member to projectAdds an existing user to a project (identified by `project id` within organization `org id`), assigning a valid system role.
Add new memory recordsStores new memory records from a list of messages, optionally inferring structured content; requires association via `agent id`, `user id`, `app id`, or `run id`.
Add organization memberAdds a new member, who must be a registered user, to an organization, assigning them a specific role.
Create a new agentCreates a new agent with a unique `agent id` and an optional `name`; additional metadata may be assigned by the system.
Create a new agent runCreates a new agent run in the mem0.
Create a new applicationCreates a new application, allowing metadata to be passed in the request body (not an explicit field in this action's request model); ensure `app id` is unique to avoid potential errors or unintended updates.
Create a new organization entryCreates a new organization entry using the provided name and returns its details.
Create a new userCreates a new user with the specified unique `user id` and supports associating `metadata` (not part of the request schema fields).
Create an export job with schemaInitiates an asynchronous job to export memories, structured by a schema provided in the request body and allowing optional filters.
Create memory entryLists/searches existing memory entries with filtering and pagination; critically, this action retrieves memories and does *not* create new ones, despite its name.
Create projectCreates a new project with a given name within an organization that must already exist.
Delete an organizationPermanently deletes an existing organization identified by its unique id.
Delete memory by idPermanently deletes a specific memory by its unique id; ensure the `memory id` exists as this operation is irreversible.
Delete entity by type and idCall to permanently and irreversibly hard-delete an existing entity (user, agent, app, or run) and all its associated data, using its type and id.
Delete memoriesDeletes memories matching specified filter criteria; omitting all filters may result in deleting all memories.
Delete memory batch with uuidsDeletes a batch of up to 1000 existing memories, identified by their uuids, in a single api call.
Delete projectPermanently deletes a specific project and all its associated data from an organization; this action cannot be undone and requires the project to exist within the specified organization.
Delete project memberRemoves an existing member, specified by username, from a project, immediately revoking their project-specific access; the user is not removed from the organization.
Export data based on filtersRetrieves memory export data, optionally filtered by various identifiers (e.
List organizationsRetrieves a summary list of organizations for administrative oversight; returns summary data (names, ids), not exhaustive details, despite 'detailed' in the name.
Fetch details of a specific organizationFetches comprehensive details for an organization using its `org id`; the `org id` must be valid and for an existing organization.
Get list of entity filtersRetrieves predefined filter definitions for entities (e.
Get entity by idFetches detailed information for an existing entity (user, agent, app, or run) identified by its type and unique id.
Get organization membersFetches a list of members for a specified, existing organization.
Get project detailsFetches comprehensive details for a specified project within an organization.
Get project membersRetrieves all members for a specified project within an organization.
Get projectsRetrieves all projects for a given organization `org id` to which the caller has access.
Get user memory statsRetrieves a summary of the authenticated user's memory activity, including total memories created, search events, and add events.
List entitiesRetrieves a list of entities, optionally filtered by organization or project (prefer `org id`/`project id` over deprecated `org name`/`project name`), noting results may be summaries and subject to limits.
Perform semantic search on memoriesSearches memories semantically using a natural language query (required if `only metadata based search` is false) and/or metadata filters.
Remove a member from the organizationRemoves a member, specified by their username, from an existing organization of which they are currently a member.
Retrieve all events for the currently logged in userRetrieves a paginated list of events for the authenticated user, filterable and paginable via url query parameters.
Retrieve entity-specific memoriesRetrieves all memories (e.
Retrieve list of memory eventsRetrieves a chronological list of all memory events (e.
Retrieve memory by idRetrieves a complete memory entry by its unique identifier; `memory id` must be valid and for an existing memory.
Retrieve memory history by idRetrieves the complete version history for an existing memory, using its unique `memory id`, to inspect its evolution or audit changes.
Retrieve memory listRetrieves a list of memories, supporting pagination and diverse filtering (e.
Search memories with filtersSemantically searches memories using a natural language query and mandatory structured filters, offering options to rerank results and select specific fields; any provided `org id` or `project id` must reference a valid existing entity.
Update memory batch with uuidUpdates text for up to 1000 memories in a single batch, using their uuids.
Update memory text contentUpdates the text content of an existing memory, identified by its `memory id`.
Update organization member roleUpdates the role of an existing member to a new valid role within an existing organization.
Update projectUpdates a project by `project id` within an `org id`, modifying only provided fields (name, description, custom instructions, custom categories); list fields are fully replaced (cleared by `[]`), other omitted/null fields remain unchanged.
Update project member roleUpdates the role of a specific member within a designated project, ensuring the new role is valid and recognized by the system.

Connect Mem0 MCP Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Mem0 tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Search for notes mentioning quarterly planning')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Connect Mem0 API Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio_openai
Install the Composio SDK

Initialize Composio and Create Tool Router Session

python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
Import and initialize Composio client, then create a Tool Router session

Execute Mem0 Tools via Tool Router with Your Agent

python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Summarize my notes from this week'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
Get tools from Tool Router session and execute Mem0 actions with your Agent

Why Use Composio?

AI Native Mem0 Integration

  • Supports both Mem0 MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Mem0 data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Mem0 access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Mem0
  • Scoped, least privilege access to Mem0 resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Mem0 with Composio?

Yes, Mem0 requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.