Brain Surgeon is a simple tool to help visualize and explore your "brain" files in Google's Antigravity.
When you have a chat session with the embedded agent in Antigravity, it stores the session in a file in the ~/.gemini/antigravity/brain directory. These files are difficult to browse because they are organized by the hash of the session.
This tool scans your /brain directory, copies the content to /brain-readable, then makes a call to Gemini to summarize the content of each session. These are aggregated and presented in a clean, readable dashboard.
-
Clone the repository:
git clone <your-repo-url> cd brain_surgeon
-
Install dependencies:
pip install -r requirements.txt
-
Configuration: By default, Brain Surgeon looks for the brain at
~/.gemini/antigravity/brain.To customize this or set your API key, create a file named
brain_surgeon.config.jsonin the root directory:{ "brain_path": "/path/to/your/custom/brain", "api_key": "YOUR_GEMINI_API_KEY" }Note: You can also set
GOOGLE_API_KEYas an environment variable.
-
Sync the Brain: Run the sync script to scan, summarize, and generate the readable archive.
python brain_sync.py
Note: This script makes one API call to Gemini for each new session found to generate a summary. Previous sessions are cached locally in
manifest.json. -
Launch the Dashboard: Start the Streamlit app to explore the data.
streamlit run dashboard.py
- Add additional folders, like
/knowledge. - Add some options to the scan to re-scan or update.