A LangChain and LangGraph-powered agent that recursively develops and enhances software projects based on high-level user requests.
- Recursive project development through iterative improvements
- Automated code generation and analysis
- Project structure management
- State tracking and development history
- Intelligent enhancement suggestions
- Python 3.8+
- OpenAI API key
- Git (optional, for version control features)
- Clone the repository:
git clone https://github.com/yourusername/recursive-agent.git
cd recursive-agent- Copy the environment template and configure your settings:
cp .env.template .envEdit .env and add your OpenAI API key and other configurations.
The project includes a Makefile for common operations:
- Initialize the environment (create virtual environment and install dependencies):
make init- Start the agent:
make run- Clean up generated files and virtual environment:
make clean- Run project tests:
make test- Enter your high-level project request, for example:
Enter your request: build a social media app
- The agent will:
- Analyze your request
- Create a basic implementation
- Recursively enhance the project
- Keep you updated on progress
- Continue until you're satisfied or type 'quit'
recursive_agent/
├── src/
│ ├── agents/ # Agent implementations
│ │ ├── tools/ # Agent tools
│ │ └── base.py # Base agent class
│ ├── workflows/ # LangGraph workflows
│ ├── config.py # Configuration
│ └── main.py # Entry point
├── memlog/ # Project state and history
├── tests/ # Test cases
├── .env.template # Environment template
└── requirements.txt # Dependencies
The agent follows a recursive development process:
-
Analysis Phase
- Understand user requirements
- Assess current project state
- Identify core functionality
-
Implementation Phase
- Generate initial code
- Set up project structure
- Implement basic features
-
Enhancement Phase
- Analyze current implementation
- Identify potential improvements
- Plan and implement enhancements
- Repeat until satisfied
-
Validation Phase
- Test functionality
- Verify requirements
- Document changes
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.