AI Coding Agents
Tags: ai, python, productivity, opensource
Published: 2024-02-08 08:23:34

The advent of AI coding agents has ushered in a new era of productivity and innovation in software development. GPT Engineer, Aider, OpenV0 and Rawdog stand as prominent examples of these powerful tools, each offering unique strengths and capabilities. As AI technology continues to advance, we can expect even more sophisticated and versatile AI coding agents to emerge, further transforming the way developers approach their craft. Whether you are a seasoned developer seeking to streamline your workflow or a novice programmer looking for assistance, AI coding agents hold immense potential to empower you and unlock your full potential in the world of software development.

## [Aider](https://aider.chat/)
![Aider Demo](https://i.imgur.com/L0gfNXc.gif)

Aider is a command-line tool which uses GPT-3.5/4 to edit and create code in a local git repo. You can either start from scratch or use it to make changes to an existing repo. After each edit Aider makes, it automatically commits the changes to git allowing for easy version control and rollbacks. To give Aider context, you simply run `/add <files_to_include>`, eg. `/add main.py utils.py` and you then ask it to make a change or addition. I find myself using Aider the most out of all the AI coding agents on this list as I do most of my work in the command-line. 

## [GPT-Engineer](https://github.com/gpt-engineer-org/gpt-engineer)
![GPT-Engineer Demo](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExbXFzMmx0a2dzd3pleGoydGxobDRoYmtsaXNoczFyYnBldDMzdzU1cyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/JSk6oJpM7CO9RQnY7I/giphy.gif)
GPT-Engineer is slightly different to Aider in that it focuses on creating new applications from scratch. You simply provide it with a software requirements specification document and it attempts to build the solution from the ground up. Where GPT-Engineer shines is creating projects from scratch. I find GPT-Engineer very useful for rapid prototyping and exploring new ideas, as it allows me to create code without writing a single line myself. It has recently implemented support for modifying existing source-code/projects but the process is not as straightforward as it is with Aider for example. The process of modifying an existing project involves copying your existing project's code to a sub-directory of your GPT-Engineer installation and then creating a `prompt` file pointing to the sub-directory and containing the change(s) you wish to make to the code. 

## [OpenV0](https://github.com/raidendotai/openv0)
![OpenV0 Demo](https://i.imgur.com/NHJJ0w3.gif)
OpenV0 is another unique entry in this list. It deals exclusively with creating custom React/Next.js/Svelte components with TailwindCSS based on user input. In its current state, it allows you to choose from a few different React Component Libraries: NextUI, Flowbite or Shadcn. It has a very easy-to-use UI where you specify what type of component you need and OpenV0 will then generate the code in front of you and render the component in the same app. If you're unhappy with the result, you can specify any specific changes you want it to make. Once satisfied, you simply copy the component's code and paste it in your project. OpenV0 has been quite useful for me as frontend UI design is not my forte. It helps me quickly create components without much effort.

## [Rawdog](https://github.com/AbanteAI/rawdog)
![Rawdog Demo](https://i.imgur.com/cYcl7u6.gif)
Rawdog is slightly different to the other AI Coding Agents in this blogpost as it enables you to perform various tasks directly from the command-line by creating Python scripts based on your input. It describes itself as "a CLI assistant that responds by generating and auto-executing a Python script". Eg. if you execute the command `rawdog show me my docker images`, rawdog will quickly create the following and execute it:
```python
# Model: gpt-4-1106-preview
# Prompt: PROMPT: show me my docker images
# Response Cost: 0.0123900000
import subprocess

try:
    result = subprocess.run(['docker', 'images'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
    if result.returncode == 0:
        print("Docker images on your system:")
        print(result.stdout)
    else:
        print("Error listing Docker images:", result.stderr)
except Exception as e:
    print("Error executing Docker command:", e)
```
Rawdog uses LiteLLM which means it has built-in support for all of the major LLM Providers and Models such as OpenAI, Anthropic, VertexAI and also self-hosted open-source models via Ollama.

## Open-Source LLMs Usage
![LM Studio Screenshot](https://i.imgur.com/abywB1L.jpeg)
> LM Studio Screenshot

All of the AI Coding Agents I discussed in this blogpost are compatible with open-source models via tools like LM Studio and Ollama. LM Studio and Ollama are incredibly useful tools as they allow you to download and serve open-source models in the same , such as Mistral and CodeLlama.

_This blogpost was originally posted to my personal blog at https://jonte.au/blog_