Similar to WordPress, made for AI Native Applications — Build, deploy, and manage AI-powered applications without the complexity.
Agentbase is an open-source platform that brings the WordPress model to AI development: plugins, themes, a marketplace, and a hosted option — everything you need to launch AI products fast.
agentbase/
├── packages/
│ ├── core/ # NestJS API (PostgreSQL + MongoDB)
│ ├── frontend/ # Next.js 14 (App Router + Tailwind)
│ ├── ai-service/ # FastAPI (AI provider integrations + SSE streaming)
│ ├── shared/ # Shared TypeScript types
│ ├── plugins/ # Plugin SDK + examples
│ └── themes/ # Theme SDK + starter themes
├── docker-compose.yml # Local dev databases
├── docker-compose.prod.yml # Production stack
└── .env.example # Environment template
| Layer | Technology |
|---|---|
| Core API | Node.js + NestJS + TypeORM |
| Frontend | Next.js 14 + React + Tailwind CSS |
| AI Service | Python + FastAPI |
| SQL Database | PostgreSQL 16 |
| Document DB | MongoDB 7 |
| Cache | Redis 7 |
| Infrastructure | Docker, Nginx, DigitalOcean Kubernetes (DOKS) |
| License | GPL-3.0 |
- Node.js 20+
- Python 3.11+
- Docker & Docker Compose
- pnpm 9+
# Clone the repo
git clone https://github.com/agentaflow/agentbase.git
cd agentbase
# Copy environment variables
cp .env.example .env
# Start databases
docker compose up -d
# Install dependencies
pnpm install
# Start all services
pnpm devServices will be available at:
- Frontend: http://localhost:3000
- Core API: http://localhost:3001
- API Docs: http://localhost:3001/api/docs
- AI Service: http://localhost:8000
pnpm dev:core # NestJS API only
pnpm dev:frontend # Next.js frontend only
pnpm dev:ai # FastAPI AI service only- Multi-Provider Support — OpenAI (GPT-4, GPT-4o, GPT-3.5), Anthropic (Claude), Google Gemini (2.0 Flash, 1.5 Pro, 1.5 Flash)
- Streaming Responses — Server-Sent Events (SSE) for real-time token-by-token output
- Conversation Management — Create, continue, archive conversations per application
- Prompt Templates — Reusable templates with
{{variable}}substitution - Knowledge Base (RAG) — Vector-based semantic search with OpenAI embeddings, document chunking, and context retrieval
- WordPress-Style Hooks — Actions and filters with priority-based execution
- Plugin SDK — TypeScript interfaces and utilities for plugin development
- Lifecycle Management — Install, activate, deactivate, uninstall with dependency resolution
- Marketplace — Browse, search, rate, and review plugins with 8 categories
- Per-App Installation — Install and configure plugins independently per application
- Theme Engine — CSS custom property generation with 4 built-in presets
- White-Label Branding — Custom colors, fonts, logos, email templates, and CSS injection
- Custom Domains — DNS verification (CNAME/TXT), SSL tracking, domain settings
- Embeddable Widget — Standalone JavaScript widget for any website with theme support
- Organizations — Team creation with member management (Owner/Admin/Member/Viewer roles)
- SSO Integration — SAML 2.0 and OIDC support with auto-provisioning
- Notifications — In-app notification system with real-time updates
- Audit Logging — Comprehensive audit trail for all platform actions
- Stripe Integration — 4 subscription tiers (Free, Starter $29/mo, Pro $99/mo, Enterprise $499/mo)
- Usage Metering — Token and message quotas with enforcement before AI calls
- Webhooks — 11 event types with HMAC-SHA256 signing and delivery tracking
- Data Export/Import — JSON and CSV export, bulk import with error handling
- OAuth2 — GitHub and Google OAuth with automatic account linking
- JWT + Refresh Tokens — Secure authentication with token rotation
- API Keys — Create, scope, rate-limit, and revoke API keys per application
- Role-Based Access Control — Admin, Developer, User roles with permission guards
- Security Hardening — Helmet middleware, CORS, rate limiting, HSTS, CSP headers
- Usage Analytics — Track conversations, messages, tokens, costs per application
- Event Tracking — MongoDB-backed event stream (message_sent, widget_loaded, api_call, error)
- System Health — Real-time service checks (PostgreSQL, MongoDB, Redis, AI Service)
- Platform Statistics — Users, applications, subscriptions, resource usage
- Docker Production Stack — Multi-stage builds with Alpine images, health checks, non-root user
- Nginx Reverse Proxy — SSL termination, rate limiting, security headers, SSE streaming
- Email Service — SMTP transport with HTML templates (welcome, password reset, usage warnings)
- File Uploads — S3-compatible storage (AWS S3, MinIO, DigitalOcean Spaces, Cloudflare R2)
- Automated Backups — PostgreSQL and MongoDB backup scripts with 7-day retention
POST /api/auth/register— Register new userPOST /api/auth/login— LoginGET /api/auth/me— Get current userGET /api/auth/github— OAuth: Redirect to GitHubGET /api/auth/github/callback— OAuth: GitHub callbackGET /api/auth/google— OAuth: Redirect to GoogleGET /api/auth/google/callback— OAuth: Google callbackGET /api/auth/providers— List available OAuth providersPOST /api/auth/change-password— Change passwordPOST /api/auth/password-reset/request— Request password reset
POST /api/applications— Create applicationGET /api/applications— List user's applicationsGET /api/applications/:id— Get applicationPUT /api/applications/:id— Update applicationDELETE /api/applications/:id— Delete application
GET /api/plugins— List marketplace pluginsPOST /api/plugins— Create pluginPUT /api/plugins/:id/publish— Publish pluginPOST /api/applications/:appId/plugins— Install pluginPUT /api/applications/:appId/plugins/:id/activate— Activate pluginPUT /api/applications/:appId/plugins/:id/deactivate— Deactivate pluginDELETE /api/applications/:appId/plugins/:id— Uninstall plugin
POST /api/prompts— Create prompt templateGET /api/prompts?applicationId=— List templates for appGET /api/prompts/:id— Get prompt templatePUT /api/prompts/:id— Update prompt templateDELETE /api/prompts/:id— Delete prompt templatePUT /api/prompts/:id/default— Set as default templatePOST /api/prompts/render— Render template with variables
GET /api/themes— List themesPOST /api/themes— Create theme
GET /api/ai/providers— List AI providersPOST /api/ai/conversations— Create conversationPOST /api/ai/conversations/:id/messages— Send message (standard)POST /api/ai/conversations/:id/stream— Send message (SSE streaming)GET /api/ai/conversations/by-app/:appId— List conversationsDELETE /api/ai/conversations/:id— Archive conversation
Agentbase supports multiple AI providers out of the box:
- OpenAI — GPT-4, GPT-4o, GPT-3.5 Turbo
- Anthropic — Claude Sonnet 4.5, Claude Haiku 4.5
- Google Gemini — Gemini 2.0 Flash, Gemini 1.5 Pro, Gemini 1.5 Flash
Set your API keys in .env and Agentbase handles provider routing, rate limiting, and conversation management automatically.
See CHANGELOG.md for a detailed history of changes across all phases.
See CONTRIBUTING.md for development guidelines.
GNU General Public License v3.0 — see LICENSE
Built by AgentaFlow