This project demonstrates how to build and run your own autonomous AI agent using the google-antigravity library and the uv package manager.
To automatically install uv, Python, and all required dependencies, simply run the setup.bat script (e.g., by double-clicking it or running it in your terminal):
setup.batThe script will automatically:
- Check for/install the
uvpackage manager. - Install Python version 3.12.
- Create a local virtual environment
.venv. - Install
google-antigravityand other requirements fromrequirements.txt.
After installation is complete, run the agent using:
uv run main.pyIf you prefer a manual, step-by-step installation, follow these instructions:
- Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- Or via pip:
pip install uv
uv python install 3.12uv venv --python 3.12Activation:
- PowerShell:
.venv\Scripts\Activate.ps1 - CMD:
.venv\Scripts\activate.bat
uv pip install -r requirements.txtuv run main.pyThis enhanced version of the AI Assistant includes several advanced features:
At startup, you can choose which Gemini model to load (e.g. gemini-3.5-flash, gemini-3.5-pro, gemini-2.0-flash, or a custom name).
After every prompt, the console displays:
- Turn Usage: Input tokens, Output tokens, and Thinking/Reasoning tokens.
- Session Usage: Cumulative total of input and output tokens consumed during the current session.
Type these commands directly into the User: prompt:
helpor?- Displays the help menu showing commands and capabilities.status- Prints environment info, current model, API key status, active Git branch, and cumulative tokens.clearorcls- Clears the console window.exit- Safely exits the program.
The agent's safety policy has been extended to allow read-only operations without requiring manual verification:
list_directory: Displays files and directories.find_file: Locates specific files by name.search_directory: Performs a full-text grep search across the codebase.search_web&read_url_content: Allows searching the web and reading online developer documentation.- Note: Dangerous commands (e.g. shell command execution via
run_command) still require your explicit approval (y/n).
If you are working with an AI assistant in this repository, you can enable automatic tracking of code changes. The assistant will write files locally, and the watcher will automatically commit and push them to your Git repository in real-time.
To start the watcher, run:
python git_watcher.py- Get System Information: Ask the agent: "What is the system information?" or "Check free disk space on C:".
- Security Test (Human-in-the-Loop): Order the agent: "Run whoami command" or "Show files in folder". The agent will request your explicit approval before executing any shell command.