Skip to main content
Add persistent memory to Google Antigravity (agy CLI and Desktop IDE) with the Mem0 plugin. The plugin captures completed work, and Antigravity can search those memories in later sessions.
Current plugin version: 0.3.1.
Sidekick is available only in the Claude Code plugin.

Prerequisites

  1. A Mem0 API key (starts with m0-):
  2. Python 3.10 or newer available as python3
  3. Add the key to your shell profile so it persists across sessions:

Installation

Option A: degit (recommended):
When upgrading an existing installation, move ~/.gemini/config/plugins/mem0 aside first. Installing over that directory can leave obsolete files from older plugin versions.
This installs the generated Antigravity bundle with the Mem0 server, lifecycle hooks, and six memory skills.

What’s Included

Memory tools and skills

The full plugin exposes a focused search_memories tool and captures completed work through lifecycle hooks. Six skills provide search, status, remember, forget, pause, and resume workflows. If you need the full set of direct CRUD tools, connect the hosted Mem0 MCP server separately instead of installing both configurations under the same server name.

Hosted MCP tools

Lifecycle Hooks

The plugin translates Antigravity events into the shared Mem0 capture lifecycle. Recall is explicit through search_memories and the search skill. The current Antigravity adapter does not inject query-specific memory during PreInvocation because that event does not include the user’s prompt. What you type is stored as yours. Captured agent summaries are stored as the assistant’s, so its suggestions never become your stated preferences.

Antigravity 1.1.25 workarounds

Antigravity 1.1.25 can validate a plugin’s mcp_config.json without loading the server. Check whether Mem0 is registered:
If mem0 is absent, register the plugin’s bundled server with Antigravity’s supported global MCP command, then start a new session:
The same release can send hooks with an empty workspacePaths array. For the agy CLI, pass the current repository explicitly:
The adapter uses MEM0_CWD only when Antigravity omits the workspace. If neither value is available, it skips recall and capture instead of writing memories under an incorrect repository scope.

Search and capture

The local search_memories tool accepts query, top_k, category, scope (repo, dir, or mine), and optional run_id with every scope. Use a known session ID to recall memories saved in that session; omit it to search across sessions. See search scopes for the shared Python search contract, including legacy repository memory compatibility. Captured prompts and responses retain their full redacted text without a per-message character cutoff. Large extraction inputs are split across requests without dropping message text; recall output and tool-result previews have separate limits.

Troubleshooting

  • No tools appearing: Restart your Antigravity session after installation
  • No mem0 entry in agy mcp list: Use the Antigravity 1.1.25 global MCP registration command above
  • Hooks do not capture in the CLI: Launch agy with MEM0_CWD="$PWD"
  • “Connection failed”: Verify your key is set without printing it: test -n "$MEM0_API_KEY" && echo configured

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.