6320 Commits

Author SHA1 Message Date
Robert Brennan
486ec2d94a Minor fixes for new Agent framework (#158)
* add message if exit happens before finish

* fix kill command

* fix browse action

* fix sandbox

* update requirements

* add status code

* refactor controller

* add try to callbacks

* fix background log collection

* format logs a bit more nicely

* run background procs in same container

* fix close command

* rename sockt

* fix up kills

* fix lint issues

* fix ruff

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-03-26 12:55:33 +08:00
Jim Su
430527680f Server: load environment variables from .env and document environment variables (#137)
Server: load environment variables from .env and document environment variables
2024-03-26 00:14:48 -04:00
Robert Brennan
eb4a261880 Create generic LLM client using LiteLLM (#114)
* add generic llm client

* fix lint errors

* fix lint issues

* a potential suggestion for llm wrapper to keep all the function sigatures for ide

* use completion partial

* fix resp

* remove unused args

* add back truncation logic

* fix add_event

* fix merge issues

* more merge issues fixed

* fix codeact agent

* remove dead code

* remove import

* unused imports

* fix ruff

* update requirements

* mypy fixes

* more lint fixes

* fix browser errors

* fix up observation conversion

* fix format of error

* change max iter default back to 100

* fix kill action

* fix docker cleanup

* add RUN_AS_DEVIN flag

* fix condense

* revert some files

* unused imports

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
Co-authored-by: Robert Brennan <rbren@Roberts-MacBook-Pro.local>
2024-03-26 12:10:23 +08:00
Robert Brennan
815b78595a Fix sandbox user ID on windows (#170)
* set user id

* fix lint
2024-03-25 22:56:48 -04:00
Yufan Song
df14ce6c72 add version info (#168) 2024-03-25 21:17:34 -04:00
Hesham
6a1197f5c0 improve monologue (#157)
* improve monologue

* Update monologue.py

---------

Co-authored-by: Hesham Haroon <heshamharoon@Heshams-MacBook-Pro.local>
2024-03-25 19:15:40 -04:00
Hesham
847c2148a6 update messages (#156)
* update messages

* Update opendevin/action/agent.py

Co-authored-by: Robert Brennan <accounts@rbren.io>

* Update opendevin/action/agent.py

Co-authored-by: Robert Brennan <accounts@rbren.io>

---------

Co-authored-by: Hesham Haroon <heshamharoon@Heshams-MacBook-Pro.local>
Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-03-25 19:15:23 -04:00
geohotstan
0e090773e3 updated pre-commit so it works (#161) 2024-03-25 18:28:32 -04:00
Robert Brennan
ad83a4d869 fix tag on sandbox (#164) 2024-03-25 18:24:30 -04:00
Robert Brennan
dc1a1e6685 Update README.md (#160) 2024-03-25 18:15:25 -04:00
Xingyao Wang
82f934d4cd New Agent, Action, Observation Abstraction with updated Controller (#105)
* rearrange workspace_dir and max_step as arguments to controller

* remove unused output

* abstract each action into dataclass

* move actions

* fix action import

* move cmd manager and change method to private

* move controller

* rename action folder

* add state

* a draft of Controller & new agent abstraction

* add agent actions

* remove controller file

* add observation to perform a refractor on langchains agent

* revert to make this compatible via translation

* fix typo and translate error

* add error to observation

* index thought as dict

* refractor controller

* fix circular dependency caused by type hint

* add runnable attribute to agent

* add mixin to denote executable

* change baseclass

* make file read/write action compatible w/ docker directory

* remove event

* fix some merge issue

* fix sandbox w/ permission issue

* cleanup history abstraction since langchains agent is not really using it

* tweak to make langchains agent working

* make all actions return observation

* fix missing import

* add echo action for agent

* add error code to cmd output obs

* make cmd manager returns cmd output obs

* fix codeact agent to make it work

* fix all ruff issue

* fix mypy

* add import agenthub back

* add message for Action attribute (migrate from previous event)

* fix typo

* fix instruction setting

* fix instruction setting

* attempt to fix session

* ruff fix

* add .to_dict method for base and observation

* add message for recall

* try to simplify the state_updated_info with tuple of action and obs

* update_info to Tuple[Action, Observation]

* make codeact agent and langchains compatible with Tuple[Action, Observation]

* fix ruff

* fix ruff

* change to base path to fix minimal langchains agent

* add NullAction to potentially handle for chat scenario

* Update opendevin/controller/command_manager.py

Co-authored-by: Robert Brennan <accounts@rbren.io>

* fix event args

* set the default workspace to "workspace"

* make directory relative (so it does not show up to agent in File*Action)

* fix typo

* await to yield for sending observation

* fix message format

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-03-26 01:56:58 +08:00
Ikko Eltociear Ashimine
bc9c9198c4 docs: update CONTRIBUTING.md (#140)
offical -> official
2024-03-25 11:24:57 -04:00
Robert Brennan
8a64d7c912 Fix read and write operations when LLM asks for absolute path (#126)
* fix resolution of filepaths

* fix imports

* Update write.py
2024-03-25 08:53:26 -04:00
Engin Can Dinc
e445f92281 Fix vertical layout for browser (#135) 2024-03-25 08:25:00 -04:00
Xingyao Wang
0c396d3bbd Update README.md (#134) 2024-03-25 08:07:41 -04:00
Jim Su
9f8b61666a Update README.md (#132)
Add demo video to README.md
2024-03-25 12:32:42 +08:00
Robert Brennan
d9c1bee2aa Add instructions to README.md (#129)
* Update README.md

* add WORKSPACE_DIR env var

* Update README.md

* Update session.py

---------

Co-authored-by: Robert Brennan <rbren@Roberts-MacBook-Pro.local>
2024-03-25 11:35:12 +08:00
Jim Su
335a91610e Wire up frontend (#128) 2024-03-25 10:07:38 +08:00
Robert Brennan
0f4a11685e Add agenthub import to listen.py (#127) 2024-03-24 19:20:42 -04:00
Robert Brennan
a023fcae64 fix truncation logic (#125) 2024-03-24 18:46:01 -04:00
Robert Brennan
8ce2ac7648 Fix agenthub import (#123)
* fix agenthub import

* add noqa
2024-03-24 18:29:09 -04:00
Sean Lim
dfa98b334e fix typo (#122) 2024-03-24 17:15:29 -04:00
Robert Brennan
4aa24eb41d Server working with agent library (#97)
* server working with agent library

* update readme

* add messages to events

* factor out steps

* fix websocket messages

* allow user to run arbitrary actions

* allow user to run commands before a task is started

* fix main.py

* check JSON

* handle errors in controller better

* fix memory issue

* better error handling and task cancellation

* fix monologue len

* fix imports

* remove server from lint check

* fix lint issues

* fix lint errors
2024-03-24 22:24:44 +08:00
geohotstan
fb1822123a Adding pre-commit and CI for ruff and mypy (#69)
* don't modify directories

* oops typo

* dev_config/python

* add config to CI

* bump CI python to 3.10

* 3.11?

* del actions/

* add suggestions

* delete unused code

* missed some

* oops missed another one

* remove a file
2024-03-23 19:41:49 -04:00
Yufan Song
642e1b3cd0 doc(sandbox): add more instructions for starting on sandbox work (#107)
* add doc

* fix

* remove requirement

* Update opendevin/README.md

Co-authored-by: Robert Brennan <accounts@rbren.io>

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-03-23 17:44:48 -04:00
Jim Su
a2f245e2fe Set up Redux, extract component state into Redux store, and break WebSocket out of Terminal component only (#85) 2024-03-23 17:40:43 -04:00
Yufan Song
fabdddca21 fix(evaluation): solve graceful shutdown of docker containers (#106)
* add atexit

* remove print

* fix typo
2024-03-23 17:37:20 -04:00
Robert Brennan
78f8752246 minor fixes for langchain agent (#83)
* minor fixes

* set max output len

* truncate logs

* Update agenthub/langchains_agent/utils/agent.py
2024-03-23 17:34:35 -04:00
Xingyao Wang
0b5a531518 fix typo in README (#104) 2024-03-23 12:10:49 +08:00
Junyang Lin
b0a8af6c99 update MVP roadmap (#100) 2024-03-23 09:10:52 +08:00
Yufan Song
5c68d82995 doc: add contribution docs (#101)
* add doc

* fix typo
2024-03-23 09:08:19 +08:00
zch-cc
e5a28cba2f Evaluation: Fix bug on python path on run.sh (#98)
* Move regression tests to evaluation/

* use pythnon instead of docker in the script

* add model para

* change python to python3

* bug fix

* add python path

* add readme
2024-03-23 00:01:48 +08:00
zch-cc
cfefc47439 Move regression tests to evaluation/ (#86)
* Move regression tests to evaluation/

* use pythnon instead of docker in the script

* add model para

* change python to python3

* bug fix
2024-03-22 23:26:37 +08:00
Xingyao Wang
2ba6fb1e7b Use main.py arguments to specify model_name instead of env var for Langchains Agent (#94)
* use model name from main.py arguments instead of env var

* set default model to gpt-4-0125-preview for langchains agent to work;
print model, dir, and task when started
2024-03-22 22:06:42 +08:00
Robert Brennan
3b2ed14ae7 Use Docker SDK for sandbox, integrate into CommandManager (#93)
* refactor command manager to use docker and move to docker sdk

* fix read and write actions

* actually run background cmd

* use bash for running cmds and fix logs

* keep logs in buffer file

* fix up background logs

* consolidate requirements

* fix docker imports

* add fixme

* add remove fixme

* fix sandbox.py path in README

* fix typo annotation and prompt

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-03-22 21:54:00 +08:00
Aadya Madankar
4fda533b91 A starting point for SWE-Bench Evaluation with docker (#87) 2024-03-22 21:34:28 +08:00
libowen2121
40a3614e80 Add a roadmap for eval (#92) 2024-03-22 20:27:30 +08:00
Xingyao Wang
2d5c8f1060 change to OpenDevin fork (#89) 2024-03-22 18:30:12 +08:00
Xingyao Wang
5ff96111f0 A starting point for SWE-Bench Evaluation with docker (#60)
* a starting point for SWE-Bench evaluation with docker

* fix the swe-bench uid issue

* typo fixed

* fix conda missing issue

* move files based on new PR

* Update doc and gitignore using devin prediction file from #81

* fix typo

* add a sentence

* fix typo in path

* fix path

---------

Co-authored-by: Binyuan Hui <binyuan.hby@alibaba-inc.com>
2024-03-22 12:43:49 +08:00
Jiaxin Pei
dc88dac296 adding a script to fetch and convert devin's output for evaluation (#81)
* adding code to fetch and convert devin's output for evaluation

* update README.md

* update code for fetching and processing devin's outputs

* update code for fetching and processing devin's outputs
2024-03-22 01:33:01 +08:00
Robert Brennan
b84463f512 Refactor agent interface a bit (#74)
* start moving files

* initial refactor

* factor out command management

* fix command runner

* add workspace to gitignore

* factor out command manager

* remove dupe add_event

* update docs

* fix init

* fix langchain agent after merge
2024-03-21 23:35:28 +08:00
Xingyao Wang
2de75d4782 Minimal Docker Sandbox with GPT-3.5 Execution Example (#48)
* minimal docker sandbox

* make container_image as an argument (fall back to ubuntu);
increase timeout to avoid return too early for long running commands;

* add a minimal working (imperfect) example

* fix typo

* change default container name

* attempt to fix "Bad file descriptor" error

* handle ctrl+D

* add Python gitignore

* push sandbox to shared dockerhub for ease of use

* move codeact example into research folder

* add README for opendevin

* change container image name to opendevin dockerhub

* move folder; change example to a more general agent

* update Message and Role

* update docker sandbox to support mounting folder and switch to user with correct permission

* make network as host

* handle erorrs when attrs are not set yet

* convert codeact agent into a compatible agent

* add workspace to gitignore

* make sure the agent interface adjustment works for langchain_agent
2024-03-21 21:54:56 +08:00
Jim Su
a722f5c0b1 Fix: Keypresses in Terminal throws exception (#71) 2024-03-21 06:36:48 -04:00
Xingyao Wang
0380070e98 Abstraction that allows us to develop different agents, frontend, backend, and evaluation in parallel (#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>
2024-03-20 15:09:29 -04:00
Binyuan Hui
f99f4ebdaa fix: typo in the evaluation folder name. (#66) 2024-03-20 23:00:09 +08:00
Binyuan Hui
a94f3d81cb fix: merge multiple .gitignore to unify management (#61) 2024-03-20 21:35:51 +08:00
geohotstan
fd277666f6 use argparse in main.py (#62)
* changed to argparse

* del useless import

* del print statement

* use shortened argument
2024-03-20 09:27:14 -04:00
Robert Brennan
6ff1e52c83 add websocket handshake to server (#57)
* add websocket handshake to server

* Update server/requirements.txt
2024-03-20 09:00:19 -04:00
Jiaxin Pei
60e043ed8b Creating the evaluation folder and adding initial analysis of Devin's evaluation outputs (#50)
* Creating the folder for experiments, adding initial analysis of Devin's outputs on SWE-bench

* typo fixed

* update devin's evaluation outputs analysis

* remove data files from commit

* add logistics for managing the experiment folder in README

* Change folder naming and update logistics.

---------

Co-authored-by: Bowen Li <libowen.ne@gmail.com>
2024-03-20 19:59:51 +08:00
Robert Brennan
1eade7d188 First pass at a control loop (#35)
* initialize control loop

* add todo

* more todo

* add dockerignore

* add notes to prompt

* encourage llm to finish

* add debug env

* update prompts a bit

* fix task prompts

* add basic regression framework

* add hello-world regression case

* add hello-name test case

* fix workspace ignore

* document regression script

* add python-cli test case

* add default git config

* add help regression test

* add node rewrite test case

* add react-todo test case

* fix dockerfile

* add ability to run background commands

* add client-server test case

* update regression readme

* better support for background commands

* update tests

* fix bug in command removal
2024-03-20 18:44:50 +08:00