OpenDevin

OpenDevin: The Open Source Devin

4 min


[vc_row][vc_column][vc_headings linewidth=”0″ borderwidth=”1″ borderclr=”#000000″ title=”OpenDevin” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” titlesize=”60″ titleclr=”#000000″ caption_url=”” caption_urls=”” caption_urlss=”” caption_urldesc=””]The Open Source of Devin[/vc_headings][vc_single_image image=”5751″ alignment=”center”][vc_column_text]OpenDevin is a remarkable open-source project that successfully replicates Devin, an autonomous AI software engineer. Devin is capable of executing complex engineering tasks and collaborating actively with users on software development projects. The OpenDevin project not only replicates Devin but also enhances and innovates upon its capabilities through the power of the open-source community. With OpenDevin, you can confidently expect a high level of performance and innovation in your software development projects.[/vc_column_text][vc_separator][/vc_column][/vc_row][vc_row][vc_column][vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”How to Contribute in OpenDevin?” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2871″ caption_url=”” caption_urls=”” caption_urlss=”” caption_urldesc=””] [/vc_headings][vc_column_text]

1. Fork the Official Repository

 

Fork OpenDevin repository into your account. Clone your forked repository into your local environment.

[/vc_column_text][vc_btn title=”OpenDevin Repository” color=”inverse” align=”center” i_align=”right” i_icon_fontawesome=”fab fa-github” add_icon=”true” link=”url:https%3A%2F%2Fgithub.com%2FOpenDevin%2FOpenDevin|target:_blank”][vc_message message_box_color=”black” icon_fontawesome=”fas fa-code”]

git clone git@github.com:<YOUR-USERNAME>/OpenDevin.git

[/vc_message][vc_column_text]

2. Configure Git

 

Set the OpenDevin official repository as your upstream to synchronize with the latest updates in the official repository. Add the original repository as an upstream

[/vc_column_text][vc_message message_box_color=”black” icon_fontawesome=”fas fa-code”]

cd OpenDevin
git remote add upstream git@github.com:OpenDevin/OpenDevin.git

[/vc_message][vc_column_text]

Make sure that the remote is set.

[/vc_column_text][vc_message message_box_color=”black” icon_fontawesome=”fas fa-code”]

git remote -v

[/vc_message][vc_column_text]

You should get both origin and upstream in the output.

3. Synchronize with the Official Repository

 

Synchronize the latest commit with the official repository before start coding.

[/vc_column_text][vc_message message_box_color=”black” icon_fontawesome=”fas fa-code”]

git fetch upstream
git checkout main
git merge upstream/main
git push origin main

[/vc_message][vc_column_text]

4. Create a New Branch And Open a Pull Request

 

Once you finish implementing, open the forked repository and locate the source branch, which is your new branch. The target branch is OpenDevin/OpenDevin main . Once you’ve found both branches, you should see a PR in OpenDevin PRs.

Then OpenDevin team will review your code.

PR Rules

 

1. Pull Request title

 

As described here, a valid PR title should begin with one of the following prefixes:

  • feat: A new feature
  • fix: A bug fix
  • doc: Documentation only changes
  • refactor: A code change that neither fixes a bug nor adds a feature
  • style: A refactoring that improves code style
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • ci: Changes to CI configuration files and scripts (example scopes: .githubci (Buildkite))
  • chore: Other changes that don’t modify src or test files
  • revert: Reverts a previous commit

For example, a PR title could be:

  • refactor: modify package path
  • feat(frontend): xxxx, where (frontend) means that this PR mainly focuses on the frontend component.

You may also check out the previous PRs in the PR list.

As described here, we create several labels. Every PR should have a better tag with corresponding labels.

2. Pull Request description

 

  • If your PR is small (such as a typo fix), you can go brief.
  • If it is large and you have changed a lot, it’s better to write more details.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”How It Works” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2854″][/vc_headings][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

Requirements

 

Installation

[/vc_column_text][vc_message message_box_color=”black” icon_fontawesome=”fas fa-code”]

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

[/vc_message][vc_column_text]Then, in another terminal, execute this:[/vc_column_text][vc_message message_box_color=”black” icon_fontawesome=”fas fa-code”]

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

[/vc_message][vc_column_text]Now you can access OpenDevin from  localhost:3001[/vc_column_text][vc_column_text]

Choosing a Model

 

LiteLLM has been used in this tutorial, OpenDevin can run with any foundation model provided by LiteLLM, including OpenAI, Claude, and Gemini. For a full list of providers, you can visit LiteLLM’s website.

To change the model, set the LLM_MODEL and LLM_API_KEY environment variables.

For example, if you want to run Claude:

[/vc_column_text][vc_message message_box_color=”black” icon_fontawesome=”fas fa-code”]

export LLM_API_KEY="your-api-key"
export LLM_MODEL="claude-3-opus-20240229"

[/vc_message][vc_separator color=”mulled_wine”][/vc_column][/vc_row][vc_row][vc_column][vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”OpenDevin Frontend” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2854″ caption_url=”” caption_urls=”” caption_urlss=”” caption_urldesc=””] [/vc_headings][vc_column_text]

Getting Started with the OpenDevin Frontend

 

Available Scripts

 

In the project directory, you can run:

npm start

 

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

 

Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

Terminal

 

The OpenDevin terminal is powered by Xterm.js.

The terminal listens for events over a WebSocket connection. The WebSocket URL is specified by the environment variable REACT_APP_TERMINAL_WS_URL (prepending REACT_APP_ to environment variable names is necessary to expose them).

A simple websocket server can be found in the /server directory.

[/vc_column_text][vc_separator][/vc_column][/vc_row][vc_row][vc_column][vc_message]Please review the information provided in each section to ensure its accuracy: frontendagenthubevaluationserver.[/vc_message][/vc_column][/vc_row]

Comments

comments


Like it? Share with your friends!

-1

0 Comments

Your email address will not be published. Required fields are marked *

Belmechri

I am an IT engineer, content creator, and proud father with a passion for innovation and excellence. In both my personal and professional life, I strive for excellence and am committed to finding innovative solutions to complex problems.