A comprehensive AI agent platform powered by Supabase that empowers both non-coders and developers to build, deploy, monetize, and execute AI agents across web and mobile environments.
Agent Architect now uses Supabase for a streamlined, all-in-one backend:
- β Authentication: Built-in auth with Google, GitHub, email/password
- β Database: PostgreSQL with Row Level Security (RLS)
- β Real-time: Instant updates via Supabase Realtime
- β Storage: File uploads and management
- β
Easy Setup: Run
./first-time.shto get started - β Free Tier: Generous free tier for development
Quick Start: See DEPLOYMENT-SUPABASE.md for complete setup instructions.
- Agent Creation & Management: Create, edit, and manage AI agents with custom system prompts
- ReAct Execution Engine: Advanced execution with Reasoning β Action β Observation loops
- Tool Store: Browse and attach powerful tools (Web Search via Perplexity, Email, Database, HTTP, Slack)
- Marketplace: Publish and monetize your agents with subscription-based pricing
- Multi-Platform: Web application (Next.js 14) and Mobile app (React Native)
- LLM Integration: Support for OpenAI (GPT-4, GPT-3.5) and Anthropic (Claude) models
- Real-time Execution: WebSocket support for live execution updates
- Authentication: Secure authentication via Clerk (Google, GitHub, Email)
This is a monorepo project with the following structure:
agent-architect/
βββ packages/
β βββ backend/ # Node.js/Express API with TypeScript
β βββ web/ # Next.js 14 web application
β βββ mobile/ # React Native mobile app (Expo)
β βββ shared/ # Shared types and utilities
βββ docker-compose.yml # Docker orchestration
βββ package.json # Root package with workspace configuration
- Runtime: Node.js 20 LTS with TypeScript
- Framework: Express.js
- Database: PostgreSQL 15
- Cache: Redis 7
- LLMs: OpenAI SDK, Anthropic SDK
- Authentication: Clerk
- Real-time: Socket.io
- Framework: Next.js 14 (App Router)
- UI: shadcn/ui + Tailwind CSS 3
- Authentication: Clerk OAuth
- Framework: React Native (Expo)
- UI: React Native Paper
- Authentication: Clerk Expo
- Node.js 20+ and npm 10+
- Docker and Docker Compose
- Clerk account (for authentication)
- OpenAI API key (optional)
- Anthropic API key (optional)
- Perplexity API key (optional, for web search)
-
Clone the repository
git clone https://github.com/flatfinderfintech-lab/agent-architect.git cd agent-architect -
Run the setup script (recommended)
./first-time.sh
This interactive script will:
- Check prerequisites
- Collect your Supabase credentials
- Collect AI API keys
- Generate all necessary
.envfiles
OR manually copy
.env.example:cp .env.example .env
-
Install dependencies
npm install --legacy-peer-deps # OR use the Makefile make install -
Set up Supabase (if not done via script)
Get credentials from your Supabase project:
# Supabase SUPABASE_URL=https://your-project.supabase.co SUPABASE_ANON_KEY=your-anon-key SUPABASE_SERVICE_KEY=your-service-key # AI APIs ANTHROPIC_API_KEY=sk-ant-your-key OPENAI_API_KEY=sk-your-key # Application NODE_ENV=development JWT_SECRET=your_secure_random_string
-
Start the services with Docker
npm run docker:up
This will start:
- PostgreSQL (port 5432)
- Redis (port 6379)
- Backend API (port 3001)
- Web frontend (port 3000)
-
Access the application
- Web: http://localhost:3000
- API: http://localhost:3001
- API Health: http://localhost:3001/health
If you prefer to run services individually:
-
Start PostgreSQL and Redis
docker-compose up postgres redis -d
-
Run database migrations
npm run db:migrate
-
Start backend
npm run dev:backend
-
Start web frontend (in another terminal)
npm run dev:web
-
Start mobile (optional, in another terminal)
npm run dev:mobile
To run the mobile app:
-
Install Expo CLI
npm install -g expo-cli
-
Start the mobile app
cd packages/mobile npm start -
Run on device
- Install Expo Go on your iOS/Android device
- Scan the QR code from the terminal
GET /api/agents- List all agentsGET /api/agents/:id- Get agent detailsPOST /api/agents- Create new agentPUT /api/agents/:id- Update agentDELETE /api/agents/:id- Delete agentPOST /api/agents/:id/clone- Clone an agent
POST /api/executions- Execute an agentGET /api/executions/:id- Get execution detailsGET /api/executions- List executions
GET /api/tools- List available toolsGET /api/tools/:id- Get tool details
GET /api/marketplace- Browse marketplace listingsGET /api/marketplace/:id- Get listing detailsPOST /api/marketplace- Create listingPOST /api/marketplace/:id/subscribe- Subscribe to listingGET /api/marketplace/my/listings- Get creator's listingsGET /api/marketplace/my/subscriptions- Get user's subscriptions
- Sign up with Google/GitHub/Email
- Select "Customer Support" template
- Add tools (Email, FAQ, Slack)
- Test in live preview chat
- Deploy with one click
- Embed on website via iframe
Goal: Create and deploy in under 90 seconds
- Browse marketplace
- Clone "Lead Qualifier" agent
- Customize prompt and tools
- Test with client scenarios
- Publish to marketplace with pricing
- Earn revenue from subscriptions
Goal: Clone, customize, and publish in under 15 minutes
Run tests for each package:
# All tests
npm test
# Backend tests
npm test --workspace=packages/backend
# Web tests
npm test --workspace=packages/webThe platform uses PostgreSQL with the following main tables:
users- User accounts (synced with Clerk)agents- AI agent configurationstools- Available tools for agentsagent_tools- Agent-tool associationsexecutions- Execution recordsexecution_logs- Step-by-step execution logs (ReAct)marketplace_listings- Marketplace agent listingssubscriptions- User subscriptions to marketplace agentsusage_tracking- Token usage and costs
- Clerk OAuth for authentication
- JWT tokens for API access
- Rate limiting on API endpoints
- SQL injection prevention with parameterized queries
- Environment variable management for secrets
- CORS configuration for cross-origin requests
docker-compose -f docker-compose.prod.yml up -dReady for deployment on:
- AWS EKS
- Google Cloud GKE
- Azure AKS
See k8s/ directory for Kubernetes manifests (to be added).
- Winston logger for backend
- Structured JSON logging
- Execution tracking with detailed steps
- Cost tracking per execution
- Usage analytics per user
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m 'Add some feature' - Push to branch:
git push origin feature/your-feature - Open a pull request
This project is licensed under the MIT License.
This platform was built following 2025 best practices for AI agent architectures:
- ReAct Pattern: Implements Reasoning β Action β Observation loops for autonomous problem-solving
- Iteration Limits: Maximum iteration safeguards to prevent infinite loops
- Execution Timeouts: Timeout protection for long-running executions
- Stateful Workflows: Support for complex multi-step agent workflows
- Cost Optimization: Token usage tracking and cost calculation per execution
- Error Handling: Comprehensive error handling and graceful degradation
- Observability: Detailed logging and execution step tracking
Sources:
- LangChain ReAct Agent: Complete Implementation Guide 2025
- The ultimate guide to AI agent architectures in 2025
- How to Build AI Agents (Complete 2025 Guide)
For issues and questions:
- Create an issue in the GitHub repository
- Email: [email protected]
- Documentation: https://docs.prototype.cafe
Built with β€οΈ by the Prototype.Cafe team