Installing SurrealDB Agent Memory in Google Antigravity gives the agent persistent memory across sessions, so it can recall previous decisions and project context without you repeating them.
For integration rules your agent should follow (auth, scope, endpoints, common mistakes), see Agent guide (AGENTS.md).
Configure
The install-mcp helper does not cover Antigravity, so configure the server by hand. Antigravity's IDE and CLI share a central MCP configuration at ~/.gemini/config/mcp_config.json. In the IDE you can reach it through Manage MCP servers → View raw config.
Antigravity uses a stricter schema than most MCP clients: remote Streamable HTTP servers use serverUrl, not url.
{
"mcpServers": {
"agent-memory": {
"serverUrl": "https://<your-context-host>/mcp",
"headers": {
"Authorization": "Bearer <your-api-key>"
}
}
}
}On SurrealDB Cloud, use your context host from SurrealDB Studio API keys (not a generic shared domain).
Each API key is bound to one Context, so context_id is optional on every tool call; omit it to use the key's Context. An explicit value that does not match the key still returns 401.
Verify the installation
Open Antigravity
Open the MCP store and confirm agent-memory appears with a healthy indicator
In a chat, ask "What MCP tools do you have available?" Antigravity should report the SurrealDB Agent Memory tools
If the server is unhealthy, check that serverUrl (your context host + /mcp) and the API key in mcp_config.json are correct.
Usage examples
Store project context:
"Remember that this repo uses a monorepo layout with apps in
apps/and shared packages inpackages/."
Antigravity calls remember with a suitable scope.
Recall before answering:
"Where should a new shared utility live in this project?"
Antigravity calls recall before composing its response.
Scope per tool call
Narrow writes with the per-tool scope argument and reads with lens (slash paths, for example ["org/acme/project/platform"]). Register paths with agent-memory scopes create before first use. For project isolation, use separate contexts or distinct scope paths.
Removing SurrealDB Agent Memory
Open mcp_config.json and delete the "agent-memory" key from mcpServers.