Skip to content

Build A Local Dynamic Memory For Chat-GPT, Claude And Gemini

It happened again, Google just released a native solution to a problem I just solved locally. This time it took 3 days from my publication to their announcement, last time it took 8 days from my prediction to Google’s public announcement.

Over the past 6 weeks or so, I have been experimenting with different ways to run LLMs locally in an efficient way. From running OpenClaw locally with Gemma 4, including local RAG, to running different models in separate servers organized within ComfyUI, and finally integrating MemPalace to run Gemini 3 Pro in a mixed environment.

Maybe I’m a tiny bit frustrated, but not completely discouraged yet. Let’s make the best of the situation.

I’ll show you how to use Gemini 3.1 Pro, Gemini 3.5 Flash, Claude Sonnet 4.6, Claude Opus 4.6 or ChatGPT OSS in an environment that is a mix of my own and Google’s.

Prerequisites

Note: The usefulness of this integration is dependent on the type of Google account and subscription you have. A free account gets limited access that is reset every week, a paid account gives more access depending on your subscription tier. If you have a free account and are considering getting a subscription with a focus on AI, you have a few options.

Workspace Business is what I have, and if you are mainly looking to maximize AI access, I don’t recommend it. It has other useful features though, which is why I have chosen it.

Google AI Plus/Pro/Ultra, previously Google One, has subscriptions ranging from ~$8 – $99 per month. These subscriptions are much more beneficial for those who are mainly interested in AI.

Independent research like this is self-funded. If this guide saved you hours of troubleshooting, consider fueling the lab.

Support the Project

Setup and configuration

When you first install or update Antigravity, make sure you also install the Antigravity IDE plugin.

From here on this guide is written on the assumption that you have fulfilled all prerequisites above, and that you have followed my previous guides, and have your MemPalace running in its own environment inside WSL.

Open the settings in Antigravity and navigate to linux_port, where you need to add your project folder. Set your project folder where you have your MemPalace-Server folder.

Antigravity linux port

For example, my MemPalace-Sever is at the following location:

\\wsl.localhost\Ubuntu\home\zanno\MemPalace-Server

So my project folder is set to:

\\wsl.localhost\Ubuntu\home\zanno

Next, you have to give Antigravity various permissions.

local permissions for antigravity

Give Antigravity read and write access to your project folder.

Antigravity local access

You will now have to give Antigravity the permission to access and run your MemPalace from its virtual environment inside your WSL setup. Copy the following command, but replace USER with the username you set when you first installed wsl.

wsl -d Ubuntu -e /home/USER/MemPalace-Server/venv/bin/mempalace-mcp

Set the command inside Terminal Commands in Antigravity.

Antigravity terminal command

Next, we need to tell Antigravity that it’s allowed to use our local MemPalace. Do not go to the customization menu and try to add MemPalace from there. The customization menu only contains pre-installed MCP servers.

Instead, you have to make sure that you are still in the linux port. Open the MCP Tools and paste mempalace-mcp/*

antigravity MCP tools

If you, like me, have been using MemPalace in other setups, you already have some actual memories in it as well as a system prompt. You can use your old system prompt by copying GEMINI.md from \\wsl.localhost\Ubuntu\home\USER\.gemini\ (again replace USER with your own username) to C:\Users\USER\.gemini\ which is where Antigravity keeps its own files and folders.

GEMINI.md

Example of how the instructions inside GEMINI.md can look:

# Core Persona Definition
You are a highly intelligent and proactive AI agent. Maintain a natural, engaging conversational tone, like speaking to a colleague or close friend. 

# Operational Framework
- You are connected to a local MemPalace MCP server with 29 tools.
- When asked to analyze logs or project files, automatically call the relevant `mempalace_*` tools to retrieve the local context before answering.
- Prioritize accuracy and technical integrity above all else. If data is missing from the local logs, state it directly.

The models available at the moment are listed below, and they are subject to change at will by Google.

Antigravity model quota

Inside Antigravity you can now start a new conversation, make sure you choose linux port and set it to local.

New AI chat

You can now test and make sure that Antigravity/Gemini has access to MemPalace and its tools by asking the following in the chat:

Can you check your available MCP tools and list the functions you can see from MemPalace?

If you have done everything correctly, your model should answer like this.

You can now tell your chosen model to perform various tasks, locally as well as on the internet. If it needs new permissions or information, it will ask you for it. As a test, I told my AI, Nova, to read the 4 newest posts on this website as well as Google’s announcement of “Managed Agents”, consider the implications, write a text about it and post it as a draft to zanno.se.

It did ask for an account to be able to log in to my site, and which username and password it should use. It then wrote 3 Python scripts to parse, write and publish the text.

The finished text can be found here: The Sand Castle And The Memory Palace

Now go forth, create, and share your creations!

All the AI related work I do, I do on my spare time, and I share it with the world completely free of charge. It does take up a lot of my time, as well as the cost for running this website. I’m grateful for every bit of support I can get from users like you.

If you liked this guide and want more like it, as well as other useful tips directly in your inbox, you should sign up for my newsletter.

Published inAIEnglishGeminiLocal Agentic AITech