This project is an AI-powered image generation application that enables users to create high-quality images using Google’s advanced AI model codenamed Nano Banana.
- Default Mode – Automatically refine prompts when no category is selected.
- Fitting Mode – Modify existing images to fit new styles or concepts.
- Template Mode (Styles & Lightbox) – Apply predefined templates, including Lightbox product presets.
⚠️ Important: This project requires theGOOGLE_AI_SDKto function properly.
🛠️ Agents are built using Google A2A (Agent-to-Agent) tools, following the official Google Agent Team Tutorial.
📚 For API reference, see Google Gemini Image Generation Documentation.
💡 Tip: When making decisions on session management, check what the provider gives out-of-the-box (e.g., OpenAI Agents SDK or Google A2A).
| Table | Key Fields |
|---|---|
| sessions | id, app_name, user_id, state, create_time, update_time |
| events | id, app_name, user_id, session_id, invocation_id, author, actions, branch, timestamp, content, grounding_metadata, custom_metadata, partial, turn_complete, error_code, error_message, interrupted |
| app_states | app_name, state, update_time |
| user_states | app_name, user_id, state, update_time |
📂 app
├── 📂 routes
│ ├── 📄 agent.py
│ └── 📄 style.json
├── 📂 utils
│ ├── 📄 agent_guardrail.py
│ ├── 📄 agent_helpers.py
│ ├── 📄 agent_orchestration.py
│ └── 📄 agent_tool.py
│ └── 📄 config.py
FLASH_TEXT: ClassVar[str] = "gemini-2.5-flash"
FLASH_IMAGE: ClassVar[str] = "gemini-2.5-flash-image-preview"
Change the model to your liking.
This repository is designed not just for research and implementation of machine learning tools, but also to support a continuous cycle of applied AI collaboration: Awareness – Understanding goals, platforms, and how to delegate effectively between humans and AI. Description – Defining expectations, task approaches, and AI collaboration behavior. Discernment – Evaluating the quality of outputs, the soundness of processes, and AI performance. Diligence – Ensuring responsible use of AI, maintaining transparency, and taking accountability for deployed outputs.