* 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>
* Add errors for non-unicode file data or command return, trim excessively long command returns.
* Fix lint issue.
* Fix lint issue (try 2).
* Realized that prompts were trimmed elsewhere and dropped the new addition.
* 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>
* Send the permission error to the llm
* Update opendevin/action/fileop.py
* Update opendevin/action/fileop.py
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* refactor error handling so not all exceptions are caught
* revert
* Send the failed decoding back to the LLM (#1322)
* fix quotes
---------
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
* 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>
* fix weird behavior of pxssh where the output would not flush correctly
* make ssh box can handle exit_code properly as well
* Update opendevin/sandbox/docker/ssh_box.py
Co-authored-by: Robert Brennan <accounts@rbren.io>
* fix typo
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* Add checks to stop infinite loops
* Send an AgentErrorObservation for the user to see an oops loop
* (NullAction, Obs) problem should be (NullAction, error Obs)
* Merge the two with AgentErrorObs.
* Update opendevin/controller/agent_controller.py
* 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
* Fix linter issue
---------
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
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>
* 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
Removing because the new filetree implementation is fast enough as is and fetching partial trees adds a lot of complexity that we probably don't need. For example, if we still want to automatically open the tree location of a changed file, we need to make sure all the parent folders are fetched first.
* Add /api/list-files endpoint
Returns files at the path specified by query parameter relpath, relative to base path, with a depth of 1
* Add method in services