### [OpenHands](https://github.com/All-Hands-AI/OpenHands)

> Handle: `openhands`
> URL: [http://localhost:34141](http://localhost:34141)

<div align="center">
  <img src="https://raw.githubusercontent.com/All-Hands-AI/OpenHands/refs/heads/main/docs/static/img/logo.png" alt="Logo" width="200">
  <h1 align="center">OpenHands: Code Less, Make More</h1>
</div>

<div align="center">
  <a href="https://github.com/All-Hands-AI/OpenHands/graphs/contributors"><img src="https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge&color=blue" alt="Contributors"></a>
  <a href="https://github.com/All-Hands-AI/OpenHands/stargazers"><img src="https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge&color=blue" alt="Stargazers"></a>
  <a href="https://codecov.io/github/All-Hands-AI/OpenHands?branch=main"><img alt="CodeCov" src="https://img.shields.io/codecov/c/github/All-Hands-AI/OpenHands?style=for-the-badge&color=blue"></a>
  <a href="https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE"><img src="https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge&color=blue" alt="MIT License"></a>
  <br/>
  <a href="https://join.slack.com/t/opendevin/shared_invite/zt-2oikve2hu-UDxHeo8nsE69y6T7yFX_BA"><img src="https://img.shields.io/badge/Slack-Join%20Us-red?logo=slack&logoColor=white&style=for-the-badge" alt="Join our Slack community"></a>
  <a href="https://discord.gg/ESHStjSjD4"><img src="https://img.shields.io/badge/Discord-Join%20Us-purple?logo=discord&logoColor=white&style=for-the-badge" alt="Join our Discord community"></a>
  <a href="https://github.com/All-Hands-AI/OpenHands/blob/main/CREDITS.md"><img src="https://img.shields.io/badge/Project-Credits-blue?style=for-the-badge&color=FFE165&logo=github&logoColor=white" alt="Credits"></a>
  <br/>
  <a href="https://docs.all-hands.dev/modules/usage/getting-started"><img src="https://img.shields.io/badge/Documentation-000?logo=googledocs&logoColor=FFE165&style=for-the-badge" alt="Check out the documentation"></a>
  <a href="https://arxiv.org/abs/2407.16741"><img src="https://img.shields.io/badge/Paper%20on%20Arxiv-000?logoColor=FFE165&logo=arxiv&style=for-the-badge" alt="Paper on Arxiv"></a>
  <a href="https://huggingface.co/spaces/OpenHands/evaluation"><img src="https://img.shields.io/badge/Benchmark%20score-000?logoColor=FFE165&logo=huggingface&style=for-the-badge" alt="Evaluation Benchmark Score"></a>
  <hr>
</div>

OpenHands agents can do anything a human developer can: modify code, run commands, browse the web,
call APIs, and yes—even copy code snippets from StackOverflow.

#### Starting

```bash
# [Optional] pre-pull the image
harbor pull openhands
# [Optional] pre-pull the runtime image
docker pull docker.all-hands.dev/all-hands-ai/runtime:latest-nikolaik

# [Optional] Launch Harbor with LLM backends
# You can connect openhands to non-Harbor LLM backends otherwise
harbor up

# Navigate to the target directory
cd ./your-code-project
# Launch openhands in a given workspace
harbor openhands

# Open openhands in the browser
harbor open openhands
```

#### Configuration

Unfortunately, due to the current state of the project, Harbor can only pre-configure the base URL for its Ollama instance in the `openhands`, all other settings have to be done manually via OpenHands UI. Please open an issue in Harbor repo, if you see that this has changed.

OpenHands runs `litellm` under the hood, so custom LLM configuration needs to be done according to the [litellm documentation](https://docs.litellm.ai/docs/).

For example for the built-in Ollama instance:
- [`harbor url -i ollama`](./3.-Harbor-CLI-Reference.md#harbor-url-service) - get the internal URL of the `ollama` service
  - Add `/v1` to the end of the URL - `http://ollama:11434/v1`
- Get the model ID you want to use, prefix it with `openai/`
  - For example, `qwen2.5:7b-instruct-q8_0` becomes `openai/qwen2.5:7b-instruct-q8_0`

#### Usage

OpenHands requires a fairly powerful LLM with tool support to accomplish its tasks. If you're using ollama, you can see [compatible models here](https://ollama.com/search?c=tools). Aim for as large of a model as you can, as OpenHands is a very demanding service. You should also ensure that you can run the model with ~16k context length or more to ensure that all needed context reaches the model. You can expect reasonable results from 70B+ models.
