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).
π Features
- π§ 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
π Getting Started
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 πͺ
π² Recipes
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 sweepai/app/ui.py | use an os-agnostic temp directory | N/A |
In on_comment.py | we should not fire an event | because it's possible that the comment is on a closed PR |
In the config loader in packages/server/src/config.ts | 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).
π€ Contributing
Contributions are welcome and greatly appreciated! For detailed guidelines on how to contribute, please see the CONTRIBUTING.md file. For more detailed docs, see π Quickstart (opens in a new tab).
π Story
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.
π The Stack
- GPT-4 32k 0613 (default)
- ActiveLoop DeepLake for Vector DB with MiniLM L12 as our embeddings model
- Modal Labs for infra + deployment
πΊοΈ Roadmap
See πΊοΈ Roadmap (opens in a new tab)
β Star History
Consider starring us if you're using Sweep so more people hear about us!
Contributors
and, of course, Sweep!