A multi-agent code generator system powered by OpenAI that automatically converts user requirements into a complete Rust web server implementation.
- 🤖 Multi-Agent Collaboration
- Project Manager: Project coordination and requirements analysis
- Solution Architect: System design and API planning
- Backend Developer: Code generation and testing
- 🏗️ Automated Code Generation
- Template-based generation
- CRUD operations
- User authentication
- External API integration
- 🧪 Automated Testing & Fixing
- Unit testing
- Bug detection
- Auto-fixing
- API endpoint validation
/
├── autogpt/ # AI Code Generator
│ ├── src/
│ │ ├── ai_functions/ # AI function definitions
│ │ ├── apis/ # OpenAI API integration
│ │ ├── helpers/ # Utility functions
│ │ ├── models/ # Agent models
│ │ └── main.rs # Entry point
│ ├── schemas/ # API schemas
│ └── Cargo.toml
│
└── web-server/ # Server Template
├── src/
│ ├── main.rs # Generated server code
│ └── code_template.rs # Base template
├── database.json # Persistence
└── Cargo.toml
- Rust (latest stable)
- OpenAI API Key
- Cargo
- Clone the repository
git clone <repository-url>- Set up environment variables
cd autogpt
touch .env
# Add your OpenAI API key to .env
# OPEN_AI_KEY=your-api-key
# OPEN_AI_ORG=your-org-id- Run
cargo run- User inputs requirements
- Managing Agent analyzes requirements and coordinates work
- Solution Architect designs system architecture
- Backend Developer generates code
- System automatically tests and fixes issues
The web-server template provides:
- Actix-web framework integration
- CORS support
- JSON persistence
- Thread-safe state management
- Basic data structures
- Database operations
- User management
- External API integration
The base template (web-server/src/code_template.rs) can be modified to:
- Add new base functionality
- Modify default implementations
- Include additional dependencies
- Generated code requires manual review
- Basic security measures implemented by default
- Production deployments should undergo security audit