Skip to content

An experimental toolkit that transforms natural language prompts into production-ready Python applications. Features automated coding, testing, debugging, and documentation generation using DeepSeek AI. Supports both single-process and parallel multi-process execution for efficient solution discovery.

License

Notifications You must be signed in to change notification settings

rainerigius/AutoCodeAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AutoCodeAI

Project Overview

This system demonstrates an autonomous AI development workflow that transforms natural language prompts into fully functional Python applications. The toolkit features:

  • Single-process version (singleprocess.py) for straightforward execution
  • Multi-process version (multiprocess.py) with parallel processing capabilities
  • Full automation of coding, testing, debugging, and documentation

How It Works

Core Workflow

graph LR
    A[User Prompt] --> B(Prompt Optimization)
    B --> C(Code Generation)
    C --> D[Environment Setup]
    D --> E{Execution}
    E -->|Success| F[Documentation]
    E -->|Failure| G[AI Debugging]
    G --> C
Loading

Key Components

  1. Prompt Refining: Enhances user input for better AI comprehension
  2. Code Generation: Creates Python code + dependency installation commands
  3. Isolated Execution: Runs code in dedicated virtual environments
  4. AI Debugging: Automatically fixes errors through iterative improvements
  5. Documentation: Generates GitHub-ready README files

Setup Instructions

Prerequisites

# Install required packages
pip install openai

Configuration

  1. Replace "API-KEY" in both scripts with your DeepSeek API key
  2. Ensure Zsh is installed (sudo apt install zsh for Linux)

Execution

Single-process version
python singleprocess.py
Multi-process version (3 parallel attempts)
python multiprocess.py

Output Structure

Successful runs create:

random_folder/
├── venv/                 # Virtual environment
├── generated_code.py     # Functional Python code
├── README.md             # Project documentation
└── log.txt               # Execution logs with error codes

Important Notes

  1. System Compatibility: Designed for Unix-like systems (macOS/Linux)
  2. Error Codes:
    • 200: Successful execution
    • 400: Runtime error (triggers debugging)
    • 5000: Critical failure
  3. Safety Features:
    • Limited to 3 debugging iterations
    • Isolated virtual environments
    • Complete output logging

Example Output

# Sample generated code (simplified)
import numpy as np

def calculate_stats(data):
    return {
        "mean": np.mean(data),
        "median": np.median(data),
        "std_dev": np.std(data)
    }
# Sample dependency installation
pip install numpy

About

An experimental toolkit that transforms natural language prompts into production-ready Python applications. Features automated coding, testing, debugging, and documentation generation using DeepSeek AI. Supports both single-process and parallel multi-process execution for efficient solution discovery.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages