Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeyu-chen/multi-agent-code-generator
A multi-agent system that converts user requirements into Rust web server implementations using OpenAI
https://github.com/zeyu-chen/multi-agent-code-generator
multi-agent openai rust
Last synced: 26 days ago
JSON representation
A multi-agent system that converts user requirements into Rust web server implementations using OpenAI
- Host: GitHub
- URL: https://github.com/zeyu-chen/multi-agent-code-generator
- Owner: Zeyu-Chen
- Created: 2024-09-18T12:40:52.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-08T00:43:33.000Z (about 2 months ago)
- Last Synced: 2024-11-08T01:36:10.633Z (about 2 months ago)
- Topics: multi-agent, openai, rust
- Language: Rust
- Homepage:
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multi-Agent Code Generator
[![Rust](https://img.shields.io/badge/Rust-1.8-000000?logo=rust&logoColor=white)](https://www.rust-lang.org/)
[![Actix Web](https://img.shields.io/badge/Actix_Web-4.3-000000?logo=rust&logoColor=white)](https://actix.rs/)
[![OpenAI](https://img.shields.io/badge/OpenAI-v1-412991?logo=openai&logoColor=white)](https://openai.com/)
[![Tokio](https://img.shields.io/badge/Tokio-1.28-0BA8E9?logo=rust&logoColor=white)](https://tokio.rs/)A multi-agent code generator system powered by OpenAI that automatically converts user requirements into a complete Rust web server implementation.
## Core Features
- ๐ค 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## Project Structure
```
/
โโโ 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
```## Quick Start
### Prerequisites
- Rust (latest stable)
- OpenAI API Key
- Cargo### Installation
1. Clone the repository
```bash
git clone
```2. Set up environment variables
```bash
cd autogpt
touch .env
# Add your OpenAI API key to .env
# OPEN_AI_KEY=your-api-key
# OPEN_AI_ORG=your-org-id
```3. Run
```bash
cargo run
```## How It Works
1. User inputs requirements
2. Managing Agent analyzes requirements and coordinates work
3. Solution Architect designs system architecture
4. Backend Developer generates code
5. System automatically tests and fixes issues## Web Server Template
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### Template Customization
The base template (`web-server/src/code_template.rs`) can be modified to:
- Add new base functionality
- Modify default implementations
- Include additional dependencies## Security
- Generated code requires manual review
- Basic security measures implemented by default
- Production deployments should undergo security audit