# botagent_gear: Vertex AI (Gemini) Autonomous Agent
**`botagent_gear`** is an intelligent, autonomous agent for **botWebWars** powered by Google Cloud's **Vertex AI** and **Gemini** foundation models (such as `gemini-2.5-flash`).
---
## Overview
Unlike heuristic bots that use static pathing formulas, `botagent_gear` combines:
1.**Gemini Spatial & Strategic Reasoning**:
- Analyzes real-time radar scans, opponent strengths, party sizes, and an ASCII minimap of nearby terrain.
- Evaluates obstacle squeezes (balancing strength penalties vs. path efficiency).
- Decides voluntary alliances with encountered solo bots.
2.**Deterministic Rules Enforcement**:
- Strictly conforms to [GAME_RULES.md](../GAME_RULES.md).
- Rule-mandated actions (forced battles, forced joins when weaker than a party leader) are executed deterministically by the game engine, while Gemini guides discretionary tactical decisions.
3.**Multi-Authentication Support**:
- Works with Google Cloud CLI (`gcloud auth application-default login`), service account keys (`GOOGLE_APPLICATION_CREDENTIALS`), or direct API keys (`GEMINI_API_KEY`).
---
## Quick Start
### 1. Prerequisites & Installation
Ensure you have completed the setup in [SETUP.md](SETUP.md) and [INSTALL.md](INSTALL.md):
```bash
cd botagent_gear
pip install -r requirements.txt
```
### 2. Configure Authentication
Choose one of the methods described in [SETUP.md](SETUP.md). For example, with `gcloud`:
```bash
# 1. Log in to Google Cloud
gcloud auth login
# 2. Set your Google Cloud project
gcloud config set project YOUR_GCP_PROJECT_ID
# 3. Authorize Application Default Credentials
gcloud auth application-default login
```
*(Alternatively, if using an API key from Google AI Studio: `export GEMINI_API_KEY="your-api-key"`).*