Sweep: AI-powered junior dev
Bug Reports & Feature Requests ⟶ Code Changes
Sweep is an AI junior developer that transforms bug reports & feature requests into code changes.
Describe bugs, small features, and refactors like you would to a junior developer, and Sweep:
- 🔍 reads your codebase
- 📝 plans the changes
- ⚡writes a pull request with code⚡
See highlights at https://docs.sweep.dev/about/examples (opens in a new tab).
- 🔧 Turns issues directly into pull requests (without an IDE)
- 👀 Addresses developer replies & comments on its PRs
- 🕵️♂️ Uses embedding-based code search, with popularity reranking for repository-level code understanding (🔍 Rebuilding our Search Engine in a Day (opens in a new tab))
- 🎊 New: Fixes PRs based on Github Actions feedback
Setting up Sweep is as simple as adding the GitHub bot to a repo, then creating an issue for the bot to address. We support all languages GPT4 supports, including Python, Typescript, Rust, Go, Java, C# and C++.
- Add the Sweep GitHub app (opens in a new tab) to desired repos
- Create new issue in repo, like "Sweep: Write tests". If there's an existing issue, label it with the purple "Sweep" label.
- Watch the magic happen 🪄
To get the best performance from Sweep, we recommend the following approach to writing github issues/chats.
For harder problems, try to provide the same information a human would need. For simpler problems, providing a single line and a file name should suffice.
A good issue might include:
|Where to look |
[file name or function name]
|What to do |
[change the logic to do this]
|Additional Context (optional) |
[there's a bug/we need this feature/there's this dependency]
|In ||use an os-agnostic temp directory||N/A|
|In ||we should not fire an event||because it's possible that the comment is on a closed PR|
|In the config loader in ||add a third option called "env" to load the config settings from environment variables||At present, there are two options: 1. ... and 2. ...|
If you want Sweep to use a file, try to mention the full path. Similarly, to have Sweep use a function, try to mention the class method or what it does. Also see Advanced (opens in a new tab).
We were frustrated by small tickets, like simple bug fixes, annoying refactors, and small features. Each task required us to open our IDE to fix simple bugs. So we decided to leverage the capabilities of ChatGPT to address this directly in GitHub.
Unlike existing AI solutions, this can solve entire tickets and can be parallelized + asynchronous: developers can spin up 10 tickets and Sweep will address them all at once.
- GPT-4 32k 0613 (default)
- ActiveLoop DeepLake for Vector DB with MiniLM L12 as our embeddings model
- Modal Labs for infra + deployment
Consider starring us if you're using Sweep so more people hear about us!
and, of course, Sweep!