[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstraction that allows us to develop different agents, frontend, backend, and evaluation in parallel #68

Merged
merged 12 commits into from
Mar 20, 2024

Conversation

xingyaoww
Copy link
Contributor
@xingyaoww xingyaoww commented Mar 20, 2024

As discuss here, i suggests that we can:

  1. Come up with an Agent abstraction (with every necessary method for Devin) where everyone agrees on
  2. Then we can implement different Agent under agenthub/ so we can leverage our potential large pool of contributors to experiment and explore different ideas
  3. While frontend and backend folks can stick with the same Agent abstraction, and when MVP implementation is completed, the same front- and back-end system can easily switch between multiple different Agent implementations

I took the first (not perfect) step towards this goal - I draft the first version of Agent abstraction, merge @rbren's agent under research/langchains_agent (pls let me know if you prefer a different name! :P ), subclass the general Agent abstraction, and make the original agents/main.py more general (you can just change a command line argument to switch between completely different agent implementation!)

And i made sure the code works now for @rbren's agent:

research/langchains_agent/build-and-run.sh

produces outputs:

STEP 0
run {'command': 'ls'}
---
output {'output': ''}
==============
STEP 1
write {'path': 'hello_world.sh', 'contents': "#!/bin/bash\necho 'hello world'"}
---
output {'output': ''}
==============
STEP 2
run {'command': 'chmod +x hello_world.sh'}
---
output {'output': ''}
==============
STEP 3
run {'command': './hello_world.sh'}
---
output {'output': 'hello world\n'}
==============
STEP 4
Done!

TODOs after this PR is merged:

  • Make
  • @rbren Is research/langchains_agent/regression supposed to test whether an agent can complete the tasks? If so, I'd suggest maybe we can move it into a sub-folder of evaluation and add a TODO that writes actual test cases these to test any Agent implementation against these regression tests - what do you think?
  • Remove the Dockerfile for langchains_agent once Minimal Docker Sandbox with GPT-3.5 Execution Example #48 is merged (no big difference) and update build-and-run.sh correspondingly
  • Merge requirements.txt with the whole project requirements.txt (or maybe not since these will be installed inside the docker container?)

@huybery huybery requested a review from neubig March 20, 2024 16:23
@huybery
Copy link
Collaborator
huybery commented Mar 20, 2024

I think agenthub is more appropriate than research?

@huybery huybery self-requested a review March 20, 2024 16:41
@rbren
Copy link
Collaborator
rbren commented Mar 20, 2024

This is awesome, super helpful for experimentation 🚀

Copy link
Contributor
@neubig neubig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too, thanks for this!

@neubig neubig merged commit 0380070 into All-Hands-AI:main Mar 20, 2024
xcodebuild pushed a commit to xcodebuild/OpenDevin that referenced this pull request Mar 31, 2024
…kend, and evaluation in parallel (All-Hands-AI#68)

* move agent to langchains_agent

* remove old .env

* remove the old agent folder

* add preliminary version of Agent abstraction

* add preliminary version of the main.py

* merge controlloop and main into a Agent class

* add init

* fix json import

* fix missing arg

* get langchains_agent working after abstraction

* rename `research` to `agenthub`

* rename: rename research to agenthub

---------

Co-authored-by: huybery <huybery@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants