Skip to main content
Add persistent memory to Google Antigravity (agy CLI and Desktop IDE) with the Mem0 plugin. Your agent forgets everything between sessions. Mem0 fixes that by storing decisions, preferences, and learnings so they carry over automatically.

Prerequisites

  1. A Mem0 API key (starts with m0-):
  2. Add it to your shell profile so it persists across sessions:

Installation

Option A: degit (recommended):
This installs the MCP server, lifecycle hooks, and shared scripts.

What’s Included

Available MCP Tools

Lifecycle Hooks

The plugin uses the same shell scripts as Claude Code, Cursor, and Codex: hooks bridge environment variables using ${extensionPath} (Antigravity’s plugin-root token). What you type is stored as yours. What the agent produces — session summaries and compaction summaries — is stored as the assistant’s, so its suggestions never become your stated preferences.

Troubleshooting

  • No tools appearing: Restart your Antigravity session after installation
  • “Connection failed”: Verify your key is set: echo $MEM0_API_KEY
  • MCP 401 Unauthorized: If ${MEM0_API_KEY} interpolation doesn’t work in your agy version, replace with your literal key in mcp_config.json

Mem0 MCP Setup

Detailed MCP configuration for all clients

OpenCode Integration

Add Mem0 memory to OpenCode workflows
Using Mem0? Star us on GitHub to help more developers discover memory for AI apps.