Type something to search...
Sweep AI

Sweep AI

Sweep AI

7.1k 400
04 May, 2024

What is Sweep ?

Sweep is an AI junior developer that turns bugs and feature requests into code changes. Sweep automatically handles devex improvements like adding typehints/improving test coverage.

Sweep Features

  • Turns issues directly into pull requests (without an IDE)

  • Addresses developer replies & comments on its PRs

  • Understands your codebase using the dependency graph, text, and vector search.

  • Runs your unit tests and autoformatters to validate generated code.

  • Stack small fixes into your PR by applying Sweep Rules

What makes Sweep Different

  • Modifying Code - LLMs like GPT4 don’t have a great way to automatically modify code. We heavily experiment on different ways to modify code so you don’t have to. We’ve spent a really long time working on this - check out https://docs.sweep.dev/blogs/gpt-4-modification!

  • Planning Code Changes - Retrieval-Augmented-Generation isn’t enough. We wrote a code chunker that’s used fairly heavily, and we’re constantly improving this: https://docs.sweep.dev/blogs/chunking-improvements

  • Sweep runs your Github Actions, catching bugs and making sure each line of new code has been properly validated!

  • Sweep uses it’s sandbox to format your code, and uses Rules to perform other changes like adding typehints, or any other small chores!

Limitations of Sweep

  • Gigantic repos: >5000 files. We have default extensions and directories to exclude but sometimes this doesn’t catch them all. You may need to block some directories (see blocked_dirs)

    • If Sweep is stuck at 0% for over 30 min and your repo has a few thousand files, let us know.

Large-scale refactors: >3 files or >150 lines of code changes

- e.g. Refactor the entire codebase from TensorFlow to PyTorch
- Sweep works best when pointed to a file, and we're continously improving Sweep's automation!

Editing images and other non-text assets

- e.g. Use the logo to create favicons for our landing page


Install Sweep

Install Sweep and open a Github Issue like: Sweep: Add typehints to src/utils/github_utils.py and Sweep will:

  1. Search through your codebase to find the dependencies of github_utils.py

  2. Modify the code to add typehints

  3. Run and debug your code to write a Pull Request

Getting Started

GitHub App

Install Sweep by adding the Sweep GitHub App to your desired repositories.

  • For more details, visit our installation page.

  • Note: Sweep only considers issues with the “Sweep:” title on creation and not on update. If you want Sweep to pick up an existing issue, you can add the “Sweep” label to the issue.

  • We focus on Python but support all languages GPT-4 can write. This includes JS/TS, Rust, Go, Java, C# and C++.


You can self-host Sweep with our Docker image ( https://hub.docker.com/r/sweepai/sweep ). Please check out our deployment instructions here! https://docs.sweep.dev/deployment


Starting the Webhook

  1. Clone the repo with git clone https://github.com/sweepai/sweep.

  2. Create .env according to https://docs.sweep.dev/deployment.

  3. Run docker compose up --build. This will take a few moments to start.

To build our Docker images, run docker compose build .