* 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>
* 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
* feat: add agent manager to manage all agents;
* extract the host ssh port to prevent conflict.
* clean all containers with prefix is sandbox-
* merge from upstream/main
* merge from upstream/main
* Update frontend/src/state/settingsSlice.ts
* Update opendevin/sandbox/ssh_box.py
* Update opendevin/sandbox/exec_box.py
---------
Co-authored-by: Robert Brennan <accounts@rbren.io>
* Add logging config for the app and for llm debug
* - switch to python, add special llm logger
- add logging to sandbox.py
- add session.py
- add a directory per session
- small additions for AgentController
* - add sys log, but try to exclude litellm; log llm responses as json
* Update opendevin/_logging.py
Co-authored-by: Anas DORBANI <95044293+dorbanianas@users.noreply.github.com>
* - use standard file naming
- quick pass through a few more files
* fix ruff
* clean up
* mypy types
* make mypy happy
---------
Co-authored-by: Anas DORBANI <95044293+dorbanianas@users.noreply.github.com>
* feat: websocket connection management and sandbox bound to session.
* fix: set default value to id
* feat: add session management.
* fix for mypy
* fix for mypy
* fix the pnpm-lock.
* fix the default model is empty will throw error.
* Propagate exception up to task coroutine instead of breaking the for loop manually, await coroutine so exception is returned to caller
* Remove redundant traceback as is already called in step function lower on the stack
* Change message as error could occur in middle of task also
* Fix linter errors
* Raise exception only on api key error
* Add TODO
* 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>