* initialize plugin definition
* initialize plugin definition
* simplify mixin
* further improve plugin mixin
* add cache dir for pip
* support clean up cache
* add script for setup jupyter and execution server
* integrate JupyterRequirement to ssh_box
* source bashrc at the end of plugin load
* add execute_cli that accept code via stdin
* make JUPYTER_EXEC_SERVER_PORT configurable via env var
* increase background cmd sleep time
* Update opendevin/sandbox/plugins/mixin.py
Co-authored-by: Robert Brennan <accounts@rbren.io>
* add mixin to base class
* make jupyter requirement a dataclass
* source plugins only when >0 requirements
* add `sandbox_plugins` for each agent & have controller take care of it
* update build.sh to make logs available in /opendevin/logs
* switch to use config for lib and cache dir
* Add SANDBOX_WORKSPACE_DIR into config
* Add SANDBOX_WORKSPACE_DIR into config
* fix occurence of /workspace
* fix permission issue with /workspace
* use python to implement execute_cli to avoid stdin escape issue
* add IPythonRunCellAction and get it working
* wait until jupyter is avaialble
* support plugin via copying instead of mounting
* add agent talk action
* support follow-up user language feedback
* add __str__ for action to be printed better
* only print PLAN at the beginning
* wip: update codeact agent
* get rid the initial messate
* update codeact agent to handle null action;
add thought to bash
* dispatch thought for RUN action as well
* fix weird behavior of pxssh where the output would not flush correctly
* make ssh box can handle exit_code properly as well
* add initial version of swe-agent plugin;
* rename swe cursors
* split setup script into two and create two requirements
* print SWE-agent command documentation
* update swe-agent to default to no custom docs
* add initial version of swe-agent plugin;
* rename swe cursors
* split setup script into two and create two requirements
* print SWE-agent command documentation
* update swe-agent to default to no custom docs
* update dockerfile with dependency from swe-agent
* make env setup a separate script for .bashrc source
* add wip prompt
* fix mount_dir for ssh_box
* update prompt
* fix mount_dir for ssh_box
* default to use host network
* default to use host network
* move prompt to a separate file
* fix swe-tool plugins;
add missing _split_string
* remove hostname from sshbox
* update the prompt with edit functionality
* fix swe-tool plugins;
add missing _split_string
* add awaiting into status bar
* fix the bug of additional send event
* remove some print action
* move logic to config.py
* remove debugging comments
* make host network as default
* make WORKSPACE_MOUNT_PATH as abspath
* implement execute_cli via file cp
* Revert "implement execute_cli via file cp"
This reverts commit 06f0155bc17d1f99097e71b83b2143f6e8092654.
* add codeact dependencies to default container
* add IPythonRunCellObservation
* add back cache dir and default to /tmp
* make USE_HOST_NETWORK a bool
* revert use host network to false
* add temporarily fix for IPython RUN action
* preliminary implementation of CodeActAgent's jupyter
* update node module
* update prompt
* revert USE_HOST_NETWORK to true since it is not affecting anything
* attempt to fix lint
* remove newline
* update prompt
* Refactor browser style. (#1358)
* delete useless assets and css class.
* add waiting for page loaded (networkidle with 3s timeout)
* Add integration test framework with mock llm (#1301)
* Add integration test framework with mock llm
* Fix MonologueAgent and PlannerAgent tests
* Remove adhoc logging
* Use existing logs
* Fix SWEAgent and PlannerAgent
* Check-in test log files
* conftest: look up under test name folder only
* Add docstring to conftest
* Finish dev doc
* Avoid non-determinism
* Remove dependency on llm embedding model
* Init embedding model only for MonologueAgent
* Add adhoc fix for sandbox discrepancy
* Test ssh and exec sandboxes
* CI: fix missing sandbox type
* conftest: Remove hack
* Reword comment for TODO
* Revert "refactor(frontend): Terminal (#1315)" (#1360)
This reverts commit 27246aca7e0f3d399740db466f31026c891a5374.
* revert USE_HOST_NETWORK to true since it is not affecting anything
* attempt to fix lint
* handle IsADirectory errors (#1365)
* update to 0.4.0 (#1362)
Co-authored-by: Jim Su <jimsu@protonmail.com>
* feat(frontend): multiple design changes (#1370)
* fix/improve terminal hook (#1371)
* Revert "update node module"
This reverts commit 459b1031e722529ddc00ca475b88245bf52edeaa.
* support SyntaxHighlighter and markdown for jupyter visualization
* fix jupyter execution server
* make jupyter active
* improve the display of markdown and raw text
* get base64 image display for react
* add `thought` to most action class
* fix unit tests for current action abstraction
* support user exit
* update test cases with the latest action format (added 'thought')
* fix integration test for CodeActAGent by mocking stdin
* only mock stdin for tests with user_responses.log
* remove -exec integration test for CodeActAgent since it is not supported
* remove specific stop word
* fix comments
* improve clarity of prompt
* attempt to fix lint
* attempt to fix lint yet agiain
* fix py lint
* fix integration tests
* sandbox might failed in chown due to mounting, but it won't be fatal
* update debug instruction for sshbox
* fix typo
* get RUN_AS_DEVIN and network=host working with app sandbox
* get RUN_AS_DEVIN and network=host working with app sandbox
* attempt to fix the workspace base permission
* sandbox might failed in chown due to mounting, but it won't be fatal
* update sshbox instruction
* remove default user id since it will be passed in the instruction
* revert permission fix since it should be resolved by correct SANDBOX_USER_ID
* the permission issue can be fixed by simply provide correct env var
* remove log
* set sandbox user id to getuid by default
* move logging to initializer
* make the uid consistent across host, app container, and sandbox
* remove hostname as it causes sudo issue
* fix permission of entrypoint script
* make the uvicron app run as host user uid for jupyter plugin
* add warning message
* fix frontend lint
* update dev md for instruction of running unit tests
* add back unit tests
* revert back to the original sandbox implementation to fix testcases
* revert use host network
* get docker socket gid and usermod instead of chmod 777
* allow unit test workflow to find docker.sock
* make sandbox test working via patch
* fix arg parser that's broken for some reason
* try to fix app build disk space issue
* fix integration test
* Revert "fix arg parser that's broken for some reason"
This reverts commit 6cc89611337bb74555fd16b4be78681fb7e36573.
* update Development.md
* cleanup intergration tests & add exception for CodeAct+execbox
* fix config
* implement user_message action
* fix doc
* fix event dict error
* fix frontend lint
* revert accidentally changes to integration tests
* revert accidentally changes to integration tests
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
Co-authored-by: Leo <ifuryst@gmail.com>
Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
Co-authored-by: Jim Su <jimsu@protonmail.com>
Co-authored-by: Alex Bäuerle <alex@a13x.io>
Co-authored-by: sp.wack <83104063+amanape@users.noreply.github.com>
Co-authored-by: Robert Brennan <contact@rbren.io>
* initialize plugin definition
* initialize plugin definition
* simplify mixin
* further improve plugin mixin
* add cache dir for pip
* support clean up cache
* add script for setup jupyter and execution server
* integrate JupyterRequirement to ssh_box
* source bashrc at the end of plugin load
* add execute_cli that accept code via stdin
* make JUPYTER_EXEC_SERVER_PORT configurable via env var
* increase background cmd sleep time
* Update opendevin/sandbox/plugins/mixin.py
Co-authored-by: Robert Brennan <accounts@rbren.io>
* add mixin to base class
* make jupyter requirement a dataclass
* source plugins only when >0 requirements
* add `sandbox_plugins` for each agent & have controller take care of it
* update build.sh to make logs available in /opendevin/logs
* switch to use config for lib and cache dir
* Add SANDBOX_WORKSPACE_DIR into config
* Add SANDBOX_WORKSPACE_DIR into config
* fix occurence of /workspace
* fix permission issue with /workspace
* use python to implement execute_cli to avoid stdin escape issue
* add IPythonRunCellAction and get it working
* wait until jupyter is avaialble
* support plugin via copying instead of mounting
* add agent talk action
* support follow-up user language feedback
* add __str__ for action to be printed better
* only print PLAN at the beginning
* wip: update codeact agent
* get rid the initial messate
* update codeact agent to handle null action;
add thought to bash
* dispatch thought for RUN action as well
* fix weird behavior of pxssh where the output would not flush correctly
* make ssh box can handle exit_code properly as well
* add initial version of swe-agent plugin;
* rename swe cursors
* split setup script into two and create two requirements
* print SWE-agent command documentation
* update swe-agent to default to no custom docs
* add initial version of swe-agent plugin;
* rename swe cursors
* split setup script into two and create two requirements
* print SWE-agent command documentation
* update swe-agent to default to no custom docs
* update dockerfile with dependency from swe-agent
* make env setup a separate script for .bashrc source
* add wip prompt
* fix mount_dir for ssh_box
* update prompt
* fix mount_dir for ssh_box
* default to use host network
* default to use host network
* move prompt to a separate file
* fix swe-tool plugins;
add missing _split_string
* remove hostname from sshbox
* update the prompt with edit functionality
* fix swe-tool plugins;
add missing _split_string
* add awaiting into status bar
* fix the bug of additional send event
* remove some print action
* move logic to config.py
* remove debugging comments
* make host network as default
* make WORKSPACE_MOUNT_PATH as abspath
* implement execute_cli via file cp
* Revert "implement execute_cli via file cp"
This reverts commit 06f0155bc17d1f99097e71b83b2143f6e8092654.
* add codeact dependencies to default container
* add IPythonRunCellObservation
* add back cache dir and default to /tmp
* make USE_HOST_NETWORK a bool
* revert use host network to false
* add temporarily fix for IPython RUN action
* update prompt
* revert USE_HOST_NETWORK to true since it is not affecting anything
* attempt to fix lint
* remove newline
* fix jupyter execution server
* add `thought` to most action class
* fix unit tests for current action abstraction
* support user exit
* update test cases with the latest action format (added 'thought')
* fix integration test for CodeActAGent by mocking stdin
* only mock stdin for tests with user_responses.log
* remove -exec integration test for CodeActAgent since it is not supported
* remove specific stop word
* fix comments
* improve clarity of prompt
* fix py lint
* fix integration tests
* sandbox might failed in chown due to mounting, but it won't be fatal
* update debug instruction for sshbox
* fix typo
* get RUN_AS_DEVIN and network=host working with app sandbox
* get RUN_AS_DEVIN and network=host working with app sandbox
* attempt to fix the workspace base permission
* sandbox might failed in chown due to mounting, but it won't be fatal
* update sshbox instruction
* remove default user id since it will be passed in the instruction
* revert permission fix since it should be resolved by correct SANDBOX_USER_ID
* the permission issue can be fixed by simply provide correct env var
* remove log
* set sandbox user id to getuid by default
* move logging to initializer
* make the uid consistent across host, app container, and sandbox
* remove hostname as it causes sudo issue
* fix permission of entrypoint script
* make the uvicron app run as host user uid for jupyter plugin
* add warning message
* update dev md for instruction of running unit tests
* add back unit tests
* revert back to the original sandbox implementation to fix testcases
* revert use host network
* get docker socket gid and usermod instead of chmod 777
* allow unit test workflow to find docker.sock
* make sandbox test working via patch
* fix arg parser that's broken for some reason
* try to fix app build disk space issue
* fix integration test
* Revert "fix arg parser that's broken for some reason"
This reverts commit 6cc89611337bb74555fd16b4be78681fb7e36573.
* update Development.md
* cleanup intergration tests & add exception for CodeAct+execbox
* fix config
* implement user_message action
* fix doc
* fix event dict error
* fix frontend lint
* revert accidentally changes to integration tests
* revert accidentally changes to integration tests
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
Co-authored-by: Robert Brennan <contact@rbren.io>
* Fix micro agents definitions
* Add tests for micro agents
* Add to CI
* Revert "Add to CI"
This reverts commit 94f3b4e7c8408a1b0267f3847cbaefdcd995db05.
* Remove test artifacts for ManagerAgent
---------
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
* Some improvements to prompts, some better exception handling for various file IO errors, added timeout and max return token configurations for the LLM api.
* More monologue prompt improvements
* Dynamically set username provided in prompt.
* Remove absolute paths from llm prompts, fetch working directory from sandbox when resolving paths in fileio operations, add customizable timeout for bash commands, mention said timeout in llm prompt.
* Switched ssh_box to disabling tty echo and removed the logic attempting to delete it from the response afterwards, fixed get_working_directory for ssh_box.
* Update prompts in integration tests to match monologue agent changes.
* Minor tweaks to make merge easier.
* Another minor prompt tweak, better invalid json handling.
* Fix lint error
* More catch-up to fix lint errors introduced by merge.
* Force WORKSPACE_MOUNT_PATH_IN_SANDBOX to match WORKSPACE_MOUNT_PATH in local sandbox mode, combine exception handlers in prompts.py.
---------
Co-authored-by: Jim Su <jimsu@protonmail.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
* Some improvements to prompts, some better exception handling for various file IO errors, added timeout and max return token configurations for the LLM api.
* More monologue prompt improvements
* Dynamically set username provided in prompt.
* Remove absolute paths from llm prompts, fetch working directory from sandbox when resolving paths in fileio operations, add customizable timeout for bash commands, mention said timeout in llm prompt.
* Switched ssh_box to disabling tty echo and removed the logic attempting to delete it from the response afterwards, fixed get_working_directory for ssh_box.
* Update prompts in integration tests to match monologue agent changes.
* Minor tweaks to make merge easier.
* Another minor prompt tweak, better invalid json handling.
* Fix lint error
* More catch-up to fix lint errors introduced by merge.
---------
Co-authored-by: Jim Su <jimsu@protonmail.com>
Co-authored-by: Robert Brennan <accounts@rbren.io>
* add options for controlling memory
* Update agenthub/monologue_agent/utils/memory.py
Co-authored-by: Jim Su <jimsu@protonmail.com>
* move memory initialization switch back
* fix lint
* fix type
---------
Co-authored-by: Jim Su <jimsu@protonmail.com>
* Add integration test framework with mock llm
* Fix MonologueAgent and PlannerAgent tests
* Remove adhoc logging
* Use existing logs
* Fix SWEAgent and PlannerAgent
* Check-in test log files
* conftest: look up under test name folder only
* Add docstring to conftest
* Finish dev doc
* Avoid non-determinism
* Remove dependency on llm embedding model
* Init embedding model only for MonologueAgent
* Add adhoc fix for sandbox discrepancy
* Test ssh and exec sandboxes
* CI: fix missing sandbox type
* conftest: Remove hack
* Reword comment for TODO
* Add malformed JSON where we don't even start finding actions
* Send any exception during JSON parsing back
* Use specific exceptions
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* add initial version of swe-agent plugin;
* rename swe cursors
* split setup script into two and create two requirements
* print SWE-agent command documentation
* update swe-agent to default to no custom docs
* update dockerfile with dependency from swe-agent
* make env setup a separate script for .bashrc source
* fix swe-tool plugins;
add missing _split_string
* remove import for temporarily fix (will add back in another pr)
* add initial version of swe-agent plugin;
* rename swe cursors
* split setup script into two and create two requirements
* print SWE-agent command documentation
* update swe-agent to default to no custom docs
* update dockerfile with dependency from swe-agent
* make env setup a separate script for .bashrc source
* fix swe-tool plugins;
add missing _split_string
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* initialize plugin definition
* initialize plugin definition
* simplify mixin
* further improve plugin mixin
* add cache dir for pip
* support clean up cache
* add script for setup jupyter and execution server
* integrate JupyterRequirement to ssh_box
* source bashrc at the end of plugin load
* add execute_cli that accept code via stdin
* make JUPYTER_EXEC_SERVER_PORT configurable via env var
* increase background cmd sleep time
* Update opendevin/sandbox/plugins/mixin.py
Co-authored-by: Robert Brennan <accounts@rbren.io>
* add mixin to base class
* make jupyter requirement a dataclass
* source plugins only when >0 requirements
* add `sandbox_plugins` for each agent & have controller take care of it
* update build.sh to make logs available in /opendevin/logs
* switch to use config for lib and cache dir
* fix permission issue with /workspace
* use python to implement execute_cli to avoid stdin escape issue
* wait until jupyter is avaialble
* support plugin via copying instead of mounting
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* AgentHub.planner_agent.prompt: Optimize the get_prompt function by using a dictionary to map ActionType to hints, thus avoiding repetitions and making the code more readable and maintainable.
* Update prompt.py
* Fix Lint issues in prompt.py
* Fix lint issues in prompt.py
* Fix Lint issues in prompt.py
* Fix Lint issues prompt.py
* Remove trailing whitespace
---------
Co-authored-by: Alex Bäuerle <alex@a13x.io>
Co-authored-by: Robert Brennan <accounts@rbren.io>
Co-authored-by: Jim Su <jimsu@protonmail.com>
* Clean up manual sleep
* Add default retries and document them.
* Add doctrings to llm
* Add exponential backoff for rate limiting errors
* Get embeddings for the action and its own content, not the user message
* Add a few bad exceptions to stop loop
* Stop loop when the step has no action
* Add action with content, no message, to history
* make retry settings customizable
* fix condense to stop the loop for the same reasons as completion
* Add 500-504 exception to retries
* document the retry variables
* Add retries and limits for embeddings. Replaces llama-index hard-coded decorator.
* Rename to retry_min_wait and retry_max_wait
* feat: support controlling agent task state.
* feat: add agent task state to agent status bar.
* feat: add agent task control bar to FE.
* Remove stop agent task action.
* Merge pause and resume buttons into one button; Add loading and disabled status for action buttons.
* Apply suggestions from code review
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* Merge branch 'main' of https://github.com/JayQuimby/OpenDevin
* Using commands.sh for ACI
* parsing, prompting, and actions modifications
* added start and end index to read and write
* bug fixes and test updates
* Lint code changes to ensure code is proper
* State management, bugs, prompts
* Prompt Engineering
* exception handling
* big fixes
* more bug fixes
* merge conflicts
* Renamed SWEAgent, basic tests, bug fixes
* prompt changes, bug fixes
* merge conflicts
* merge conflict
* start and end line for read and write
* more merge conflicts
* env error
* linter error
* read fixed, prompt change, example added
* added x_line:end read operation
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* Refactor print_to_color into a color formatter
misc fixes
catch ValueErrors and others from Router initialization
add default methods
* Tweak console log formatting, clean up after rebasing exceptions out
* Fix prompts/responses
* clean up
* keep regular colors when no msg_type
* fix filename
* handle file log first
* happy mypy
* ok, mypy
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* CI: Add autopep8 linter
Currently, we have autopep8 as part of pre-commit-hook. To ensure
consistent behaviour, we should have it in CI as well.
Moreover, pre-commit-hook contains a double-quote-string-fixer hook
which changes all double quotes to single quotes, but I do observe
some PRs with massive changes that do the opposite way. I suspect
that these authors 1) disable or circumvent the pre-commit-hook,
and 2) have other linters such as black in their IDE, which
automatically change all single quotes to double quotes. This
has caused a lot of unnecessary diff, made review really hard,
and led to a lot of conflicts.
* Use -diff for autopep8
* autopep8: Freeze version in CI
* Ultimate fix
* Remove pep8 long line disable workaround
* Fix lint.yml
* Fix all files under opendevin and agenthub
* Tweak for weak llms
* Update to the latest commits
* Update to the latest commits
* Fix lint errors
* Remove merge artifact
---------
Co-authored-by: Jim Su <jimsu@protonmail.com>
* doc: Guide for using local LLM with Ollama
* forgot to delete print statement
* typos
* Updated guide - new working method
* Move to docs folder
* Fixed front end overwrite local model name
* Update llm.py
* Delete docs/examples/images/example.png
deleted example.png
* Documentation of agent differences
* rename examples to documentation
* Docstrings for all agents
* typo fix
* typo fixes
* Typo fixes
* more typo fixes
* typo fix
* typo fixes
* typos fixed
* Typo fixes
* top 10 list
* typo fix
* typo fix
* typos to the moon
* typos fixed
* typo fix
* typo fix
* anotha one
* The rest of the typos
* Corrected agent descriptions
* Agents markdown updated
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* Updating memory for monologue agent to fix base_url being used with OpenAIEmbedding by accident, added default text-embedding-ada-002 to monologue agent memory for OpenAIEmbeddings, added more enviroment variable configurations to setup-config in make file
* adding indent