Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
December 6, 2023 16:58
July 29, 2023 14:26
July 29, 2023 14:26
July 29, 2023 14:32
November 22, 2023 22:08
September 18, 2023 20:41
August 7, 2023 11:44
August 19, 2023 14:52

Autonomous Agent for Test-Driven Development (TDD)

"Programmers have programmed themselves out of jobs" - Unknown

tddGPT: ReactJS Counter App with GPT3.5

tddGPT is an autonomous coding agent that builds applications in ReactJS, Flask, Express, and more, all while adhering to the Test-Driven Development (TDD) methodology. It operates entirely without human intervention. Beginning with a project plan, tddGPT translates requirements into tests, develops code based on those tests, and debugs until all tests pass. The TDD framework keeps the agent focused and goal-oriented.

The core architecture is elegantly simple, utilizing just three tools: CLI, ReadFile, and WriteFile. It has been adpated from Langchain's AutoGPT example. Most enhancements were performed by ChatGPT Plus itself over the course of a month-long chat. The initially aim was to test the limits of GPT-4's capabilities in building ReactJS apps end-to-end. In the process, it gained an understanding of temporal concepts like past, present, and future, as well as cause and effect.

Utilizing GPT-4 Turbo and GPT-4 Vision, the system is capable of transforming wireframes or screenshots, in conjunction with detailed user stories, into fully functional applications, complete with all necessary tests. The expanded context window of GPT-4 Turbo facilitates its functioning as an integrated team comprising a Product Owner, Programmer, and Tester. This enhanced capacity allows for the handling of significantly more intricate and detailed user stories.

The agent is not just a code generator; it’s also a learner. It evaluates its mistakes and areas for improvement as a final step, and some of these insights have already been incorporated into its operating prompts.

This project is in early alpha stage. GPT-4 API key is required.

Setup Instructions

  1. Setup a virtual environment:
python3 -m venv env
  1. Activate the virtual environment:
  • On macOS and Linux:
    source env/bin/activate
  • On Windows:
  1. Clone the repository to your local machine:
git clone

  1. Navigate to the project directory:
cd tddGPT
  1. Run the following command to install the package and its dependencies:
python install
  1. Set up your GPT-4 API keys as environment variables.
export OPENAI_API_KEY="sk-..."
  1. Run the
cd tdd-gpt
python --model gpt-4-1106-preview or gpt-3.5-turbo --prompt "Your prompt here" --temperature 0.2 --context_window 128000

Check the counter-app directory for the generated app.

Example apps

The following are some apps have been built by this agent.

Similar Projects


We welcome contributions to this project. Please feel free to submit issues and pull requests. For major changes, please open an issue first to discuss what you would like to change.


This project is open source, under the MIT license.


If you have any questions or comments, please feel free to reach out to us on GitHub.