$ show Significant-Gravitas/AutoGPT
AutoGPT is a full-stack SaaS platform for building, deploying, and running AI agents. It provides a visual agent builder (blocks), a copilot chat interface that can generate and orchestrate agents from natural language, a marketplace for sharing agents and skills, team/experts management with scheduling and credential stacks, and a subscription billing system with Stripe. The architecture is a multi-service backend (FastAPI, PostgreSQL, Redis) with a Next.js frontend, supporting real-time WebSocket execution events, OAuth integrations with 45+ providers, and feature flags via LaunchDarkly and PostHog. The platform is dual-licensed (Polyform Shield for platform code, MIT for classic code) and supports both hosted SaaS and self-hosted deployment. The codebase is organized into two major areas: `autogpt_platform/` (the current platform) and `classic/` (legacy AutoGPT and Forge). The platform backend uses a block-based execution system where each integration (Google, Slack, GitHub, etc.) is a self-contained block with typed I/O schemas, cost tracking, and credential management. The frontend features a rich component library with dynamic form rendering (RJSF), responsive dialog/drawer patterns, and extensive state management via TanStack Query and Zustand. Key entry points include the copilot chat UI, the agent library, marketplace, team management, and admin panels. Primary data flows involve user input through the copilot or builder, which triggers graph execution via the execution manager, with events streamed over WebSocket. Credits are deducted per block execution, and billing is handled through Stripe subscriptions with trial management. Analytics events are sent to PostHog and DataFast for product metrics. The system relies on external dependencies including PostgreSQL (with pgvector), Redis, Stripe, LaunchDarkly, PostHog, Sentry, and numerous third-party APIs for integrations.
The LLM identified 5 files worth highlighting for reuse:
Base class for all integration blocks. Defines a reusable pattern for declaring input/output schemas (Pydantic), cost registration, credential fields, and execution logic. Any new integration can be added by subclassing and implementing `run()`. This pattern is self-contained and could be extracted to build a generic block execution framework.
A dynamic form renderer built on RJSF (React JSON Schema Form) with a registry of custom field types (credentials, LLM model picker, multi-select, table, Google Drive picker). It automatically generates UI from block input schemas. The pattern of a pluggable field registry is reusable for any schema-driven form generation.
A responsive dialog component that renders as a modal on large screens and a drawer on mobile. Uses Radix UI primitives and Framer Motion for animations. The pattern of a single component adapting to viewport is reusable and demonstrates clean separation of concerns.
Implements a human-in-the-loop review block that pauses execution until a user approves or rejects an action. It uses WebSocket events to notify the frontend and waits for a response. This pattern is self-contained and could be reused in any workflow system requiring human approval.
A rate-limiting decorator that enforces credit-based usage limits per user. It checks credit balance before allowing block execution and deducts credits atomically. The pattern of a reusable decorator for resource consumption is clean and could be adapted for other metering systems.