OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Run OpenDevin on OpenDevin in GitHub Actions

Open rbren opened this issue 1 year ago • 14 comments

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 commit the 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.

rbren avatar Mar 26 '24 14:03 rbren

Hey @rbren , can I pick up this issue as it is marked good first.

abhay-singhal avatar Mar 28 '24 20:03 abhay-singhal

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!

rbren avatar Mar 28 '24 20:03 rbren

acknowledged, will start looking into it.

abhay-singhal avatar Mar 29 '24 11:03 abhay-singhal

Hi @rbren , If this issue is still open, can I please pick it up?

VJlaxmi avatar Mar 29 '24 17:03 VJlaxmi

You might want to coordinate with @abhay-singhal

rbren avatar Mar 29 '24 19:03 rbren

yes I can do it, please provide me a channel to communicate better

VJlaxmi avatar Mar 30 '24 15:03 VJlaxmi

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

rbren avatar Mar 30 '24 16:03 rbren

@abhay-singhal @VJlaxmi Do you folks have any progress to share?

foragerr avatar Apr 05 '24 17:04 foragerr

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

foragerr avatar Apr 05 '24 21:04 foragerr

This is the issue I used to trigger the workflow: https://github.com/foragerr/OpenDevin/issues/1

foragerr avatar Apr 05 '24 21:04 foragerr

This is rad! Very cool work. Agree that we'll need some more agent quality before we can really get use out of this 😄

rbren avatar Apr 06 '24 00:04 rbren

Here's the finished workflow: https://github.com/foragerr/OpenDevin/actions/runs/8577986362/workflow How to use it:

  1. Setup repo secret called OPENAI_API_KEY containing a valid OPENAI key
  2. Create an issue containing sufficient context in the title and body. Rudimentary Example
  3. Apply label dogfood-this to the issue - which will trigger the workflow to run Run Example
  4. 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

foragerr avatar Apr 06 '24 02:04 foragerr

PR: https://github.com/OpenDevin/OpenDevin/pull/803

foragerr avatar Apr 06 '24 02:04 foragerr

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]"

foragerr avatar Apr 06 '24 02:04 foragerr

This is completed in #803

foragerr avatar Apr 11 '24 03:04 foragerr