## Summary This PR implements comprehensive performance fixes for the AutoGPT Platform, addressing critical load testing bottlenecks and database connectivity issues: ### 🚀 Load Testing Infrastructure & Performance Fixes **Problem:** Platform failed under 100+ RPS load due to database bottlenecks and inefficient API patterns. **Root Cause Analysis:** - Database connection pool exhaustion (50 connections/pod limit) - Unnecessary `/api/auth/user` calls causing repeated database lookups - Large API payloads (4.6MB for `/api/graphs`, 3.9MB for `/api/executions`) - Missing user profile caching led to O(n) database queries per request **Solutions Implemented:** #### 1. User Profile Caching System - **Implementation:** Use existing `async_ttl_cache` from autogpt_libs for user lookup optimization - **Applied to:** `get_or_create_user`, `get_user_by_id`, `get_user_by_email` in `/backend/backend/data/user.py` - **Performance impact:** Eliminates repeated database lookups, reduces connection pool pressure - **Cache invalidation:** Automatic cleanup on user updates maintains data consistency #### 2. Load Test Infrastructure Overhaul - **k6 Load Testing Suite:** Production-ready tests with Grafana Cloud integration - **Rate Limit Optimization:** Configure for 5 VUs with high `REQUESTS_PER_VU` to avoid Supabase limits - **Realistic User Workflows:** Replace API hammering with actual user journey patterns - **Comprehensive Coverage:** Basic connectivity, core APIs, graph execution, platform integration #### 3. Interactive Load Testing Tools **Interactive CLI (`interactive-test.js`):** - Guided test selection with descriptions and recommendations - Environment targeting (Local, Dev, Production) - Parameter validation and k6 cloud integration - User-friendly interface for non-technical users **Enhanced Single Endpoint Testing (`single-endpoint-test.js`):** - Support for up to 500 concurrent requests per VU using `http.batch()` - Individual endpoint debugging (credits, graphs, blocks, executions) - Burst load testing capabilities for RPS validation - Performance isolation for specific API bottlenecks #### 4. Sub-Agent Approval Automation - **Auto-approve sub-agents** when main agent is approved for seamless store workflow - **Transaction safety** with atomic operations via database transactions - **Parallel processing** using asyncio.gather for performance - **Hidden from store** with isAvailable=false for sub-agents **Performance Results:** - ✅ **API Payload Optimization:** /api/graphs reduced from 4.6MB → 149KB (97% smaller, 20x faster) - ✅ **Load Testing Success:** Sustained 100+ RPS with 100% success rate on k6 cloud - ✅ **Database Efficiency:** User profile caching eliminates repeated lookups - ✅ **Rate Limit Resolution:** No more 429 errors with optimized VU configuration ### 🔧 Database Health Check & Retry Improvements **Problem:** Execution ID `230a8036-9ba7-47c3-8f01-40bf21a9ff42` failed due to database connectivity issues. **Database Manager Health Check Improvements:** - **Replace ineffective health check** that only checked `db.is_connected()` - **Add actual database query test** using `db.query_raw_with_schema("SELECT 1 as health_check")` - **Detect Prisma query engine failures** that cause HTTP 500 errors during execution - **Detailed error messaging** for better observability and debugging **Service Communication Retry Enhancements:** - **Increase retry attempts** from 5 to 8 for better resilience - **Add configurable max wait time** (`pyro_client_max_wait`, default 15s vs 5s hardcoded) - **Longer retry intervals** help handle intermittent Supabase connectivity issues ## Impact ### Load Testing & Performance - ✅ **Eliminates database bottlenecks** preventing 100+ RPS load capacity - ✅ **User profile caching** reduces database connection pool pressure - ✅ **Realistic load testing** validates actual platform capacity vs infrastructure limits - ✅ **Interactive tools** enable easy performance debugging and validation - ✅ **Sub-agent automation** streamlines store approval workflows ### Database Reliability - ✅ **Prevents execution engine failures** from database connectivity issues - ✅ **Kubernetes will restart unhealthy pods** when real database problems occur - ✅ **Better handling of intermittent Supabase service degradation** - ✅ **More resilient service-to-service communication** across the platform ## Test Results **Load Testing Validation (k6 Cloud Project ID: 4254406):** - Basic Connectivity: 560+ RPS sustained, 100% success rate - Core API: 500 concurrent requests, 100% success rate, full 7-minute duration - Graph Execution: 100 concurrent operations, successful under load - Comprehensive Platform: End-to-end user workflows, 100% completion rate **Database Health Check:** - [x] Health check properly fails when database queries fail - [x] Health check passes when database is working correctly - [x] Retry configuration applied to database manager calls - [x] Code formatting and linting pass ## Files Modified **Load Testing Infrastructure:** - `load-tests/interactive-test.js` - Interactive CLI for guided test execution - `load-tests/single-endpoint-test.js` - Enhanced single endpoint testing with high concurrency - `load-tests/README.md` - Comprehensive documentation with usage examples - Multiple existing test files enhanced for k6 cloud compatibility **Performance Optimizations:** - `backend/backend/data/user.py` - User profile caching implementation - `backend/backend/server/routers/v1.py` - API endpoint improvements - `backend/backend/data/store.py` - Sub-agent approval automation **Database & Health Checks:** - `backend/backend/data/db.py` - Enhanced database health check with actual query testing - `backend/backend/util/service.py` - Improved retry configuration for service communication 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
AutoGPT: Build, Deploy, and Run AI Agents
Deutsch | Español | français | 日本語 | 한국어 | Português | Русский | 中文
AutoGPT is a powerful platform that allows you to create, deploy, and manage continuous AI agents that automate complex workflows.
Hosting Options
- Download to self-host (Free!)
- Join the Waitlist for the cloud-hosted beta (Closed Beta - Public release Coming Soon!)
How to Self-Host the AutoGPT Platform
Note
Setting up and hosting the AutoGPT Platform yourself is a technical process. If you'd rather something that just works, we recommend joining the waitlist for the cloud-hosted beta.
System Requirements
Before proceeding with the installation, ensure your system meets the following requirements:
Hardware Requirements
- CPU: 4+ cores recommended
- RAM: Minimum 8GB, 16GB recommended
- Storage: At least 10GB of free space
Software Requirements
- Operating Systems:
- Linux (Ubuntu 20.04 or newer recommended)
- macOS (10.15 or newer)
- Windows 10/11 with WSL2
- Required Software (with minimum versions):
- Docker Engine (20.10.0 or newer)
- Docker Compose (2.0.0 or newer)
- Git (2.30 or newer)
- Node.js (16.x or newer)
- npm (8.x or newer)
- VSCode (1.60 or newer) or any modern code editor
Network Requirements
- Stable internet connection
- Access to required ports (will be configured in Docker)
- Ability to make outbound HTTPS connections
Updated Setup Instructions:
We've moved to a fully maintained and regularly updated documentation site.
👉 Follow the official self-hosting guide here
This tutorial assumes you have Docker, VSCode, git and npm installed.
⚡ Quick Setup with One-Line Script (Recommended for Local Hosting)
Skip the manual steps and get started in minutes using our automatic setup script.
For macOS/Linux:
curl -fsSL https://setup.agpt.co/install.sh -o install.sh && bash install.sh
For Windows (PowerShell):
powershell -c "iwr https://setup.agpt.co/install.bat -o install.bat; ./install.bat"
This will install dependencies, configure Docker, and launch your local instance — all in one go.
🧱 AutoGPT Frontend
The AutoGPT frontend is where users interact with our powerful AI automation platform. It offers multiple ways to engage with and leverage our AI agents. This is the interface where you'll bring your AI automation ideas to life:
Agent Builder: For those who want to customize, our intuitive, low-code interface allows you to design and configure your own AI agents.
Workflow Management: Build, modify, and optimize your automation workflows with ease. You build your agent by connecting blocks, where each block performs a single action.
Deployment Controls: Manage the lifecycle of your agents, from testing to production.
Ready-to-Use Agents: Don't want to build? Simply select from our library of pre-configured agents and put them to work immediately.
Agent Interaction: Whether you've built your own or are using pre-configured agents, easily run and interact with them through our user-friendly interface.
Monitoring and Analytics: Keep track of your agents' performance and gain insights to continually improve your automation processes.
Read this guide to learn how to build your own custom blocks.
💽 AutoGPT Server
The AutoGPT Server is the powerhouse of our platform This is where your agents run. Once deployed, agents can be triggered by external sources and can operate continuously. It contains all the essential components that make AutoGPT run smoothly.
Source Code: The core logic that drives our agents and automation processes.
Infrastructure: Robust systems that ensure reliable and scalable performance.
Marketplace: A comprehensive marketplace where you can find and deploy a wide range of pre-built agents.
🐙 Example Agents
Here are two examples of what you can do with AutoGPT:
-
Generate Viral Videos from Trending Topics
- This agent reads topics on Reddit.
- It identifies trending topics.
- It then automatically creates a short-form video based on the content.
-
Identify Top Quotes from Videos for Social Media
- This agent subscribes to your YouTube channel.
- When you post a new video, it transcribes it.
- It uses AI to identify the most impactful quotes to generate a summary.
- Then, it writes a post to automatically publish to your social media.
These examples show just a glimpse of what you can achieve with AutoGPT! You can create customized workflows to build agents for any use case.
License Overview:
🛡️ Polyform Shield License:
All code and content within the autogpt_platform folder is licensed under the Polyform Shield License. This new project is our in-developlemt platform for building, deploying and managing agents.
Read more about this effort
🦉 MIT License:
All other portions of the AutoGPT repository (i.e., everything outside the autogpt_platform folder) are licensed under the MIT License. This includes the original stand-alone AutoGPT Agent, along with projects such as Forge, agbenchmark and the AutoGPT Classic GUI.
We also publish additional work under the MIT Licence in other repositories, such as GravitasML which is developed for and used in the AutoGPT Platform. See also our MIT Licenced Code Ability project.
Mission
Our mission is to provide the tools, so that you can focus on what matters:
- 🏗️ Building - Lay the foundation for something amazing.
- 🧪 Testing - Fine-tune your agent to perfection.
- 🤝 Delegating - Let AI work for you, and have your ideas come to life.
Be part of the revolution! AutoGPT is here to stay, at the forefront of AI innovation.
📖 Documentation | 🚀 Contributing
🤖 AutoGPT Classic
Below is information about the classic version of AutoGPT.
🛠️ Build your own Agent - Quickstart
🏗️ Forge
Forge your own agent! – Forge is a ready-to-go toolkit to build your own agent application. It handles most of the boilerplate code, letting you channel all your creativity into the things that set your agent apart. All tutorials are located here. Components from forge can also be used individually to speed up development and reduce boilerplate in your agent project.
🚀 Getting Started with Forge – This guide will walk you through the process of creating your own agent and using the benchmark and user interface.
📘 Learn More about Forge
🎯 Benchmark
Measure your agent's performance! The agbenchmark can be used with any agent that supports the agent protocol, and the integration with the project's CLI makes it even easier to use with AutoGPT and forge-based agents. The benchmark offers a stringent testing environment. Our framework allows for autonomous, objective performance evaluations, ensuring your agents are primed for real-world action.
📦 agbenchmark on Pypi
|
📘 Learn More about the Benchmark
💻 UI
Makes agents easy to use! The frontend gives you a user-friendly interface to control and monitor your agents. It connects to agents through the agent protocol, ensuring compatibility with many agents from both inside and outside of our ecosystem.
The frontend works out-of-the-box with all agents in the repo. Just use the CLI to run your agent of choice!
📘 Learn More about the Frontend
⌨️ CLI
To make it as easy as possible to use all of the tools offered by the repository, a CLI is included at the root of the repo:
$ ./run
Usage: cli.py [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
agent Commands to create, start and stop agents
benchmark Commands to start the benchmark and list tests and categories
setup Installs dependencies needed for your system.
Just clone the repo, install dependencies with ./run setup, and you should be good to go!
🤔 Questions? Problems? Suggestions?
Get help - Discord 💬
To report a bug or request a feature, create a GitHub Issue. Please ensure someone else hasn't created an issue for the same topic.
🤝 Sister projects
🔄 Agent Protocol
To maintain a uniform standard and ensure seamless compatibility with many current and future applications, AutoGPT employs the agent protocol standard by the AI Engineer Foundation. This standardizes the communication pathways from your agent to the frontend and benchmark.