TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Launch HN: Sweep (YC S23) – A bot to create simple PRs in your codebase

198 pointsby williamzeng0almost 2 years ago
Hi HN! We’re William and Kevin, cofounders of Sweep (<a href="https:&#x2F;&#x2F;sweep.dev&#x2F;">https:&#x2F;&#x2F;sweep.dev&#x2F;</a>). Sweep is an open-source AI-powered junior developer. You describe a feature or bugfix in a GitHub issue and Sweep writes a pull request with code. You can see some examples here: <a href="https:&#x2F;&#x2F;docs.sweep.dev&#x2F;examples">https:&#x2F;&#x2F;docs.sweep.dev&#x2F;examples</a>.<p>Kevin and I met while working at Roblox. We talked to our friends who were junior developers and noticed a lot of them doing grunt work. We wanted to let them focus on important work. Copilot is great, but we realized some tasks could be completely offloaded to an AI (e.g. adding a banner to your webpage <a href="https:&#x2F;&#x2F;github.com&#x2F;sweepai&#x2F;landing-page&#x2F;issues&#x2F;225">https:&#x2F;&#x2F;github.com&#x2F;sweepai&#x2F;landing-page&#x2F;issues&#x2F;225</a>).<p>Sweep does this with a code search engine. We use code chunking, ranking, and formatting tricks to represent your codebase in a token-efficient manner for LLMs. You might have seen our blog on code chunking here: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36948403">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36948403</a>.<p>We take these fetched code snippets and come up with a plan to write the PR. We found that having the LLM provide structured information using XML tags is very robust, as it’s easy for us to parse with regex, has good support for multi-line answers and is hard for the LLM to mess up.<p>This is because XML is common in the LLM’s training data (the internet &#x2F; HTML), and the opening and closing tags rarely appear naturally in text and code, unlike the quotations, brackets, backticks and newlines used by JSON’s and markdown’s delimiters. Further, XML lets you skip the preamble (“This question has to do with xyz. Here is my answer:”) and handles multi-line answers like PR plans and code really well. For example, we ask the LLM for the new code in &lt;new_code&gt; tags and a final boolean answer by writing &lt;answer&gt;True&lt;&#x2F;answer&gt;.<p>We use this XML format to get the LLM to create a plan, generating a list of files to create and modify from the retrieved relevant files. We iterate through the file changes and edit&#x2F;create the necessary files. Finally, we push the commits to GitHub and create the PR.<p>We’ve been using Sweep to handle small issues in Sweep’s own repo (it recently passed 100 commits). We’ve become well acquainted with its limitations. For example, Sweep sometimes leave unimplemented functions with just “# rest of code” since it runs on GPT-4, a model tuned for chatting. Other times, there’s minor syntax errors or undefined variables. This is why we spend the other half of our time building self-recovery methods for Sweep to fix and test its PRs.<p>First, we invite the developer to review and add comments to Sweep’s pull request. This helps to a point, but Sweep’s code sometimes wouldn’t lint. This is table stakes. It’s frustrating to have to tell the bot to “add an import here” or “this variable is undefined”. To make this better, we used GitHub Actions, which automatically runs the flow of “check the code → tell sweep → sweep fixes the code → check the code again”. We like this flow because you might already have GitHub Actions, and it’s fully configurable. Check out this blog to learn more <a href="https:&#x2F;&#x2F;docs.sweep.dev&#x2F;blogs&#x2F;giving-dev-tools">https:&#x2F;&#x2F;docs.sweep.dev&#x2F;blogs&#x2F;giving-dev-tools</a>.<p>So far, Sweep isn’t that fast, can’t handle massive problems yet, and doesn’t write hundreds of lines of code. We’re excited to work towards that. In the meantime, a lot of our users have been able to get useful results. For example, a user reported that an app was not working correctly on Windows, and Sweep wrote the PR at <a href="https:&#x2F;&#x2F;github.com&#x2F;sweepai&#x2F;sweep&#x2F;pull&#x2F;368&#x2F;files">https:&#x2F;&#x2F;github.com&#x2F;sweepai&#x2F;sweep&#x2F;pull&#x2F;368&#x2F;files</a>, replacing all occurrences of &quot;&#x2F;tmp&quot; with &quot;tempfile.gettempdir()&quot;. Other examples include adding a validation function for Github branch name (<a href="https:&#x2F;&#x2F;github.com&#x2F;sweepai&#x2F;sweep&#x2F;pull&#x2F;461">https:&#x2F;&#x2F;github.com&#x2F;sweepai&#x2F;sweep&#x2F;pull&#x2F;461</a>) and adding dynamically generated initials in the testimonials on our landing page (<a href="https:&#x2F;&#x2F;github.com&#x2F;wwzeng1&#x2F;landing-page&#x2F;issues&#x2F;28">https:&#x2F;&#x2F;github.com&#x2F;wwzeng1&#x2F;landing-page&#x2F;issues&#x2F;28</a>). For more examples, checkout <a href="https:&#x2F;&#x2F;docs.sweep.dev&#x2F;examples">https:&#x2F;&#x2F;docs.sweep.dev&#x2F;examples</a>.<p>Our focus is on finding ways that an AI dev can actually help and not just be a novelty. I think of my daily capacity to write good code as a stamina bar. There’s a fixed cost to opening an IDE, finding the right lines of code, and making changes. If you’re working on a big feature and have to context switch, the cost is higher. I’ve been leaving the small changes to Sweep, and my stamina bar stays full for longer.<p>Our repo is at <a href="https:&#x2F;&#x2F;github.com&#x2F;sweepai&#x2F;sweep">https:&#x2F;&#x2F;github.com&#x2F;sweepai&#x2F;sweep</a>, there’s a demo video at <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=WBVna_ow8vo">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=WBVna_ow8vo</a>, and you can install Sweep here: <a href="https:&#x2F;&#x2F;github.com&#x2F;apps&#x2F;sweep-ai">https:&#x2F;&#x2F;github.com&#x2F;apps&#x2F;sweep-ai</a>. We currently have a freemium model, with 5 GPT-4 PRs at the free tier, 120 GPT-4 PRs at the paid tier and unlimited at the enterprise tier.<p>We’re far from our vision of a full AI software engineer, but we’re excited to work on it with the community feedback :). Looking forward to hearing any of your thoughts!

30 comments

mellosoulsalmost 2 years ago
<i>Sweep is an open-source AI-powered junior developer. </i><p>I think you should be less bullish on the &quot;open source&quot;. As you kindly clarified for me the other day when I asked [1], only the client is open source. The back end is closed (that&#x27;s Sweep back end, not the LLM which is obvious) and the product as a whole cannot be self-hosted by third parties.<p>That&#x27;s fine (though not clear what the benefit is to developers who might want to contribute), but at the moment the impression being given is that this is an open source product.<p>Of course, if I have misunderstood I&#x27;ll be happy to be corrected.<p>I wish you the best with it as this seems like a very cool product even if its closed at core - but a lack of clarity now may undermine reception and goodwill later.<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36953720">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36953720</a>
评论 #37003065 未加载
评论 #36999451 未加载
gcanyonalmost 2 years ago
Your demo video <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=WBVna_ow8vo">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=WBVna_ow8vo</a> is <i>ridiculously</i> compelling. You need to make a better version of the video, and maybe a few more of them.
评论 #36993514 未加载
评论 #36989968 未加载
评论 #36991378 未加载
huijzeralmost 2 years ago
I think this makes sense. I&#x27;ve seen many situations of large software projects where some bug is just open for months or even years and actually very easy to fix. In hindsight then, it was then a lot of missed value if the bug just lingered around for no good reason. If there was some tool that could just run in the background and randomly pop up a PR from time to time, then that would be cool.<p>Good luck!
评论 #36988387 未加载
评论 #37010494 未加载
评论 #36988448 未加载
dottedmagalmost 2 years ago
CC-NC-SA is not an open-source license. Please do not use &quot;open source&quot; to describe your software in your marketing materials.
评论 #37104380 未加载
latortugaalmost 2 years ago
Interesting that your tagline is &quot;spend less time writing, more time reviewing code&quot; in the video. Developers already don&#x27;t like reading the code, we even have a ubiquitous acronym for it. Writing is the fun part.<p>In my experience, junior developers become mid level developers by writing code, by practicing, by building small features, by doing grunt work. If they wanted to use an AI to do those tasks for them, I would tell them no - the whole point of having junior devs do simpler tasks is that&#x27;s what level they&#x27;re at. They don&#x27;t get to the next level magically, it&#x27;s by doing the work. If a high school football quarterback asked if he could skip practice and let his AI go to practice for him, I would wonder how he plans to get good at football.<p>I apologize that I don&#x27;t have anything constructive to say here but you did ask for any of my thoughts.
评论 #36988340 未加载
评论 #36988356 未加载
评论 #36989130 未加载
评论 #36988689 未加载
jtmarmonalmost 2 years ago
Just merged my first simple PR with sweep. This is going to be <i>so</i> useful for the kind of things that would take 5 minutes to do but get procrastinated for weeks because you just can&#x27;t find the time to context switch for it.<p>Congrats on the launch!
评论 #36989497 未加载
padolseyalmost 2 years ago
Love it!! The chunking stuff especially is really impressive. Hitting those token limits often is the annoying bit of working with LLMs.<p>A weird question: How do you feel about possibly ~wasted efforts of these techniques when gpt in a year or so is probably gonna be 100k+ in context length? I&#x27;ve felt this a bit. E.g. I really want to create a &#x27;massive document&#x27; conversational agent but I&#x27;m doing around 90% of work just juggling and preempting token constraints with super hueristic indexing. I just feel it&#x27;s all a bit.. wasted, in terms of effort. At some point the LLM apis (openai, claude, ..) will just accept massive zips of code and use them as entire prompts without need for these creative trickeries. Thoughts?<p>Oh! And have you tried out the function-calling APIs? I see you&#x27;ve found that XML is far more reliable as it&#x27;s semantically enriched. I have found this to be the case as well, which is a shame because I really want the function-calling stuff to work equally well.<p>I&#x27;m loving stuff like this that starts to pseudo-expand the token limit.
评论 #36991722 未加载
guideamigoalmost 2 years ago
Wait for deluge of these PR generators to increase the commit count on GitHub.
评论 #36988253 未加载
评论 #36988694 未加载
santiagobasultoalmost 2 years ago
This is a very cool project, and definitively something we&#x27;ll see more and more often for the next few years.<p>Now, a bit off topic. I&#x27;ve seen a proliferation of &quot;open source&quot; startups that just use &quot;open source&quot; as a way of promotion. The repo feels more like a landing page than a README. And the Installation shows anything BUT install instructions.
评论 #36993906 未加载
marktangotangoalmost 2 years ago
Finally! My VP of engineering keeps saying I&#x27;m not making enough github commits, this is the solution I&#x27;ve been waiting for!<p>This is sarcasm, but I did have a VP who tracked commit frequency for a while. And people heard about it if they weren&#x27;t commiting enough.
评论 #36989019 未加载
adr1analmost 2 years ago
Great I think you made a good choice by interfacing directly to PRs. I&#x27;d like to see if I&#x27;m able to get my code coverage to 100% with this bot.
评论 #36988952 未加载
评论 #36989343 未加载
jhalesalmost 2 years ago
What is your data privacy policy?
评论 #36989898 未加载
评论 #36989993 未加载
applgo443almost 2 years ago
How do you approach the problem of what files to look into to fix a bug? Just embeddings doesn&#x27;t seem to cut it.
评论 #36995347 未加载
ryanSrichalmost 2 years ago
Sorry if I missed this, but do you plan on integrating with issues outside of github? For example, we use Linear, but it is connected to github to automatically pull PR information. It would be interesting to do basically the exact same thing as what you&#x27;re doing, but do it with a Linear issue instead.
评论 #36989450 未加载
kfarralmost 2 years ago
Excellent, this solves the #1 problem I&#x27;ve had with LLM development assist -- providing context of the existing application source when making new requests. Delivering the output via a PR is a nice touch. Already created 2 PRs. Still need a tiny bit of tweaking manually before I merge these, but definitely saved at least 30 mins. Here are the 2 PRs that it generated for others curious to see its capabilities: <a href="https:&#x2F;&#x2F;github.com&#x2F;3DStreet&#x2F;3dstreet&#x2F;pull&#x2F;324">https:&#x2F;&#x2F;github.com&#x2F;3DStreet&#x2F;3dstreet&#x2F;pull&#x2F;324</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;3DStreet&#x2F;3dstreet&#x2F;pull&#x2F;325">https:&#x2F;&#x2F;github.com&#x2F;3DStreet&#x2F;3dstreet&#x2F;pull&#x2F;325</a>
评论 #36992853 未加载
thatguymikealmost 2 years ago
Looks cool! I haven’t used it yet but this could be really helpful.<p>What’s your strategy around oss? Why wouldn’t I just clone and use your repo if it can talk directly to GPT4&#x2F;Claude?<p>And, if I go through you, does Sweep retain my code in a DB or logs?
评论 #36996620 未加载
andrejcaseyalmost 2 years ago
I&#x27;ve been building C++ applications professionally for several years now and can say that AI tools like this are just marketing hype. There are codebases with years of legacy cruft that most people have difficulty navigating; there&#x27;s no chance that ChatGPT and derivatives like Sweep will solve real, nontrivial problems in them. I wish there was a solution for technical debt, but using AI to approximate solutions is a fundamentally flawed approach.
maccardalmost 2 years ago
This is awesome. Somewhat echoing the other feedback here, I&#x27;m a little concerned about the &quot;self test&quot; side of things, and would much rather sweep wrote tests. Given my experience with ChatGPT and copilot though, I feel reassured that it would write tests for me. If it wrote tests by default (or used a heuristic on when to write tests), I would find it impossible to not use this I think.<p>Great job.
评论 #36997833 未加载
elderlybananaalmost 2 years ago
Incredible work, this is the most exciting AI dev tool I&#x27;ve come across!<p>Do you have a strategy to supplement ChatGPT to handle post-2021 updates to languages and libraries? I tried it on a NextJS repo and it came up with something that looked like it would have been correct a few versions ago, but I had to make some manual changes. Certain fast-moving ecosystems might frequently have this issue.
评论 #36992633 未加载
juntaoalmost 2 years ago
I&#x27;m wondering what will happen if we let ChatGPT review these PRs created by ChatGPT.<p>Yes, We made a small tool to help developer review their PR. Seems a great supplement for Sweep AI.<p>Build your own PR review bot in 3 minutes here: <a href="https:&#x2F;&#x2F;github.com&#x2F;flows-network&#x2F;github-pr-summary">https:&#x2F;&#x2F;github.com&#x2F;flows-network&#x2F;github-pr-summary</a>
评论 #36995060 未加载
pcthrowawayalmost 2 years ago
&gt; Limitations of Sweep:<p>&gt; - Using the latest APIs that have changed past 2022<p>Oh good, the frontend devs don&#x27;t have to worry about AI taking their jobs yet.
评论 #37002436 未加载
applgo443almost 2 years ago
How is your experience with Modal?<p>And I&#x27;m curious to know more about your costs of deployment and running on Modal.
评论 #36992913 未加载
willsmith72almost 2 years ago
Is it possible to provide feedback to a PR? One of the best parts about these AIs is their ability to adapt based on feedback.<p>E.g. in the demo video, the code doesn&#x27;t cover if splitName.length === 0. I would want to prompt it to cover that case as well
评论 #36991742 未加载
fraysalmost 2 years ago
This looks fantastic. (Demo video was what sold me: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=WBVna_ow8vo">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=WBVna_ow8vo</a>)<p>I will be keeping an eye on where this goes in the future.
kristiandupontalmost 2 years ago
I tried Sweep the other day and I got a weird error: [link redacted]-- &quot;an issue has occurred around fetching the files.&quot; What files might that be?<p>In any case, congratulations on launching, your product looks really promising!
评论 #37002361 未加载
shrimpxalmost 2 years ago
Tightly related to <a href="https:&#x2F;&#x2F;second.dev">https:&#x2F;&#x2F;second.dev</a>, also a YC company in the previous batch. Though Second is specializing its AI developers to doing code migrations.
评论 #36989051 未加载
chrsigalmost 2 years ago
So next up, we&#x27;ll be hiring people to put the bugs into the code base, so AI companies like this can stay in business, right? No bugs means no AI to fix bugs.
评论 #36995116 未加载
deathmonger5000almost 2 years ago
This is super cool!
评论 #36988168 未加载
_thisdotalmost 2 years ago
What is the Privacy Policy?
评论 #36995750 未加载
gcanyonalmost 2 years ago
Meta-issue: the purple on black text in the examples page is hard to read. <a href="https:&#x2F;&#x2F;docs.sweep.dev&#x2F;examples">https:&#x2F;&#x2F;docs.sweep.dev&#x2F;examples</a>
评论 #36990078 未加载
评论 #36989871 未加载