# Mem0 CLI for AI Agents

```json
{
  "title": "Mem0 CLI for AI Agents",
  "toolkit": "Mem0",
  "toolkit_slug": "mem0",
  "framework": "CLI",
  "framework_slug": "cli",
  "url": "https://composio.dev/toolkits/mem0/framework/cli",
  "markdown_url": "https://composio.dev/toolkits/mem0/framework/cli.md",
  "updated_at": "2026-05-06T08:19:49.118Z"
}
```

## Introduction

CLIs are eating MCPs. The industry is converging on the very same idea. MCPs for all their merit can be token hungry, slow, and unreliable for complex tool chaining. However, coding agents have become incredibly good at working with CLIs, and in fact they are far more comfortable working with CLI tools than MCP.
With Composio's Universal CLI, your coding agents can talk to over 1000+ SaaS applications. With Mem0, agents can store meeting notes from today's call, export all project memories as csv, add new user to our team space, and more — all without worrying about authentication.
This guide walks you through Composio Universal CLI and explains how you can connect it with coding agents like Claude Code, Codex, OpenCode, etc, for end-to-end Mem0 automation.

## Also integrate Mem0 with

- [ChatGPT](https://composio.dev/toolkits/mem0/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/mem0/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/mem0/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/mem0/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/mem0/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/mem0/framework/codex)
- [Cursor](https://composio.dev/toolkits/mem0/framework/cursor)
- [VS Code](https://composio.dev/toolkits/mem0/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/mem0/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/mem0/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/mem0/framework/hermes-agent)
- [Google ADK](https://composio.dev/toolkits/mem0/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/mem0/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/mem0/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/mem0/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/mem0/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/mem0/framework/crew-ai)

## TL;DR

The idea behind building the universal CLI is to give agents a single command interface to interact with all your external applications. Here's what you'll get with it:
- Agent-friendly: Coding agents like Claude Code, Codex, and OpenCode can use CLI tools natively — no MCP setup required.
- Authentication handled: Connect once via OAuth or API Key, and all CLI commands work with your credentials automatically.
- Tool discovery: Search, inspect, and execute 20,000+ tools across 1000+ apps from one interface.
- Trigger support: Use triggers to listen for events across your apps, powered by real-time webhooks or polling under the hood.
- Type generation: Generate typed schemas for autocomplete and type safety in your projects.

## Connect Mem0 to CLI

### Prerequisites
Install the Composio CLI, authenticate, and initialize your project:

```bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Authenticate with Composio
composio login
```

## What is the Mem0 MCP server, and what's possible with it?

The Mem0 MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Mem0 account. It provides structured and secure access to your notes, projects, and organizational knowledge, so your agent can perform actions like searching memories, managing users, adding content, and orchestrating agent runs on your behalf.
- AI-powered memory search and recall: Let your agent search and retrieve existing memory entries using advanced filters and pagination to surface just the right note or piece of information.
- Automated content and note creation: Have your agent store new memory records from conversations, meetings, or tasks—ensuring nothing slips through the cracks.
- Collaboration and organization management: Direct your agent to add members to projects or organizations, assign roles, and keep team structures up to date.
- Agent and application orchestration: Enable your agent to create new AI agents, initiate agent runs, and manage applications for custom workflows and automation.
- Structured knowledge export and reporting: Ask your agent to initiate export jobs with specific schemas and filters, so you can back up or analyze your stored knowledge on demand.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `MEM0_ADD_MEMBER_TO_PROJECT` | Add member to project | Adds an existing user to a project (identified by `project id` within organization `org id`), assigning a valid system role. |
| `MEM0_ADD_NEW_MEMORY_RECORDS` | Add new memory records | Stores new memory records from a list of messages, optionally inferring structured content; requires association via `agent id`, `user id`, `app id`, or `run id`. |
| `MEM0_ADD_ORGANIZATION_MEMBER` | Add organization member | Adds a new member, who must be a registered user, to an organization, assigning them a specific role. |
| `MEM0_CREATE_A_NEW_AGENT` | Create a new agent | Creates a new agent with a unique `agent id` and an optional `name`; additional metadata may be assigned by the system. |
| `MEM0_CREATE_A_NEW_AGENT_RUN` | Create a new agent run | Creates a new agent run in the mem0.ai system. |
| `MEM0_CREATE_A_NEW_APPLICATION` | Create a new application | Creates 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. |
| `MEM0_CREATE_A_NEW_ORGANIZATION_ENTRY` | Create a new organization entry | Creates a new organization entry using the provided name and returns its details. |
| `MEM0_CREATE_A_NEW_USER` | Create a new user | Creates a new user with the specified unique `user id` and supports associating `metadata` (not part of the request schema fields). |
| `MEM0_CREATE_AN_EXPORT_JOB_WITH_SCHEMA` | Create an export job with schema | Initiates an asynchronous job to export memories, structured by a schema provided in the request body and allowing optional filters. |
| `MEM0_CREATE_MEMORY_ENTRY` | Create memory entry | Lists/searches existing memory entries with filtering and pagination; critically, this action retrieves memories and does *not* create new ones, despite its name. |
| `MEM0_CREATE_PROJECT` | Create project | Creates a new project with a given name within an organization that must already exist. |
| `MEM0_DELETE_AN_ORGANIZATION` | Delete an organization | Permanently deletes an existing organization identified by its unique id. |
| `MEM0_DELETE_A_SPECIFIC_MEMORY_BY_ID` | Delete memory by id | Permanently deletes a specific memory by its unique id; ensure the `memory id` exists as this operation is irreversible. |
| `MEM0_DELETE_ENTITY_BY_TYPE_AND_ID` | Delete entity by type and id | Call to permanently and irreversibly hard-delete an existing entity (user, agent, app, or run) and all its associated data, using its type and id. |
| `MEM0_DELETE_MEMORIES_ENDPOINT` | Delete memories | Deletes memories matching specified filter criteria; omitting all filters may result in deleting all memories. required: at least one of agent id, user id, app id, or run id must be provided. |
| `MEM0_DELETE_MEMORY_BATCH_WITH_UUIDS` | Delete memory batch with uuids | Deletes a batch of up to 1000 existing memories, identified by their uuids, in a single api call. |
| `MEM0_DELETE_PROJECT` | Delete project | Permanently 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. |
| `MEM0_DELETE_PROJECT_MEMBER` | Delete project member | Removes an existing member, specified by username, from a project, immediately revoking their project-specific access; the user is not removed from the organization. |
| `MEM0_EXPORT_DATA_BASED_ON_FILTERS` | Export data based on filters | Retrieves memory export data, optionally filtered by various identifiers (e.g., user id); without filters, it may return all accessible or recent exports based on default behavior. |
| `MEM0_FETCH_DETAILED_LIST_OF_ORGANIZATIONS` | List organizations | Retrieves a summary list of organizations for administrative oversight; returns summary data (names, ids), not exhaustive details, despite 'detailed' in the name. |
| `MEM0_FETCH_DETAILS_OF_A_SPECIFIC_ORGANIZATION` | Fetch details of a specific organization | Fetches comprehensive details for an organization using its `org id`; the `org id` must be valid and for an existing organization. |
| `MEM0_FETCH_LIST_OF_ENTITY_FILTERS` | Get list of entity filters | Retrieves predefined filter definitions for entities (e.g., by type, creation/modification date); returns definitions only, not filtered entity data. |
| `MEM0_FETCH_SPECIFIC_ENTITY_DETAILS_WITH_OPTIONAL_FILTERS` | Get entity by id | Fetches detailed information for an existing entity (user, agent, app, or run) identified by its type and unique id. |
| `MEM0_GET_ORGANIZATION_MEMBERS` | Get organization members | Fetches a list of members for a specified, existing organization. |
| `MEM0_GET_PROJECT_DETAILS` | Get project details | Fetches comprehensive details for a specified project within an organization. |
| `MEM0_GET_PROJECT_MEMBERS` | Get project members | Retrieves all members for a specified project within an organization. |
| `MEM0_GET_PROJECTS` | Get projects | Retrieves all projects for a given organization `org id` to which the caller has access. |
| `MEM0_GET_USER_MEMORY_STATS` | Get user memory stats | Retrieves a summary of the authenticated user's memory activity, including total memories created, search events, and add events. |
| `MEM0_LIST_ENTITIES_WITH_OPTIONAL_ORG_AND_PROJECT_FILTERS` | List entities | Retrieves 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. |
| `MEM0_PERFORM_SEMANTIC_SEARCH_ON_MEMORIES` | Perform semantic search on memories | Searches memories semantically using a natural language query (required if `only metadata based search` is false) and/or metadata filters. required: at least one of agent id, user id, app id, or run id must be provided. when `only metadata based search` is true, the `metadata` parameter is required. |
| `MEM0_REMOVE_A_MEMBER_FROM_THE_ORGANIZATION` | Remove a member from the organization | Removes a member, specified by their username, from an existing organization of which they are currently a member. |
| `MEM0_RETRIEVE_ALL_EVENTS_FOR_THE_CURRENTLY_LOGGED_IN_USER` | Retrieve all events for the currently logged in user | Retrieves a paginated list of events for the authenticated user, filterable and paginable via url query parameters. this is a read-only operation that does not modify data. supported query parameters (applied directly to the request url): - `event type` (str, optional): filters events by their type (e.g., 'add', 'search'). - `start date` (str, optional): filters events on or after this date (format: yyyy-mm-dd). - `end date` (str, optional): filters events on or before this date (format: yyyy-mm-dd). - `page` (int, optional): specifies the page number for paginated results. - `page size` (int, optional): number of events per page (default: 50, max: 100). |
| `MEM0_RETRIEVE_ENTITY_SPECIFIC_MEMORIES` | Retrieve entity-specific memories | Retrieves all memories (e.g., user preferences, chat history) for a specific entity from the mem0 platform, using its `entity type` and `entity id`; ensure the entity exists. |
| `MEM0_RETRIEVE_LIST_OF_MEMORY_EVENTS` | Retrieve list of memory events | Retrieves a chronological list of all memory events (e.g., user inputs, ai responses) from the mem0 platform, providing interaction history and context for ai assistants. |
| `MEM0_RETRIEVE_MEMORY_BY_UNIQUE_IDENTIFIER` | Retrieve memory by id | Retrieves a complete memory entry by its unique identifier; `memory id` must be valid and for an existing memory. |
| `MEM0_RETRIEVE_MEMORY_HISTORY_BY_ID` | Retrieve memory history by id | Retrieves the complete version history for an existing memory, using its unique `memory id`, to inspect its evolution or audit changes. |
| `MEM0_RETRIEVE_MEMORY_LIST` | Retrieve memory list | Retrieves a list of memories, supporting pagination and diverse filtering (e.g., by ids, metadata, keywords, date ranges); ensure dates are iso 8601 and `page`/`page size` (if used) are positive integers. required: at least one of agent id, user id, app id, or run id must be provided. |
| `MEM0_SEARCH_MEMORIES_WITH_QUERY_FILTERS` | Search memories with filters | Semantically 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. |
| `MEM0_UPDATE_MEMORY_BATCH_WITH_UUID` | Update memory batch with uuid | Updates text for up to 1000 memories in a single batch, using their uuids. |
| `MEM0_UPDATE_MEMORY_DETAILS_BY_ID` | Update memory text content | Updates the text content of an existing memory, identified by its `memory id`. |
| `MEM0_UPDATE_ORGANIZATION_MEMBER_ROLE` | Update organization member role | Updates the role of an existing member to a new valid role within an existing organization. |
| `MEM0_UPDATE_PROJECT` | Update project | Updates 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. |
| `MEM0_UPDATE_PROJECT_MEMBER_ROLE` | Update project member role | Updates the role of a specific member within a designated project, ensuring the new role is valid and recognized by the system. |

## Supported Triggers

None listed.

## Complete Code

None listed.

## Conclusion

- Try asking your coding agent to perform various Mem0 operations
- Explore cross-app workflows by connecting more toolkits
- Set up triggers for real-time automation
- Use composio generate for typed schemas in your projects

## How to build Mem0 MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/mem0/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/mem0/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/mem0/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/mem0/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/mem0/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/mem0/framework/codex)
- [Cursor](https://composio.dev/toolkits/mem0/framework/cursor)
- [VS Code](https://composio.dev/toolkits/mem0/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/mem0/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/mem0/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/mem0/framework/hermes-agent)
- [Google ADK](https://composio.dev/toolkits/mem0/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/mem0/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/mem0/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/mem0/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/mem0/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/mem0/framework/crew-ai)

## Related Toolkits

- [Google Sheets](https://composio.dev/toolkits/googlesheets) - Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
- [Notion](https://composio.dev/toolkits/notion) - Notion is a collaborative workspace for notes, docs, wikis, and tasks. It streamlines team knowledge, project tracking, and workflow customization in one place.
- [Airtable](https://composio.dev/toolkits/airtable) - Airtable combines the flexibility of spreadsheets with the power of a database for easy project and data management. Teams use Airtable to organize, track, and collaborate with custom views and automations.
- [Asana](https://composio.dev/toolkits/asana) - Asana is a collaborative work management platform for teams to organize and track projects. It streamlines teamwork, boosts productivity, and keeps everyone aligned on goals.
- [Google Tasks](https://composio.dev/toolkits/googletasks) - Google Tasks is a to-do list and task management tool integrated into Gmail and Google Calendar. It helps you organize, track, and complete tasks across your Google ecosystem.
- [Linear](https://composio.dev/toolkits/linear) - Linear is a modern issue tracking and project planning tool for fast-moving teams. It helps streamline workflows, organize projects, and boost productivity.
- [Jira](https://composio.dev/toolkits/jira) - Jira is Atlassian’s platform for bug tracking, issue tracking, and agile project management. It helps teams organize work, prioritize tasks, and deliver projects efficiently.
- [Clickup](https://composio.dev/toolkits/clickup) - ClickUp is an all-in-one productivity platform for managing tasks, docs, goals, and team collaboration. It streamlines project workflows so teams can work smarter and stay organized in one place.
- [Monday](https://composio.dev/toolkits/monday) - Monday.com is a customizable work management platform for project planning and collaboration. It helps teams organize tasks, automate workflows, and track progress in real time.
- [Addressfinder](https://composio.dev/toolkits/addressfinder) - Addressfinder is a data quality platform for verifying addresses, emails, and phone numbers. It helps you ensure accurate customer and contact data every time.
- [Agiled](https://composio.dev/toolkits/agiled) - Agiled is an all-in-one business management platform for CRM, projects, and finance. It helps you streamline workflows, consolidate client data, and manage business processes in one place.
- [Ascora](https://composio.dev/toolkits/ascora) - Ascora is a cloud-based field service management platform for service businesses. It streamlines scheduling, invoicing, and customer operations in one place.
- [Basecamp](https://composio.dev/toolkits/basecamp) - Basecamp is a project management and team collaboration tool by 37signals. It helps teams organize tasks, share files, and communicate efficiently in one place.
- [Beeminder](https://composio.dev/toolkits/beeminder) - Beeminder is an online goal-tracking platform that uses monetary pledges to keep you motivated. Stay accountable and hit your targets with real financial incentives.
- [Boxhero](https://composio.dev/toolkits/boxhero) - Boxhero is a cloud-based inventory management platform for SMBs, offering real-time updates, barcode scanning, and team collaboration. It helps businesses streamline stock tracking and analytics for smarter inventory decisions.
- [Breathe HR](https://composio.dev/toolkits/breathehr) - Breathe HR is cloud-based HR software for SMEs to manage employee data, absences, and performance. It simplifies HR admin, making it easy to keep employee records accurate and up to date.
- [Breeze](https://composio.dev/toolkits/breeze) - Breeze is a project management platform designed to help teams plan, track, and collaborate on projects. It streamlines workflows and keeps everyone on the same page.
- [Bugherd](https://composio.dev/toolkits/bugherd) - Bugherd is a visual feedback and bug tracking tool for websites. It helps teams and clients report website issues directly on live sites for faster fixes.
- [Canny](https://composio.dev/toolkits/canny) - Canny is a platform for managing customer feedback and feature requests. It helps teams prioritize product decisions based on real user insights.
- [Chmeetings](https://composio.dev/toolkits/chmeetings) - Chmeetings is a church management platform for events, members, donations, and volunteers. It streamlines church operations and improves community engagement.

## Frequently Asked Questions

### What is the Composio Universal CLI?

The Composio Universal CLI is a single command-line interface that lets coding agents and developers interact with 1000+ SaaS applications. It handles authentication, tool discovery, action execution, and trigger setup — all from the terminal, without needing to configure MCP servers.

### Which coding agents work with the Composio CLI?

Any coding agent that can run shell commands works with the Composio CLI — including Claude Code, Codex, OpenCode, OpenClaw, and others. Once the CLI is installed, agents automatically discover and use the composio commands to interact with Mem0 and other connected apps.

### How is the CLI different from using an MCP server for Mem0?

MCP servers require configuration and can be token-heavy for complex workflows. The CLI gives agents a direct, lightweight interface — no server setup needed. Agents simply call composio commands like any other shell tool. It's faster to set up, more reliable for multi-step tool chaining, and works natively with how coding agents already operate.

### How safe is my Mem0 data when using the Composio CLI?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Mem0 data and credentials are handled as safely as possible. You can also bring your own OAuth credentials for full control.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
