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
2024-03-16 22:46:04 +08:00
2024-03-17 09:33:12 +08:00
2024-03-25 08:07:41 -04:00

OpenDevin Logo

OpenDevin: Code Less, Make More

License

demo-video.webm

Mission 🎯

Welcome to OpenDevin, an open-source project aiming to replicate Devin, an autonomous AI software engineer who is capable of executing complex engineering tasks and collaborating actively with users on software development projects. This project aspires to replicate, enhance, and innovate upon Devin through the power of the open-source community.

Work in Progress

OpenDevin is still a work in progress. But you can run the current app to see things working end-to-end:

export OPENAI_API_KEY="..."
export WORKSPACE_DIR="/path/to/your/project"
python -m pip install -r requirements.txt
uvicorn opendevin.server.listen:app --port 3000

Then in a second terminal:

cd frontend
npm install
npm run start -- --port 3001

You'll see OpenDevin running at localhost:3001

🤔 What is Devin?

Devin represents a cutting-edge autonomous agent designed to navigate the complexities of software engineering. It leverages a combination of tools such as a shell, code editor, and web browser, showcasing the untapped potential of LLMs in software development. Our goal is to explore and expand upon Devin's capabilities, identifying both its strengths and areas for improvement, to guide the progress of open code models.

🐚 Why OpenDevin?

The OpenDevin project is born out of a desire to replicate, enhance, and innovate beyond the original Devin model. By engaging the open-source community, we aim to tackle the challenges faced by Code LLMs in practical scenarios, producing works that significantly contribute to the community and pave the way for future advancements.

Research Strategy

Achieving full replication of production-grade applications with LLMs is a complex endeavor. Our strategy involves:

  1. Core Technical Research: Focusing on foundational research to understand and improve the technical aspects of code generation and handling.
  2. Specialist Abilities: Enhancing the effectiveness of core components through data curation, training methods, and more.
  3. Task Planning: Developing capabilities for bug detection, codebase management, and optimization.
  4. Evaluation: Establishing comprehensive evaluation metrics to better understand and improve our models.

🛠 Technology Stack

  • Sandboxing Environment: Ensuring safe execution of code using technologies like Docker and Kubernetes.
  • Frontend Interface: Developing user-friendly interfaces for monitoring progress and interacting with Devin, potentially leveraging frameworks like React or creating a VSCode plugin for a more integrated experience.

🚀 Next Steps

An MVP demo is urgent for us. Here are the most important things to do:

  • UI: a chat interface, a shell demonstrating commands, a browser, etc.
  • Architecture: an agent framework with a stable backend, which can read, write and run simple commands
  • Agent: capable of generating bash scripts, running tests, etc.
  • Evaluation: a minimal evaluation pipeline that is consistent with Devin's evaluation.

After finishing building the MVP, we will move towards research in different topics, including foundation models, specialist capabilities, evaluation, agent studies, etc.

How to Contribute

OpenDevin is a community-driven project, and we welcome contributions from everyone. Whether you're a developer, a researcher, or simply enthusiastic about advancing the field of software engineering with AI, there are many ways to get involved:

  • Code Contributions: Help us develop the core functionalities, frontend interface, or sandboxing solutions.
  • Research and Evaluation: Contribute to our understanding of LLMs in software engineering, participate in evaluating the models, or suggest improvements.
  • Feedback and Testing: Use the OpenDevin toolset, report bugs, suggest features, or provide feedback on usability.

For details, please check this document.

Join Us

We use Slack to discuss. Feel free to fill in the form if you would like to join the Slack organization of OpenDevin. We will reach out shortly if we feel you are a good fit to the current team!

Stay updated on OpenDevin's progress, share your ideas, and collaborate with fellow enthusiasts and experts. Together, we can make significant strides towards simplifying software engineering tasks and creating more efficient, powerful tools for developers everywhere.

🐚 Code less, make more with OpenDevin.

Description
No description provided
Readme MIT 750 MiB
Languages
Python 77.7%
TypeScript 19.6%
Shell 1.2%
Jinja 0.8%
JavaScript 0.3%
Other 0.3%