Commit Graph

654 Commits

Author SHA1 Message Date
Robert Brennan
beb74a19f6 Use event stream for the runtime (#1776)
* rebuild PR from scratch

* fix max_iter

* regenerate tests

* cut down on history

* Update opendevin/controller/agent_controller.py

* regenerate tests

* revert swe agent

* revert some codeact chagnes

* regenerate tests

* add source to dict

* only add source if not none

* try to fix coverage issue

* lock

* add gevent
2024-05-14 13:35:25 +00:00
Robert Brennan
82a798990c refactor remind_iterations (#1760)
* refactor remind_iterations

* regenerate tests

* concatenate iteration message

* fix merge issues

* update integration tests
2024-05-14 08:27:12 -04:00
Boxuan Li
3d53d363b4 Integration test: Verify finish state & add auto-rerun in regenerate.sh (#1773)
* regenerate.sh: Allow testing on a specific agent and/or test

* Check agent finish state

* rengerate.sh: Rerun after fixing the prompts

* Fix SWEAgent test_write_simple_script

* Add more help message

* Add a known issue to README.md

* regenerate.sh: Fix help message typo

* Fix a typo in README
2024-05-14 03:50:29 -04:00
Boxuan Li
b84f25ab35 Integration test: exit if no prompt match (#1772) 2024-05-13 20:03:09 -07:00
Robert Brennan
2771328036 use -it and pull=always for docker (#1769) 2024-05-13 19:17:57 -04:00
Robert Brennan
b028bd46bb Use messages to drive tasks (#1688)
* finish is working

* start reworking main_goal

* remove main_goal from microagents

* remove main_goal from other agents

* fix issues

* revert codeact line

* make plan a subclass of task

* fix frontend for new plan setup

* lint

* fix type

* more lint

* fix build issues

* fix codeact mgs

* fix edge case in regen script

* fix task validation errors

* regenerate integration tests

* fix up tests

* fix sweagent

* revert codeact prompt

* update integration tests

* update integration tests

* handle loading state

* Update agenthub/codeact_agent/codeact_agent.py

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>

* Update opendevin/controller/agent_controller.py

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>

* Update agenthub/codeact_agent/codeact_agent.py

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>

* Update opendevin/controller/state/plan.py

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>

* update docs

* regenerate tests

* remove none from state type

* revert test files

* update integration tests

* rename plan to root_task

* revert plugin perms

* regen integration tests

* tweak integration script

* prettier

* fix test

* set workspace up for regeneration

* regenerate tests

* Change directory of copy

* Updated tests

* Disable PlannerAgent test

* Fix listen

* Updated prompts

* Disable planner again

* Make codecov more lenient

* Update agenthub/README.md

* Update opendevin/server/README.md

* re-enable planner tests

* finish top level tasks

* regen planner

* fix root task factory

---------

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
2024-05-13 23:14:15 +00:00
Robert Brennan
e28b3ef9e8 Fix integration tests (#1764)
* refactor remind_iterations

* regenerate tests

* concatenate iteration message

* add some helpers to the tests

* regenerate tests

* add to logs

* regenerate tests

* add debug info

* fix exit_on_message

* fix regen script

* regenerate tests

* Revert "Merge branch 'rb/test-regen' of ssh://github.com/opendevin/opendevin into rb/test-regen"

This reverts commit b9cd1acbf2, reversing
changes made to c888285304.

* remove prints

* revert files

* revert more

* revert more

* regenerate for the last time I hope

* add back remind_iter

* regenerate

* add back remind_iter

* regenerate

* fix remind_iter

* regenerate yet again

* regen

* remove comment

* regen again
2024-05-13 18:08:59 -04:00
wallter
ee66a1d5d1 Fix: Correct --add-host Flag Format in README (#1767)
This PR updates the README to correct the format of the --add-host flag used in the Docker run command.
The previous format, host.docker.internal=host-gateway, was incorrect and resulted in the following error:
invalid argument "host.docker.internal=host-gateway" for "--add-host" flag: bad format for add-host: "host.docker.internal=host-gateway"
Use code with caution.
This PR fixes the issue by updating the flag to the correct format:
--add-host host-gateway:host.docker.internal
Use code with caution.
This ensures that the Docker container can correctly resolve the host.docker.internal hostname to the host machine's gateway IP address.
2024-05-13 22:07:56 +00:00
Graham Neubig
b13d4647ab Print out the regenerate command (#1759)
* Print out the output of the regenerate command

* Update regenerate.sh
2024-05-13 18:43:58 +00:00
Pete Stenger
a48b02207f await closing the controller (#1751)
* await closing the controller

* Update manager.py

* Cleanly exit

* Update agent.py

---------

Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
Co-authored-by: Jim Su <jimsu@protonmail.com>
2024-05-13 14:34:03 -04:00
Xingyao Wang
755a4072b6 Support specify timeout for long running tasks (#1756)
* support specify timeout for long running tasks

* add timeout for all existing sandbox impl

* Update opendevin/runtime/docker/local_box.py

Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>

* Update opendevin/runtime/docker/exec_box.py

Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>

* Update opendevin/runtime/docker/ssh_box.py

Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>

* Update opendevin/runtime/e2b/sandbox.py

Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>

* Update opendevin/runtime/sandbox.py

Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>

---------

Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
2024-05-13 10:17:03 +00:00
Xingyao Wang
00c0edae5f Re-adjust ssh_box for parallel evaluation (#1729)
* update ssh_box

* fix controller in test

---------

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
2024-05-13 14:35:30 +08:00
Frank Xu
ba8d8634ac fix browsergym to old ver (#1753) 2024-05-12 22:05:37 -07:00
Boxuan Li
eba5ef8e67 Fix test_ipython (#1750) 2024-05-12 16:15:32 -07:00
Xingyao Wang
4db4a84e2e Simply Jupyter execution via heredoc (#1728)
* simply jupyter execution via heredoc

* make sure /tmp always exists

* add integration test for jupyter exec
2024-05-13 04:57:06 +08:00
Boxuan Li
49de262577 opendevin/core/main.py: Graceful shutdown (#1731)
* opendevin/core/main.py: Graceful shutdown

* Shutdown controller at exit

* Update opendevin/core/main.py

---------

Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-05-12 13:56:35 -07:00
Engel Nyst
e5f1dbf5e7 Move json utility to the custom json parsing; apply it to the monologue-like agents (#1740) 2024-05-12 13:39:38 -04:00
Aleksandar
f861db6675 Enhance API Documentation (#1727)
* Add Server Interaction Guide

* Fix style

* Remove the server_interaction.md and add docstrings doc

* Remove very specific setup for the token from the doc

* Fix mdx expression failure

* Fix all examples

* Fix missing empty args {}

* Fix the run example to have and background
2024-05-12 08:58:01 -07:00
Robert Brennan
efd0d61e70 Fix the tests (#1737)
* fix config patching

* revert tests
2024-05-12 11:02:10 -04:00
Robert Brennan
d94b575cd4 Sandbox: adjust whitespace processing (#1474)
* adjust whitespace processing

* revert ssh_box

* adjust tests

* change lstrip to remove prefix

* run tests on exec box

* remove lstrips

* fix multiline

* remove stripping logic

* fix single multiline commands

* fix imports

* fix multiline echo

* better command splitter

* fix merge issue
2024-05-12 14:41:50 +00:00
Xingyao Wang
8bfae8413e Support passing sandbox as argument and iteration reminder (#1730)
* support custom sandbox;
add iteration_reminder

* Enable iteration reminder in CodeActAgent integration test

* Don't remove numbers when comparing prompts

* Update tests/integration/README.md

---------

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
2024-05-12 07:57:33 +00:00
Xingyao Wang
1d58917bc8 remove swe-bench build workflow (#1726) 2024-05-12 06:56:20 +08:00
Jens Roland
6a18cafa40 docs: fixed typo in launch command (#1724)
The argument `--add-host host.docker.internal:host-gateway` should be `--add-host host.docker.internal=host-gateway` (with an `=` character).

Solves `Error creating controller: Could not establish connection to host` errors.

Co-authored-by: Jim Su <jimsu@protonmail.com>
2024-05-11 17:48:45 -04:00
Jim Su
3abdc231c4 Highlight currently selected file (#1725)
* Highlight selected file

* Don't recompute context on every render

* Fix lint errors
2024-05-12 00:36:55 +03:00
Natu Lauchande
c997289eb7 Update troubleshooting Docker error in a Mac (#1722) 2024-05-11 19:38:00 +00:00
Boxuan Li
316a772849 CodeAct: Emphasize open before edit (#1709)
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
2024-05-11 12:20:14 -07:00
Temo
93fe31a490 Updated poetry.lock again (#1721) 2024-05-11 18:06:41 +00:00
Engel Nyst
98adbf54ec Small refactoring (#1614)
* move MemoryCondenser, LongTermMemory, json, out of the monologue

* PlannerAgent and Microagents use the custom json.loads/dumps

* Move short term history out of monologue agent...

* move memory in their package

* add __init__
2024-05-11 17:15:19 +02:00
mzyddd
5277c43c49 refactor : delete useless messages.json messages (#1706) 0.5.3 2024-05-11 11:59:05 +00:00
Xia Zhenhua
4477f08e6d fix: a critical bug of sharing _subscribers and _events between class not obj instance, when multi agent running(several browsers opened at the same time), the state management will be messed up. (#1713) 2024-05-11 11:26:41 +00:00
மனோஜ்குமார் பழனிச்சாமி
24e61ead65 Fixed bool config having int value (#1708)
like DEBUG=1
2024-05-11 09:46:11 +00:00
Xia Zhenhua
5244a34a1d feat: skip deploy-decs in folk repos. (#1703)
Co-authored-by: aaren.xzh <aaren.xzh@antfin.com>
2024-05-11 01:44:25 -07:00
Boxuan Li
bde12f4a09 CodeActAgent: Fix hack for multiple edits in same command (#1684)
* Fix edit hack for multiple edits in same command

This PR changes ([\s\S]*) to ([\s\S]*?) to make the capturing
group non-greedy. This change ensures that the regex captures
the smallest set of characters that extends up to the first
end_of_edit it encounters, rather than extending across multiple
edit commands.

Without the fix, a bash command consisting of multiple edits
would be corrupt and lead to unexpected edit results.
2024-05-10 23:32:09 -07:00
Graham Neubig
1787a7304e Disable ChromaDB telemetry (#1699) 2024-05-11 01:25:19 +02:00
Xingyao Wang
33e141e626 fix: do not raise error when failed to delete ~/.bashrc (#1701) 2024-05-11 00:08:44 +02:00
mzyddd
e1a1c9a00c perf : optimizations to send event logging performance (#1635)
Co-authored-by: mengziyi.mzy <mengziyi.mzy@alibaba-inc.com>
2024-05-10 23:54:22 +02:00
மனோஜ்குமார் பழனிச்சாமி
b4cdebec06 Ignore any warnings LiteLLM might emit on import (#1687) 2024-05-10 16:42:08 -04:00
Robert Brennan
1cbb16cfc2 allow running app as root (#1651)
* allow running app as root

* better entrypoint mgmt

* add nosetup option

* remove comments

* create docker group if it doesnt exist

* better docker group mgmt

* cast bools better

* fix playwright

* fix playwright for root

* fix root source ~/.bashrc hangs by create clean bashrc

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-05-10 20:41:25 +00:00
Xia Zhenhua
968b4d71bd feat: auto clean inactive sessions for a long time. (#1644)
* feat: auto clean inactive sessions for a long time.

* feat: new delegate stuck check.

---------

Co-authored-by: aaren.xzh <aaren.xzh@antfin.com>
2024-05-10 20:09:36 +00:00
Bart Shappee
78cd2e5b47 fix: Issue where CodeAct agent was trying to log cost on local llm and throwing Undefined Model execption out of litellm (#1666)
* fix: Issue where CodeAct agent was trying to log cost on local llm and throwing Undefined Model execption out of litellm

* Review Feedback

* Missing None Check

* Review feedback and improved error handling

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-05-10 13:57:37 -04:00
மனோஜ்குமார் பழனிச்சாமி
18e6b0b2d0 Removed logging output of plugin installation (#1690)
* Removed logging output of plugin installation
2024-05-10 16:09:49 +00:00
Zhou Hang
0cf94a2718 feat: add continue button (#1508)
* feat: add-continue-button

* feat: control the visibility of continue button

* feat: reset input status

* feat: update continue button UI

* feat: add test

* fix: fix lint issues

* feat: update ui

* feat: remove continue button to the parent and update icon

* fix: remove empty file

---------

Co-authored-by: sp.wack <83104063+amanape@users.noreply.github.com>
2024-05-10 10:26:39 +00:00
Jim Su
f8d4b1ab0d Use generic types (#1680) 2024-05-10 04:21:22 +02:00
Engel Nyst
a17308108c make runnable a class var (#1679) 2024-05-09 22:12:19 -04:00
Xia Zhenhua
10b971c612 feat: new delegate stuck check. (#1677)
Co-authored-by: aaren.xzh <aaren.xzh@antfin.com>
2024-05-09 21:06:20 -04:00
Robert Brennan
e63910263c cast bools better (#1678) 2024-05-09 21:05:15 -04:00
Robert Brennan
96151d9147 fix e2b env (#1670) 2024-05-09 23:14:44 +00:00
Aleksandar
657b177b4e Default to less expensive gpt-3.5-turbo model (#1675) 2024-05-09 19:11:27 -04:00
Ammar Ladhani
564739d1db Removes upper-case 'List' imports from typing and replaces them with lower-case 'list' (#1676) 2024-05-09 19:05:46 -04:00
Robert Brennan
26d82841d5 Create runtime implementation (#1626)
* first pass at moving runtime

* fix import

* remove github refs

* remove unnecessary import

* remove unnecessary import

* add e2b

* refactor read and write file ops

* remove github test

* rm action

* revert permissions

* regenerate tests

* re-delete file operations

* regenerate integration tests

* Update opendevin/runtime/runtime.py

Co-authored-by: Graham Neubig <neubig@gmail.com>

* fix ref

* add docs

* remove logspam

---------

Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-05-09 19:04:49 -04:00