# π€ Gemini AI Agent
Welcome to the **Gemini AI Agent** project!
A lightweight, modular AI assistant powered by **Google Gemini API** and optimized with **`uv`** for blazing-fast performance. π
---
## π Project Structure
π¦ gemini-ai-agent/ βββ app.py # π― Main app logic βββ gemini_agent.py # π§ Gemini API integration βββ main.py # πͺ Entry point βββ pyproject.toml # π οΈ Project configuration βββ requirements.txt # π¦ Python dependencies βββ uv.lock # π uv lock file βββ README.md # π Project documentation
---
## π Gemini API Key Setup
To use the Gemini AI Agent, you need a valid **Google Gemini API key**:
1. π **Get your API key** from the [Google AI Studio](https://makersuite.google.com/app/apikey).
2. π οΈ **Set your key as an environment variable**:
On **Linux/macOS**:
```bash
export GEMINI_API_KEY="your-api-key-here"
> β
The app will automatically pick up the API key from the `GEMINI_API_KEY` environment variable.
---
## β‘ Features
* π₯ Super fast dependency management with [`uv`](https://github.com/astral-sh/uv)
* π§ Powered by Google **Gemini API** for intelligent completions
* π§© Clean and modular code architecture
* π οΈ Easy to configure and extend
---
## π Getting Started
### 1. Install `uv` (if not already installed)
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install -r requirements.txtexport GEMINI_API_KEY="your-api-key-here"python main.pyOnce running, the agent can interact with Gemini and return intelligent outputs.
Check main.py or app.py for usage examples.
- Python 3.9+
uv(optional but recommended)- A valid Google Gemini API key π
Found a bug or have a feature request? We welcome contributions! Fork this repo and submit a PR or open an issue. π
MIT License β see the LICENSE file for full details.
If you like this project:
- β Star this repo on GitHub
- π£οΈ Share it with others
- π§ Build something cool with it!
Perfect! Here's an updated macOS setup guide specifically for VS Code or Cursor (instead of PyCharm), since you're using those editors. I'll also show how to integrate your Gemini API key in a clean and dev-friendly way.
Open Terminal (or use the built-in terminal in VS Code / Cursor) and run:
git clone https://github.com/your-username/gemini-ai-agent.git
cd gemini-ai-agentβ‘ Install uv β Fast Python Manager
Install uv on macOS with:
curl -LsSf https://astral.sh/uv/install.sh | shVerify:
uv --versionUse uv to install all project requirements:
uv pip install -r requirements.txtOr, if you're using pyproject.toml:
uv pip install .export GEMINI_API_KEY="your-api-key-here"- Create a
.envfile in the root of your project:
touch .env- Add your API key:
GEMINI_API_KEY=your-api-key-here
- In your Python code, use
dotenvto load it (add this tomain.pyorapp.py):
from dotenv import load_dotenv
import os
load_dotenv()
api_key = os.getenv("GEMINI_API_KEY")- Add
.envto.gitignore:
echo ".env" >> .gitignoreNow run your agent:
python main.pyYouβre now using Gemini AI securely on macOS with your favorite editor. π§ π‘
-
Open the project folder:
code . # OR cursor .
-
Use built-in terminal with
Cmd + \or `Ctrl + ``. -
Install the Python extension for syntax highlighting, linting, and IntelliSense.
-
Add
.envsupport in VS Code with the Python extension's built-in support.