🌐 Language / 语言
An all-in-one AI creation platform — chat with AI, generate images & videos, and compose on an infinite canvas. Powered by Agnes AI, with a Vue 3 + FastAPI full-stack architecture that keeps your API key secure on the server.
Agnes AI Platform is a self-hosted web application that brings together multiple AI capabilities into a single, cohesive experience:
- AI Chat — Conversational AI with tool calling. Chat naturally, and the AI can automatically trigger image or video generation when it detects your intent.
- Image Generation — Text-to-image and image-to-image, with multiple models and size options.
- Video Generation — Text-to-video, image-to-video, and keyframe animation, with async polling and real-time progress.
- Infinite Canvas — A free-form workspace where you can place generated images as nodes, connect them, and re-generate or remix with context-aware operations.
- Multi-Provider Management — Add and switch between multiple AI API providers (different base URLs, API keys) from the settings page. No need to edit
.envfiles after initial setup. - Generation History — Persistent history with thumbnails, GIF previews, filtering, and batch operations.
All API keys are encrypted and stored on the server — they never reach the browser.
Agnes AI Platform started as a simple image & video generation tool. Here's how it evolved:
| Phase | What Changed |
|---|---|
| v1 — Generator | Text-to-image, image-to-image, text-to-video, image-to-video. A clean tool with async polling and history. |
| v2 — Multi-Provider | Replaced the single .env API key with a database-backed provider system. Add, edit, and switch providers from the UI. API keys encrypted at rest. |
| v3 — AI Chat | Added a conversational AI interface with tool calling. The AI can detect your intent and trigger image/video generation automatically. Full SSE streaming. |
| v4 — Infinite Canvas | Introduced a free-form canvas for composing and remixing generated images. Nodes, connections, mask editing, and context-aware re-generation. |
The platform continues to grow, but the core principle remains the same: a self-hosted, secure, all-in-one AI creation workspace.
| Tool | Version | Why |
|---|---|---|
| Python | 3.10+ (3.11+ recommended) | Backend runtime |
| Node.js | 18+ (20+ LTS recommended) | Frontend build |
Open a terminal in the project root and run:
# macOS / Linux — first time: grant execute permission
chmod +x start.sh
./start.sh
# Windows
start.bat
# Or use the Python launcher (cross-platform, no permission needed)
python start.pymacOS / Linux first run: Shell scripts (
.sh) downloaded from Git or copied between machines may not have execute permission. Runchmod +x start.shonce before the first./start.sh. If you skip this, you'll get a "permission denied" error.macOS Gatekeeper: If macOS blocks the script with "cannot be opened because it is from an unidentified developer", go to System Settings → Privacy & Security and click "Open Anyway", or run
xattr -d com.apple.quarantine start.shin Terminal.Windows:
.batfiles run directly without extra permission. If Windows SmartScreen blocks it, click "More info → Run anyway".
This automatically starts both the backend and frontend in one command. On first run it will prompt you to configure your API key.
Default Admin Account: The startup script automatically initializes the database and creates a super admin:
- Username:
admin- Password:
admin123You can customize these via environment variables
ADMIN_USERNAME/ADMIN_PASSWORD/ADMIN_EMAIL/ADMIN_CREDITSbefore first run. Please change the default password after first login.
cd backend
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # macOS / Linux
# Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env — at minimum, set AGNES_API_KEY for the initial default provider.
# After first launch, you can manage providers from the frontend settings page.Start the backend (macOS/Linux):
./start.shStart the backend (Windows):
start.batOr manually:
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadVerify: http://localhost:8000/health or http://localhost:8000/docs
Open a new terminal:
cd frontend
# Install dependencies
npm install
# Start dev server (port 5173, auto-proxies /api → backend:8000)
npm run devVisit http://localhost:5173 — you're ready to go.
- Open the Settings page (
/settings). - Your
.envAPI key is automatically loaded as the default provider. - Add more providers if needed — each with its own base URL and API key.
- Start creating — chat, generate images/videos, or open the canvas.
| Layer | Technology |
|---|---|
| Frontend | Vue 3 (Composition API) + Vite + TypeScript + Vue Router + Pinia + Element Plus |
| Backend | Python 3.10+ · FastAPI · SQLAlchemy 2.0 (async) · httpx (async HTTP client) |
| Database | SQLite (default, zero-config) / PostgreSQL (optional) |
| AI Provider | Agnes AI API (OpenAI-compatible) |
Q: Why a BFF layer instead of calling the AI API directly from the browser?
A: Two reasons — (1) your API key stays on the server and never reaches the browser, (2) the server handles async task polling, history persistence, and media processing that a pure frontend can't do reliably.
Q: How long does video generation take?
A: Usually 2–6 minutes. The platform polls in the background — you can navigate away and check back later.
Q: Can I use other OpenAI-compatible APIs?
A: Yes. Add a new provider in Settings with your custom base URL and API key. The platform supports any OpenAI-compatible chat, image, and video endpoints.
Q: Can I deploy this to production?
A: Yes. Build the frontend (npm run build) and serve it statically. Deploy the backend with any ASGI host. Set FRONTEND_ORIGINS and DATABASE_URL for your production environment.
Apache License 2.0 with Commons Clause — source code is open and free to use for personal, educational, and research purposes. Commercial use is prohibited. See LICENSE for details.