OpenHands
OpenHands copied to clipboard
Run OpenDevin on OpenDevin in GitHub Actions
What problem or use case are you trying to solve? Let's dogfood our own agents!
Describe the UX of the solution you'd like
I'd like to tag any issue with OpenDevin, and have a GitHub action kick off that tries to solve the issue by running the agent on this repo.
Do you have thoughts on the technical implementation?
- GitHub action
- Run
python ./opendevin/main.py -d ./ -t "${ISSUE_TITLE}: $ISSUE_CONTENT" git committhe results (maybe ask OpenDevin to do the commit and craft the message?)- Open a pull request
We might need better support for multi-line tasks, not sure how that will go.
We will need to put an OpenAI (or similar) key into the environment. Once we have a prototype here I can add one with a small amount of funding.
Hey @rbren , can I pick up this issue as it is marked good first.
Awesome! I don't think anyone else is looking.
It's a good first issue in the sense that it doesn't require much knowledge of system internals. But it will probably be a good deal of work!
acknowledged, will start looking into it.
Hi @rbren , If this issue is still open, can I please pick it up?
You might want to coordinate with @abhay-singhal
yes I can do it, please provide me a channel to communicate better
This issue is probably the best place to communicate. You can also apply to join the Slack, but it seems to take a few days for the admins to get through the list: https://github.com/OpenDevin/OpenDevin?tab=readme-ov-file#join-us
@abhay-singhal @VJlaxmi Do you folks have any progress to share?
Here's an experiment I started:
workflow: https://github.com/foragerr/OpenDevin/actions/runs/8575724652/workflow Action run: https://github.com/foragerr/OpenDevin/actions/runs/8575724652/job/23505325009
When a label OpenDevin is applied to an issue, the workflow runs, send the issue title and body as task to main.py
and the agents start working on it. In this run the agent gets stuck in a loop - which sucks, but my focus is not agent quality. So things to do next:
- [x] Rerun with a simpler task, perhaps 'Create hello world script'
- [x] Once the agent finishes, commit code, create PR
- [x] Post status back to issue that triggered the run
- [x] Add Actions caching to poetry and pnpm so initial setup can run faster
This is the issue I used to trigger the workflow: https://github.com/foragerr/OpenDevin/issues/1
This is rad! Very cool work. Agree that we'll need some more agent quality before we can really get use out of this 😄
Here's the finished workflow: https://github.com/foragerr/OpenDevin/actions/runs/8577986362/workflow How to use it:
- Setup repo secret called
OPENAI_API_KEYcontaining a valid OPENAI key - Create an issue containing sufficient context in the title and body. Rudimentary Example
- Apply label
dogfood-thisto the issue - which will trigger the workflow to run Run Example - Workflow will
- Grab task from Issue title and body
- Run agent to generate code - Your agent quality mileage may vary
- Commit any generated changes into a new branch
- Create a PR to the default branch in the repo
- Post a comment back to original issue that PR is ready for review.
- Example PR raised by this workflow
PR: https://github.com/OpenDevin/OpenDevin/pull/803
caution: Adding labels on issues is not controlled, anyone would be able to add a label and generate spurious PRs, and more importantly use up OpenAI Credits.
Perhaps the trigger should change to "if <label-foo> is added by one of [list of github-ids]"
This is completed in #803