How to install and get started with AI Dev.

Prerequisites

Install

You can install and run the CLI with this command:

npx ai-dev@latest

Your First Task

After you’ve run the npx command for the first time, it’ll prompt you to kick off a first task, asking you a series of questions:

  1. Specify the folder/repository. Paste in the folder where your code for the project is. This can be a relative or an absolute path.
    1. Note: AI Dev won’t make any edits to this without double-checking with you first. It’ll copy this folder into a Docker container to use as a workspace.
  2. Specify the task. Write a task for the agent to perform, in the same level of specificity that you would for a new engineer seeing the codebase for the first time. Examples:
    1. “Update my README.md to describe how X feature works”
    2. “Fix TODO comments in my codebase”
    3. “Install Sentry in my project”
  3. Specify a folder to output the agent's results in. We’ll dump two files into the folder:
    1. results.md: a listing of Magnet Agent’s thought process
    2. patch.diff: a patch file for the changes that can be applied locally.
  4. Specify the OpenAI model to use. GPT-4 works the best, by far. But it’s expensive and we offer GPT-3.5-Turbo for you to tinker with AI Dev at a lower cost.
  5. Clarify the task description before starting? If you say yes, the agent will ask clarifying questions to use to improve your task before diving into it. This can help AI Dev complete the task more reliably.

After you fill that in, the agent will work on your task, which typically takes 2-3 minutes.

Thoughts & Tools

It’ll list out its thought process, along with the set of tools that it’s using along the way, such as: