mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Replace All-Hands-AI references with OpenHands (#11287)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Engel Nyst <engel.nyst@gmail.com> Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
parent
2631294e79
commit
b5e00f577c
6
.github/scripts/update_pr_description.sh
vendored
6
.github/scripts/update_pr_description.sh
vendored
@ -13,12 +13,12 @@ DOCKER_RUN_COMMAND="docker run -it --rm \
|
|||||||
-p 3000:3000 \
|
-p 3000:3000 \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
--add-host host.docker.internal:host-gateway \
|
--add-host host.docker.internal:host-gateway \
|
||||||
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:${SHORT_SHA}-nikolaik \
|
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/openhands/runtime:${SHORT_SHA}-nikolaik \
|
||||||
--name openhands-app-${SHORT_SHA} \
|
--name openhands-app-${SHORT_SHA} \
|
||||||
docker.all-hands.dev/all-hands-ai/openhands:${SHORT_SHA}"
|
docker.all-hands.dev/openhands/openhands:${SHORT_SHA}"
|
||||||
|
|
||||||
# Define the uvx command
|
# Define the uvx command
|
||||||
UVX_RUN_COMMAND="uvx --python 3.12 --from git+https://github.com/All-Hands-AI/OpenHands@${BRANCH_NAME}#subdirectory=openhands-cli openhands"
|
UVX_RUN_COMMAND="uvx --python 3.12 --from git+https://github.com/OpenHands/OpenHands@${BRANCH_NAME}#subdirectory=openhands-cli openhands"
|
||||||
|
|
||||||
# Get the current PR body
|
# Get the current PR body
|
||||||
PR_BODY=$(gh pr view "$PR_NUMBER" --json body --jq .body)
|
PR_BODY=$(gh pr view "$PR_NUMBER" --json body --jq .body)
|
||||||
|
|||||||
2
.github/workflows/dispatch-to-docs.yml
vendored
2
.github/workflows/dispatch-to-docs.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
repo: ["All-Hands-AI/docs"]
|
repo: ["OpenHands/docs"]
|
||||||
steps:
|
steps:
|
||||||
- name: Push to docs repo
|
- name: Push to docs repo
|
||||||
uses: peter-evans/repository-dispatch@v3
|
uses: peter-evans/repository-dispatch@v3
|
||||||
|
|||||||
2
.github/workflows/enterprise-preview.yml
vendored
2
.github/workflows/enterprise-preview.yml
vendored
@ -26,4 +26,4 @@ jobs:
|
|||||||
-H "Authorization: Bearer ${{ secrets.PAT_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.PAT_TOKEN }}" \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
-d "{\"ref\": \"main\", \"inputs\": {\"openhandsPrNumber\": \"${{ github.event.pull_request.number }}\", \"deployEnvironment\": \"feature\", \"enterpriseImageTag\": \"pr-${{ github.event.pull_request.number }}\" }}" \
|
-d "{\"ref\": \"main\", \"inputs\": {\"openhandsPrNumber\": \"${{ github.event.pull_request.number }}\", \"deployEnvironment\": \"feature\", \"enterpriseImageTag\": \"pr-${{ github.event.pull_request.number }}\" }}" \
|
||||||
https://api.github.com/repos/All-Hands-AI/deploy/actions/workflows/deploy.yaml/dispatches
|
https://api.github.com/repos/OpenHands/deploy/actions/workflows/deploy.yaml/dispatches
|
||||||
|
|||||||
2
.github/workflows/ghcr-build.yml
vendored
2
.github/workflows/ghcr-build.yml
vendored
@ -252,7 +252,7 @@ jobs:
|
|||||||
-H "Authorization: Bearer ${{ secrets.PAT_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.PAT_TOKEN }}" \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
-d "{\"ref\": \"main\", \"inputs\": {\"openhandsPrNumber\": \"${{ github.event.pull_request.number }}\", \"deployEnvironment\": \"feature\", \"enterpriseImageTag\": \"pr-${{ github.event.pull_request.number }}\" }}" \
|
-d "{\"ref\": \"main\", \"inputs\": {\"openhandsPrNumber\": \"${{ github.event.pull_request.number }}\", \"deployEnvironment\": \"feature\", \"enterpriseImageTag\": \"pr-${{ github.event.pull_request.number }}\" }}" \
|
||||||
https://api.github.com/repos/All-Hands-AI/deploy/actions/workflows/deploy.yaml/dispatches
|
https://api.github.com/repos/OpenHands/deploy/actions/workflows/deploy.yaml/dispatches
|
||||||
|
|
||||||
# Run unit tests with the Docker runtime Docker images as root
|
# Run unit tests with the Docker runtime Docker images as root
|
||||||
test_runtime_root:
|
test_runtime_root:
|
||||||
|
|||||||
4
.github/workflows/openhands-resolver.yml
vendored
4
.github/workflows/openhands-resolver.yml
vendored
@ -201,7 +201,7 @@ jobs:
|
|||||||
issue_number: ${{ env.ISSUE_NUMBER }},
|
issue_number: ${{ env.ISSUE_NUMBER }},
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
body: `[OpenHands](https://github.com/All-Hands-AI/OpenHands) started fixing the ${issueType}! You can monitor the progress [here](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`
|
body: `[OpenHands](https://github.com/OpenHands/OpenHands) started fixing the ${issueType}! You can monitor the progress [here](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`
|
||||||
});
|
});
|
||||||
|
|
||||||
- name: Install OpenHands
|
- name: Install OpenHands
|
||||||
@ -233,7 +233,7 @@ jobs:
|
|||||||
if (isExperimentalLabel || isIssueCommentExperimental || isReviewCommentExperimental) {
|
if (isExperimentalLabel || isIssueCommentExperimental || isReviewCommentExperimental) {
|
||||||
console.log("Installing experimental OpenHands...");
|
console.log("Installing experimental OpenHands...");
|
||||||
|
|
||||||
await exec.exec("pip install git+https://github.com/all-hands-ai/openhands.git");
|
await exec.exec("pip install git+https://github.com/openhands/openhands.git");
|
||||||
} else {
|
} else {
|
||||||
console.log("Installing from requirements.txt...");
|
console.log("Installing from requirements.txt...");
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/run-eval.yml
vendored
2
.github/workflows/run-eval.yml
vendored
@ -101,7 +101,7 @@ jobs:
|
|||||||
-H "Authorization: Bearer ${{ secrets.PAT_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.PAT_TOKEN }}" \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
-d "{\"ref\": \"main\", \"inputs\": {\"github-repo\": \"${{ steps.eval_params.outputs.repo_url }}\", \"github-branch\": \"${{ steps.eval_params.outputs.eval_branch }}\", \"pr-number\": \"${PR_NUMBER}\", \"eval-instances\": \"${{ steps.eval_params.outputs.eval_instances }}\"}}" \
|
-d "{\"ref\": \"main\", \"inputs\": {\"github-repo\": \"${{ steps.eval_params.outputs.repo_url }}\", \"github-branch\": \"${{ steps.eval_params.outputs.eval_branch }}\", \"pr-number\": \"${PR_NUMBER}\", \"eval-instances\": \"${{ steps.eval_params.outputs.eval_instances }}\"}}" \
|
||||||
https://api.github.com/repos/All-Hands-AI/evaluation/actions/workflows/create-branch.yml/dispatches
|
https://api.github.com/repos/OpenHands/evaluation/actions/workflows/create-branch.yml/dispatches
|
||||||
|
|
||||||
# Send Slack message
|
# Send Slack message
|
||||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
|||||||
@ -124,7 +124,7 @@ These Slack etiquette guidelines are designed to foster an inclusive, respectful
|
|||||||
- Post questions or discussions in the most relevant channel (e.g., for [slack - #general](https://openhands-ai.slack.com/archives/C06P5NCGSFP) for general topics, [slack - #questions](https://openhands-ai.slack.com/archives/C06U8UTKSAD) for queries/questions.
|
- Post questions or discussions in the most relevant channel (e.g., for [slack - #general](https://openhands-ai.slack.com/archives/C06P5NCGSFP) for general topics, [slack - #questions](https://openhands-ai.slack.com/archives/C06U8UTKSAD) for queries/questions.
|
||||||
- When asking for help or raising issues, include necessary details like links, screenshots, or clear explanations to provide context.
|
- When asking for help or raising issues, include necessary details like links, screenshots, or clear explanations to provide context.
|
||||||
- Keep discussions in public channels whenever possible to allow others to benefit from the conversation, unless the matter is sensitive or private.
|
- Keep discussions in public channels whenever possible to allow others to benefit from the conversation, unless the matter is sensitive or private.
|
||||||
- Always adhere to [our standards](https://github.com/All-Hands-AI/OpenHands/blob/main/CODE_OF_CONDUCT.md#our-standards) to ensure a welcoming and collaborative environment.
|
- Always adhere to [our standards](https://github.com/OpenHands/OpenHands/blob/main/CODE_OF_CONDUCT.md#our-standards) to ensure a welcoming and collaborative environment.
|
||||||
- If you choose to mute a channel, consider setting up alerts for topics that still interest you to stay engaged. For Slack, Go to Settings → Notifications → My Keywords to add specific keywords that will notify you when mentioned. For example, if you're here for discussions about LLMs, mute the channel if it’s too busy, but set notifications to alert you only when “LLMs” appears in messages.
|
- If you choose to mute a channel, consider setting up alerts for topics that still interest you to stay engaged. For Slack, Go to Settings → Notifications → My Keywords to add specific keywords that will notify you when mentioned. For example, if you're here for discussions about LLMs, mute the channel if it’s too busy, but set notifications to alert you only when “LLMs” appears in messages.
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|||||||
@ -8,7 +8,7 @@ If this resonates with you, we'd love to have you join us in our quest!
|
|||||||
|
|
||||||
## 🤝 How to Join
|
## 🤝 How to Join
|
||||||
|
|
||||||
Check out our [How to Join the Community section.](https://github.com/All-Hands-AI/OpenHands?tab=readme-ov-file#-how-to-join-the-community)
|
Check out our [How to Join the Community section.](https://github.com/OpenHands/OpenHands?tab=readme-ov-file#-how-to-join-the-community)
|
||||||
|
|
||||||
## 💪 Becoming a Contributor
|
## 💪 Becoming a Contributor
|
||||||
|
|
||||||
|
|||||||
@ -13,15 +13,15 @@ To understand the codebase, please refer to the README in each module:
|
|||||||
|
|
||||||
## Setting up Your Development Environment
|
## Setting up Your Development Environment
|
||||||
|
|
||||||
We have a separate doc [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) that tells you how to set up a development workflow.
|
We have a separate doc [Development.md](https://github.com/OpenHands/OpenHands/blob/main/Development.md) that tells you how to set up a development workflow.
|
||||||
|
|
||||||
## How Can I Contribute?
|
## How Can I Contribute?
|
||||||
|
|
||||||
There are many ways that you can contribute:
|
There are many ways that you can contribute:
|
||||||
|
|
||||||
1. **Download and use** OpenHands, and send [issues](https://github.com/All-Hands-AI/OpenHands/issues) when you encounter something that isn't working or a feature that you'd like to see.
|
1. **Download and use** OpenHands, and send [issues](https://github.com/OpenHands/OpenHands/issues) when you encounter something that isn't working or a feature that you'd like to see.
|
||||||
2. **Send feedback** after each session by [clicking the thumbs-up thumbs-down buttons](https://docs.all-hands.dev/usage/feedback), so we can see where things are working and failing, and also build an open dataset for training code agents.
|
2. **Send feedback** after each session by [clicking the thumbs-up thumbs-down buttons](https://docs.all-hands.dev/usage/feedback), so we can see where things are working and failing, and also build an open dataset for training code agents.
|
||||||
3. **Improve the Codebase** by sending [PRs](#sending-pull-requests-to-openhands) (see details below). In particular, we have some [good first issues](https://github.com/All-Hands-AI/OpenHands/labels/good%20first%20issue) that may be ones to start on.
|
3. **Improve the Codebase** by sending [PRs](#sending-pull-requests-to-openhands) (see details below). In particular, we have some [good first issues](https://github.com/OpenHands/OpenHands/labels/good%20first%20issue) that may be ones to start on.
|
||||||
|
|
||||||
## What Can I Build?
|
## What Can I Build?
|
||||||
Here are a few ways you can help improve the codebase.
|
Here are a few ways you can help improve the codebase.
|
||||||
@ -35,7 +35,7 @@ of the application, please open an issue first, or better, join the #eng-ui-ux c
|
|||||||
to gather consensus from our design team first.
|
to gather consensus from our design team first.
|
||||||
|
|
||||||
#### Improving the agent
|
#### Improving the agent
|
||||||
Our main agent is the CodeAct agent. You can [see its prompts here](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/agenthub/codeact_agent).
|
Our main agent is the CodeAct agent. You can [see its prompts here](https://github.com/OpenHands/OpenHands/tree/main/openhands/agenthub/codeact_agent).
|
||||||
|
|
||||||
Changes to these prompts, and to the underlying behavior in Python, can have a huge impact on user experience.
|
Changes to these prompts, and to the underlying behavior in Python, can have a huge impact on user experience.
|
||||||
You can try modifying the prompts to see how they change the behavior of the agent as you use the app
|
You can try modifying the prompts to see how they change the behavior of the agent as you use the app
|
||||||
@ -54,7 +54,7 @@ The agent needs a place to run code and commands. When you run OpenHands on your
|
|||||||
to do this by default. But there are other ways of creating a sandbox for the agent.
|
to do this by default. But there are other ways of creating a sandbox for the agent.
|
||||||
|
|
||||||
If you work for a company that provides a cloud-based runtime, you could help us add support for that runtime
|
If you work for a company that provides a cloud-based runtime, you could help us add support for that runtime
|
||||||
by implementing the [interface specified here](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/base.py).
|
by implementing the [interface specified here](https://github.com/OpenHands/OpenHands/blob/main/openhands/runtime/base.py).
|
||||||
|
|
||||||
#### Testing
|
#### Testing
|
||||||
When you write code, it is also good to write tests. Please navigate to the [`./tests`](./tests) folder to see existing test suites.
|
When you write code, it is also good to write tests. Please navigate to the [`./tests`](./tests) folder to see existing test suites.
|
||||||
@ -84,7 +84,7 @@ For example, a PR title could be:
|
|||||||
- `refactor: modify package path`
|
- `refactor: modify package path`
|
||||||
- `feat(frontend): xxxx`, where `(frontend)` means that this PR mainly focuses on the frontend component.
|
- `feat(frontend): xxxx`, where `(frontend)` means that this PR mainly focuses on the frontend component.
|
||||||
|
|
||||||
You may also check out previous PRs in the [PR list](https://github.com/All-Hands-AI/OpenHands/pulls).
|
You may also check out previous PRs in the [PR list](https://github.com/OpenHands/OpenHands/pulls).
|
||||||
|
|
||||||
### Pull Request description
|
### Pull Request description
|
||||||
- If your PR is small (such as a typo fix), you can go brief.
|
- If your PR is small (such as a typo fix), you can go brief.
|
||||||
@ -97,7 +97,7 @@ please include a short message that we can add to our changelog.
|
|||||||
|
|
||||||
### Opening Issues
|
### Opening Issues
|
||||||
|
|
||||||
If you notice any bugs or have any feature requests please open them via the [issues page](https://github.com/All-Hands-AI/OpenHands/issues). We will triage based on how critical the bug is or how potentially useful the improvement is, discuss, and implement the ones that the community has interest/effort for.
|
If you notice any bugs or have any feature requests please open them via the [issues page](https://github.com/OpenHands/OpenHands/issues). We will triage based on how critical the bug is or how potentially useful the improvement is, discuss, and implement the ones that the community has interest/effort for.
|
||||||
|
|
||||||
Further, if you see an issue you like, please leave a "thumbs-up" or a comment, which will help us prioritize.
|
Further, if you see an issue you like, please leave a "thumbs-up" or a comment, which will help us prioritize.
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
We would like to thank all the [contributors](https://github.com/All-Hands-AI/OpenHands/graphs/contributors) who have helped make OpenHands possible. We greatly appreciate your dedication and hard work.
|
We would like to thank all the [contributors](https://github.com/OpenHands/OpenHands/graphs/contributors) who have helped make OpenHands possible. We greatly appreciate your dedication and hard work.
|
||||||
|
|
||||||
## Open Source Projects
|
## Open Source Projects
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ OpenHands includes and adapts the following open source projects. We are gratefu
|
|||||||
|
|
||||||
#### [Aider](https://github.com/paul-gauthier/aider)
|
#### [Aider](https://github.com/paul-gauthier/aider)
|
||||||
- License: Apache License 2.0
|
- License: Apache License 2.0
|
||||||
- Description: AI pair programming tool. OpenHands has adapted and integrated its linter module for code-related tasks in [`agentskills utilities`](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/agent_skills/utils/aider)
|
- Description: AI pair programming tool. OpenHands has adapted and integrated its linter module for code-related tasks in [`agentskills utilities`](https://github.com/OpenHands/OpenHands/tree/main/openhands/runtime/plugins/agent_skills/utils/aider)
|
||||||
|
|
||||||
#### [BrowserGym](https://github.com/ServiceNow/BrowserGym)
|
#### [BrowserGym](https://github.com/ServiceNow/BrowserGym)
|
||||||
- License: Apache License 2.0
|
- License: Apache License 2.0
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This guide is for people working on OpenHands and editing the source code.
|
This guide is for people working on OpenHands and editing the source code.
|
||||||
If you wish to contribute your changes, check out the
|
If you wish to contribute your changes, check out the
|
||||||
[CONTRIBUTING.md](https://github.com/All-Hands-AI/OpenHands/blob/main/CONTRIBUTING.md)
|
[CONTRIBUTING.md](https://github.com/OpenHands/OpenHands/blob/main/CONTRIBUTING.md)
|
||||||
on how to clone and setup the project initially before moving on. Otherwise,
|
on how to clone and setup the project initially before moving on. Otherwise,
|
||||||
you can clone the OpenHands project directly.
|
you can clone the OpenHands project directly.
|
||||||
|
|
||||||
|
|||||||
42
README.md
42
README.md
@ -7,26 +7,26 @@
|
|||||||
|
|
||||||
|
|
||||||
<div align="center">
|
<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/OpenHands/OpenHands/graphs/contributors"><img src="https://img.shields.io/github/contributors/OpenHands/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://github.com/OpenHands/OpenHands/stargazers"><img src="https://img.shields.io/github/stars/OpenHands/OpenHands?style=for-the-badge&color=blue" alt="Stargazers"></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>
|
<a href="https://github.com/OpenHands/OpenHands/blob/main/LICENSE"><img src="https://img.shields.io/github/license/OpenHands/OpenHands?style=for-the-badge&color=blue" alt="MIT License"></a>
|
||||||
<br/>
|
<br/>
|
||||||
<a href="https://all-hands.dev/joinslack"><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://all-hands.dev/joinslack"><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://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>
|
<a href="https://github.com/OpenHands/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/>
|
<br/>
|
||||||
<a href="https://docs.all-hands.dev/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://docs.all-hands.dev/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://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://docs.google.com/spreadsheets/d/1wOUdFCMyY6Nt0AIqF705KN4JKOWgeI4wUGUP60krXXs/edit?gid=0#gid=0"><img src="https://img.shields.io/badge/Benchmark%20score-000?logoColor=FFE165&logo=huggingface&style=for-the-badge" alt="Evaluation Benchmark Score"></a>
|
<a href="https://docs.google.com/spreadsheets/d/1wOUdFCMyY6Nt0AIqF705KN4JKOWgeI4wUGUP60krXXs/edit?gid=0#gid=0"><img src="https://img.shields.io/badge/Benchmark%20score-000?logoColor=FFE165&logo=huggingface&style=for-the-badge" alt="Evaluation Benchmark Score"></a>
|
||||||
|
|
||||||
<!-- Keep these links. Translations will automatically update with the README. -->
|
<!-- Keep these links. Translations will automatically update with the README. -->
|
||||||
<a href="https://www.readme-i18n.com/All-Hands-AI/OpenHands?lang=de">Deutsch</a> |
|
<a href="https://www.readme-i18n.com/OpenHands/OpenHands?lang=de">Deutsch</a> |
|
||||||
<a href="https://www.readme-i18n.com/All-Hands-AI/OpenHands?lang=es">Español</a> |
|
<a href="https://www.readme-i18n.com/OpenHands/OpenHands?lang=es">Español</a> |
|
||||||
<a href="https://www.readme-i18n.com/All-Hands-AI/OpenHands?lang=fr">français</a> |
|
<a href="https://www.readme-i18n.com/OpenHands/OpenHands?lang=fr">français</a> |
|
||||||
<a href="https://www.readme-i18n.com/All-Hands-AI/OpenHands?lang=ja">日本語</a> |
|
<a href="https://www.readme-i18n.com/OpenHands/OpenHands?lang=ja">日本語</a> |
|
||||||
<a href="https://www.readme-i18n.com/All-Hands-AI/OpenHands?lang=ko">한국어</a> |
|
<a href="https://www.readme-i18n.com/OpenHands/OpenHands?lang=ko">한국어</a> |
|
||||||
<a href="https://www.readme-i18n.com/All-Hands-AI/OpenHands?lang=pt">Português</a> |
|
<a href="https://www.readme-i18n.com/OpenHands/OpenHands?lang=pt">Português</a> |
|
||||||
<a href="https://www.readme-i18n.com/All-Hands-AI/OpenHands?lang=ru">Русский</a> |
|
<a href="https://www.readme-i18n.com/OpenHands/OpenHands?lang=ru">Русский</a> |
|
||||||
<a href="https://www.readme-i18n.com/All-Hands-AI/OpenHands?lang=zh">中文</a>
|
<a href="https://www.readme-i18n.com/OpenHands/OpenHands?lang=zh">中文</a>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
@ -82,17 +82,17 @@ You'll find OpenHands running at [http://localhost:3000](http://localhost:3000)
|
|||||||
You can also run OpenHands directly with Docker:
|
You can also run OpenHands directly with Docker:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.59-nikolaik
|
docker pull docker.all-hands.dev/openhands/runtime:0.59-nikolaik
|
||||||
|
|
||||||
docker run -it --rm --pull=always \
|
docker run -it --rm --pull=always \
|
||||||
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.59-nikolaik \
|
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/openhands/runtime:0.59-nikolaik \
|
||||||
-e LOG_ALL_EVENTS=true \
|
-e LOG_ALL_EVENTS=true \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-v ~/.openhands:/.openhands \
|
-v ~/.openhands:/.openhands \
|
||||||
-p 3000:3000 \
|
-p 3000:3000 \
|
||||||
--add-host host.docker.internal:host-gateway \
|
--add-host host.docker.internal:host-gateway \
|
||||||
--name openhands-app \
|
--name openhands-app \
|
||||||
docker.all-hands.dev/all-hands-ai/openhands:0.59
|
docker.all-hands.dev/openhands/openhands:0.59
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
@ -119,7 +119,7 @@ system requirements and more information.
|
|||||||
> It is not appropriate for multi-tenant deployments where multiple users share the same instance. There is no built-in authentication, isolation, or scalability.
|
> It is not appropriate for multi-tenant deployments where multiple users share the same instance. There is no built-in authentication, isolation, or scalability.
|
||||||
>
|
>
|
||||||
> If you're interested in running OpenHands in a multi-tenant environment, check out the source-available, commercially-licensed
|
> If you're interested in running OpenHands in a multi-tenant environment, check out the source-available, commercially-licensed
|
||||||
> [OpenHands Cloud Helm Chart](https://github.com/all-Hands-AI/OpenHands-cloud)
|
> [OpenHands Cloud Helm Chart](https://github.com/openHands/OpenHands-cloud)
|
||||||
|
|
||||||
You can [connect OpenHands to your local filesystem](https://docs.all-hands.dev/usage/runtimes/docker#connecting-to-your-filesystem),
|
You can [connect OpenHands to your local filesystem](https://docs.all-hands.dev/usage/runtimes/docker#connecting-to-your-filesystem),
|
||||||
interact with it via a [friendly CLI](https://docs.all-hands.dev/usage/how-to/cli-mode),
|
interact with it via a [friendly CLI](https://docs.all-hands.dev/usage/how-to/cli-mode),
|
||||||
@ -128,7 +128,7 @@ or run it on tagged issues with [a github action](https://docs.all-hands.dev/usa
|
|||||||
|
|
||||||
Visit [Running OpenHands](https://docs.all-hands.dev/usage/installation) for more information and setup instructions.
|
Visit [Running OpenHands](https://docs.all-hands.dev/usage/installation) for more information and setup instructions.
|
||||||
|
|
||||||
If you want to modify the OpenHands source code, check out [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
|
If you want to modify the OpenHands source code, check out [Development.md](https://github.com/OpenHands/OpenHands/blob/main/Development.md).
|
||||||
|
|
||||||
Having issues? The [Troubleshooting Guide](https://docs.all-hands.dev/usage/troubleshooting) can help.
|
Having issues? The [Troubleshooting Guide](https://docs.all-hands.dev/usage/troubleshooting) can help.
|
||||||
|
|
||||||
@ -146,17 +146,17 @@ OpenHands is a community-driven project, and we welcome contributions from every
|
|||||||
through Slack, so this is the best place to start, but we also are happy to have you contact us on Github:
|
through Slack, so this is the best place to start, but we also are happy to have you contact us on Github:
|
||||||
|
|
||||||
- [Join our Slack workspace](https://all-hands.dev/joinslack) - Here we talk about research, architecture, and future development.
|
- [Join our Slack workspace](https://all-hands.dev/joinslack) - Here we talk about research, architecture, and future development.
|
||||||
- [Read or post Github Issues](https://github.com/All-Hands-AI/OpenHands/issues) - Check out the issues we're working on, or add your own ideas.
|
- [Read or post Github Issues](https://github.com/OpenHands/OpenHands/issues) - Check out the issues we're working on, or add your own ideas.
|
||||||
|
|
||||||
See more about the community in [COMMUNITY.md](./COMMUNITY.md) or find details on contributing in [CONTRIBUTING.md](./CONTRIBUTING.md).
|
See more about the community in [COMMUNITY.md](./COMMUNITY.md) or find details on contributing in [CONTRIBUTING.md](./CONTRIBUTING.md).
|
||||||
|
|
||||||
## 📈 Progress
|
## 📈 Progress
|
||||||
|
|
||||||
See the monthly OpenHands roadmap [here](https://github.com/orgs/All-Hands-AI/projects/1) (updated at the maintainer's meeting at the end of each month).
|
See the monthly OpenHands roadmap [here](https://github.com/orgs/OpenHands/projects/1) (updated at the maintainer's meeting at the end of each month).
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://star-history.com/#All-Hands-AI/OpenHands&Date">
|
<a href="https://star-history.com/#OpenHands/OpenHands&Date">
|
||||||
<img src="https://api.star-history.com/svg?repos=All-Hands-AI/OpenHands&type=Date" width="500" alt="Star History Chart">
|
<img src="https://api.star-history.com/svg?repos=OpenHands/OpenHands&type=Date" width="500" alt="Star History Chart">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@ -189,7 +189,7 @@ model = "gpt-4o"
|
|||||||
# Whether to use native tool calling if supported by the model. Can be true, false, or None by default, which chooses the model's default behavior based on the evaluation.
|
# Whether to use native tool calling if supported by the model. Can be true, false, or None by default, which chooses the model's default behavior based on the evaluation.
|
||||||
# ATTENTION: Based on evaluation, enabling native function calling may lead to worse results
|
# ATTENTION: Based on evaluation, enabling native function calling may lead to worse results
|
||||||
# in some scenarios. Use with caution and consider testing with your specific use case.
|
# in some scenarios. Use with caution and consider testing with your specific use case.
|
||||||
# https://github.com/All-Hands-AI/OpenHands/pull/4711
|
# https://github.com/OpenHands/OpenHands/pull/4711
|
||||||
#native_tool_calling = None
|
#native_tool_calling = None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ services:
|
|||||||
image: openhands:latest
|
image: openhands:latest
|
||||||
container_name: openhands-app-${DATE:-}
|
container_name: openhands-app-${DATE:-}
|
||||||
environment:
|
environment:
|
||||||
- SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-docker.all-hands.dev/all-hands-ai/runtime:0.59-nikolaik}
|
- SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-docker.all-hands.dev/openhands/runtime:0.59-nikolaik}
|
||||||
#- SANDBOX_USER_ID=${SANDBOX_USER_ID:-1234} # enable this only if you want a specific non-root sandbox user but you will have to manually adjust permissions of ~/.openhands for this user
|
#- SANDBOX_USER_ID=${SANDBOX_USER_ID:-1234} # enable this only if you want a specific non-root sandbox user but you will have to manually adjust permissions of ~/.openhands for this user
|
||||||
- WORKSPACE_MOUNT_PATH=${WORKSPACE_BASE:-$PWD/workspace}
|
- WORKSPACE_MOUNT_PATH=${WORKSPACE_BASE:-$PWD/workspace}
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
This directory contains the enterprise server used by [OpenHands Cloud](https://github.com/All-Hands-AI/OpenHands-Cloud/). The official, public version of OpenHands Cloud is available at
|
This directory contains the enterprise server used by [OpenHands Cloud](https://github.com/All-Hands-AI/OpenHands-Cloud/). The official, public version of OpenHands Cloud is available at
|
||||||
[app.all-hands.dev](https://app.all-hands.dev).
|
[app.all-hands.dev](https://app.all-hands.dev).
|
||||||
|
|
||||||
You may also want to check out the MIT-licensed [OpenHands](https://github.com/All-Hands-AI/OpenHands)
|
You may also want to check out the MIT-licensed [OpenHands](https://github.com/OpenHands/OpenHands)
|
||||||
|
|
||||||
## Extension of OpenHands (OSS)
|
## Extension of OpenHands (OSS)
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ The code in `/enterprise` directory builds on top of open source (OSS) code, ext
|
|||||||
|
|
||||||
- Enterprise stacks on top of OSS. For example, the middleware in enterprise is stacked right on top of the middlewares in OSS. In `SAAS`, the middleware from BOTH repos will be present and running (which can sometimes cause conflicts)
|
- Enterprise stacks on top of OSS. For example, the middleware in enterprise is stacked right on top of the middlewares in OSS. In `SAAS`, the middleware from BOTH repos will be present and running (which can sometimes cause conflicts)
|
||||||
|
|
||||||
- Enterprise overrides the implementation in OSS (only one is present at a time). For example, the server config SaasServerConfig which overrides [`ServerConfig`](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/server/config/server_config.py#L8) on OSS. This is done through dynamic imports ([see here](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/server/config/server_config.py#L37-#L45))
|
- Enterprise overrides the implementation in OSS (only one is present at a time). For example, the server config SaasServerConfig which overrides [`ServerConfig`](https://github.com/OpenHands/OpenHands/blob/main/openhands/server/config/server_config.py#L8) on OSS. This is done through dynamic imports ([see here](https://github.com/OpenHands/OpenHands/blob/main/openhands/server/config/server_config.py#L37-#L45))
|
||||||
|
|
||||||
Key areas that change on `SAAS` are
|
Key areas that change on `SAAS` are
|
||||||
|
|
||||||
|
|||||||
@ -87,7 +87,7 @@ class SlackManager(Manager):
|
|||||||
return slack_user, saas_user_auth
|
return slack_user, saas_user_auth
|
||||||
|
|
||||||
def _infer_repo_from_message(self, user_msg: str) -> str | None:
|
def _infer_repo_from_message(self, user_msg: str) -> str | None:
|
||||||
# Regular expression to match patterns like "All-Hands-AI/OpenHands" or "deploy repo"
|
# Regular expression to match patterns like "OpenHands/OpenHands" or "deploy repo"
|
||||||
pattern = r'([a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+)|([a-zA-Z0-9_-]+)(?=\s+repo)'
|
pattern = r'([a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+)|([a-zA-Z0-9_-]+)(?=\s+repo)'
|
||||||
match = re.search(pattern, user_msg)
|
match = re.search(pattern, user_msg)
|
||||||
|
|
||||||
|
|||||||
@ -381,7 +381,7 @@ def infer_repo_from_message(user_msg: str) -> list[str]:
|
|||||||
# Captures: protocol, domain, owner, repo (with optional .git extension)
|
# Captures: protocol, domain, owner, repo (with optional .git extension)
|
||||||
git_url_pattern = r'https?://(?:github\.com|gitlab\.com|bitbucket\.org)/([a-zA-Z0-9_.-]+)/([a-zA-Z0-9_.-]+?)(?:\.git)?(?:[/?#].*?)?(?=\s|$|[^\w.-])'
|
git_url_pattern = r'https?://(?:github\.com|gitlab\.com|bitbucket\.org)/([a-zA-Z0-9_.-]+)/([a-zA-Z0-9_.-]+?)(?:\.git)?(?:[/?#].*?)?(?=\s|$|[^\w.-])'
|
||||||
|
|
||||||
# Pattern to match direct owner/repo mentions (e.g., "All-Hands-AI/OpenHands")
|
# Pattern to match direct owner/repo mentions (e.g., "OpenHands/OpenHands")
|
||||||
# Must be surrounded by word boundaries or specific characters to avoid false positives
|
# Must be surrounded by word boundaries or specific characters to avoid false positives
|
||||||
direct_pattern = (
|
direct_pattern = (
|
||||||
r'(?:^|\s|[\[\(\'"])([a-zA-Z0-9_.-]+)/([a-zA-Z0-9_.-]+)(?=\s|$|[\]\)\'",.])'
|
r'(?:^|\s|[\[\(\'"])([a-zA-Z0-9_.-]+)/([a-zA-Z0-9_.-]+)(?=\s|$|[\]\)\'",.])'
|
||||||
|
|||||||
@ -11,7 +11,7 @@ description = "Deploy OpenHands"
|
|||||||
authors = [ "OpenHands" ]
|
authors = [ "OpenHands" ]
|
||||||
license = "POLYFORM"
|
license = "POLYFORM"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/All-Hands-AI/OpenHands"
|
repository = "https://github.com/OpenHands/OpenHands"
|
||||||
packages = [
|
packages = [
|
||||||
{ include = "server" },
|
{ include = "server" },
|
||||||
{ include = "storage" },
|
{ include = "storage" },
|
||||||
|
|||||||
@ -14,7 +14,7 @@ def slack_manager():
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'message,expected',
|
'message,expected',
|
||||||
[
|
[
|
||||||
('All-Hands-AI/Openhands', 'All-Hands-AI/Openhands'),
|
('OpenHands/Openhands', 'OpenHands/Openhands'),
|
||||||
('deploy repo', 'deploy'),
|
('deploy repo', 'deploy'),
|
||||||
('use hello world', None),
|
('use hello world', None),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -74,8 +74,8 @@ def test_infer_repo_from_message():
|
|||||||
# Single GitHub URLs
|
# Single GitHub URLs
|
||||||
('Clone https://github.com/demo123/demo1.git', ['demo123/demo1']),
|
('Clone https://github.com/demo123/demo1.git', ['demo123/demo1']),
|
||||||
(
|
(
|
||||||
'Check out https://github.com/All-Hands-AI/OpenHands.git for details',
|
'Check out https://github.com/OpenHands/OpenHands.git for details',
|
||||||
['All-Hands-AI/OpenHands'],
|
['OpenHands/OpenHands'],
|
||||||
),
|
),
|
||||||
('Visit https://github.com/microsoft/vscode', ['microsoft/vscode']),
|
('Visit https://github.com/microsoft/vscode', ['microsoft/vscode']),
|
||||||
# Single GitLab URLs
|
# Single GitLab URLs
|
||||||
@ -92,7 +92,7 @@ def test_infer_repo_from_message():
|
|||||||
['atlassian/atlassian-connect-express'],
|
['atlassian/atlassian-connect-express'],
|
||||||
),
|
),
|
||||||
# Single direct owner/repo mentions
|
# Single direct owner/repo mentions
|
||||||
('Please deploy the All-Hands-AI/OpenHands repo', ['All-Hands-AI/OpenHands']),
|
('Please deploy the OpenHands/OpenHands repo', ['OpenHands/OpenHands']),
|
||||||
('I need help with the microsoft/vscode repository', ['microsoft/vscode']),
|
('I need help with the microsoft/vscode repository', ['microsoft/vscode']),
|
||||||
('Check facebook/react for examples', ['facebook/react']),
|
('Check facebook/react for examples', ['facebook/react']),
|
||||||
('The torvalds/linux kernel', ['torvalds/linux']),
|
('The torvalds/linux kernel', ['torvalds/linux']),
|
||||||
|
|||||||
@ -6,14 +6,14 @@ This folder contains code and resources to run experiments and evaluations.
|
|||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
Before starting evaluation, follow the instructions [here](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) to setup your local development environment and LLM.
|
Before starting evaluation, follow the instructions [here](https://github.com/OpenHands/OpenHands/blob/main/Development.md) to setup your local development environment and LLM.
|
||||||
|
|
||||||
Once you are done with setup, you can follow the benchmark-specific instructions in each subdirectory of the [evaluation directory](#supported-benchmarks).
|
Once you are done with setup, you can follow the benchmark-specific instructions in each subdirectory of the [evaluation directory](#supported-benchmarks).
|
||||||
Generally these will involve running `run_infer.py` to perform inference with the agents.
|
Generally these will involve running `run_infer.py` to perform inference with the agents.
|
||||||
|
|
||||||
### Implementing and Evaluating an Agent
|
### Implementing and Evaluating an Agent
|
||||||
|
|
||||||
To add an agent to OpenHands, you will need to implement it in the [agenthub directory](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/agenthub). There is a README there with more information.
|
To add an agent to OpenHands, you will need to implement it in the [agenthub directory](https://github.com/OpenHands/OpenHands/tree/main/openhands/agenthub). There is a README there with more information.
|
||||||
|
|
||||||
To evaluate an agent, you can provide the agent's name to the `run_infer.py` program.
|
To evaluate an agent, you can provide the agent's name to the `run_infer.py` program.
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ def get_config(
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
|
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
|
|||||||
@ -124,7 +124,7 @@ if __name__ == '__main__':
|
|||||||
)
|
)
|
||||||
args, _ = parser.parse_known_args()
|
args, _ = parser.parse_known_args()
|
||||||
|
|
||||||
# Check https://github.com/All-Hands-AI/OpenHands/blob/main/evaluation/swe_bench/README.md#configure-openhands-and-your-llm
|
# Check https://github.com/OpenHands/OpenHands/blob/main/evaluation/swe_bench/README.md#configure-openhands-and-your-llm
|
||||||
# for details of how to set `llm_config`
|
# for details of how to set `llm_config`
|
||||||
if args.llm_config:
|
if args.llm_config:
|
||||||
specified_llm_config = get_llm_config_arg(args.llm_config)
|
specified_llm_config = get_llm_config_arg(args.llm_config)
|
||||||
|
|||||||
@ -36,8 +36,8 @@ We use it to train strong LM agents that achieve state-of-the-art open results o
|
|||||||
The process of running SWE-Gym is very similar to how you'd run SWE-Bench evaluation.
|
The process of running SWE-Gym is very similar to how you'd run SWE-Bench evaluation.
|
||||||
|
|
||||||
|
|
||||||
1. First, clone OpenHands repo `git clone https://github.com/All-Hands-AI/OpenHands.git`
|
1. First, clone OpenHands repo `git clone https://github.com/OpenHands/OpenHands.git`
|
||||||
2. Then setup the repo following [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md)
|
2. Then setup the repo following [Development.md](https://github.com/OpenHands/OpenHands/blob/main/Development.md)
|
||||||
3. Then you can simply serve your own model as an OpenAI compatible endpoint, put those info in config.toml. You can do this by following instruction [here](../../README.md#setup).
|
3. Then you can simply serve your own model as an OpenAI compatible endpoint, put those info in config.toml. You can do this by following instruction [here](../../README.md#setup).
|
||||||
4. And then simply do the following to sample for 16x parallelism:
|
4. And then simply do the following to sample for 16x parallelism:
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ def get_config(metadata: EvalMetadata, instance: pd.Series) -> OpenHandsConfig:
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
sandbox_config.base_container_image = base_container_image
|
sandbox_config.base_container_image = base_container_image
|
||||||
|
|||||||
@ -316,7 +316,7 @@ def get_config(
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
|
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
|
|||||||
@ -6,7 +6,7 @@ mkdir -p $EVAL_WORKSPACE
|
|||||||
|
|
||||||
# 1. Prepare REPO
|
# 1. Prepare REPO
|
||||||
echo "==== Prepare SWE-bench repo ===="
|
echo "==== Prepare SWE-bench repo ===="
|
||||||
OH_SWE_BENCH_REPO_PATH="https://github.com/All-Hands-AI/SWE-bench.git"
|
OH_SWE_BENCH_REPO_PATH="https://github.com/OpenHands/SWE-bench.git"
|
||||||
OH_SWE_BENCH_REPO_BRANCH="eval"
|
OH_SWE_BENCH_REPO_BRANCH="eval"
|
||||||
git clone -b $OH_SWE_BENCH_REPO_BRANCH $OH_SWE_BENCH_REPO_PATH $EVAL_WORKSPACE/OH-SWE-bench
|
git clone -b $OH_SWE_BENCH_REPO_BRANCH $OH_SWE_BENCH_REPO_PATH $EVAL_WORKSPACE/OH-SWE-bench
|
||||||
|
|
||||||
|
|||||||
@ -161,7 +161,7 @@ def get_config(
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
|
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
|
|||||||
@ -10,7 +10,7 @@ def verify_instance_costs(row: pd.Series) -> float:
|
|||||||
Verifies that the accumulated_cost matches the sum of individual costs in metrics.
|
Verifies that the accumulated_cost matches the sum of individual costs in metrics.
|
||||||
Also checks for duplicate consecutive costs which might indicate buggy counting.
|
Also checks for duplicate consecutive costs which might indicate buggy counting.
|
||||||
If the consecutive costs are identical, the file is affected by this bug:
|
If the consecutive costs are identical, the file is affected by this bug:
|
||||||
https://github.com/All-Hands-AI/OpenHands/issues/5383
|
https://github.com/OpenHands/OpenHands/issues/5383
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
row: DataFrame row containing instance data with metrics
|
row: DataFrame row containing instance data with metrics
|
||||||
|
|||||||
@ -34,8 +34,8 @@ We use it to train strong LM agents that achieve state-of-the-art open results o
|
|||||||
The process of running SWE-Gym is very similar to how you'd run SWE-Bench evaluation.
|
The process of running SWE-Gym is very similar to how you'd run SWE-Bench evaluation.
|
||||||
|
|
||||||
|
|
||||||
1. First, clone OpenHands repo `git clone https://github.com/All-Hands-AI/OpenHands.git`
|
1. First, clone OpenHands repo `git clone https://github.com/OpenHands/OpenHands.git`
|
||||||
2. Then setup the repo following [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md)
|
2. Then setup the repo following [Development.md](https://github.com/OpenHands/OpenHands/blob/main/Development.md)
|
||||||
3. Then you can simply serve your own model as an OpenAI compatible endpoint, put those info in config.toml. You can do this by following instruction [here](../../README.md#setup).
|
3. Then you can simply serve your own model as an OpenAI compatible endpoint, put those info in config.toml. You can do this by following instruction [here](../../README.md#setup).
|
||||||
4. And then simply do the following to sample for 16x parallelism:
|
4. And then simply do the following to sample for 16x parallelism:
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ def get_config(metadata: EvalMetadata, instance: pd.Series) -> OpenHandsConfig:
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
sandbox_config.base_container_image = base_container_image
|
sandbox_config.base_container_image = base_container_image
|
||||||
|
|||||||
@ -217,7 +217,7 @@ def get_config(
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
|
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
|
|||||||
@ -180,7 +180,7 @@ def get_config(
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
|
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
|
|||||||
@ -9,7 +9,7 @@ def verify_instance_costs(row: pd.Series) -> float:
|
|||||||
"""Verifies that the accumulated_cost matches the sum of individual costs in metrics.
|
"""Verifies that the accumulated_cost matches the sum of individual costs in metrics.
|
||||||
Also checks for duplicate consecutive costs which might indicate buggy counting.
|
Also checks for duplicate consecutive costs which might indicate buggy counting.
|
||||||
If the consecutive costs are identical, the file is affected by this bug:
|
If the consecutive costs are identical, the file is affected by this bug:
|
||||||
https://github.com/All-Hands-AI/OpenHands/issues/5383
|
https://github.com/OpenHands/OpenHands/issues/5383
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
row: DataFrame row containing instance data with metrics
|
row: DataFrame row containing instance data with metrics
|
||||||
|
|||||||
@ -6,7 +6,7 @@ mkdir -p $EVAL_WORKSPACE
|
|||||||
|
|
||||||
# 1. Prepare REPO
|
# 1. Prepare REPO
|
||||||
echo "==== Prepare SWE-bench repo ===="
|
echo "==== Prepare SWE-bench repo ===="
|
||||||
OH_SWE_BENCH_REPO_PATH="https://github.com/All-Hands-AI/SWE-bench.git"
|
OH_SWE_BENCH_REPO_PATH="https://github.com/OpenHands/SWE-bench.git"
|
||||||
OH_SWE_BENCH_REPO_BRANCH="eval"
|
OH_SWE_BENCH_REPO_BRANCH="eval"
|
||||||
git clone -b $OH_SWE_BENCH_REPO_BRANCH $OH_SWE_BENCH_REPO_PATH $EVAL_WORKSPACE/OH-SWE-bench
|
git clone -b $OH_SWE_BENCH_REPO_BRANCH $OH_SWE_BENCH_REPO_PATH $EVAL_WORKSPACE/OH-SWE-bench
|
||||||
|
|
||||||
|
|||||||
@ -255,7 +255,7 @@ def get_config(
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
|
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
|
|||||||
@ -74,7 +74,7 @@ To contribute your evaluation results:
|
|||||||
## Additional Resources
|
## Additional Resources
|
||||||
|
|
||||||
- [TestGenEval Paper](https://arxiv.org/abs/2410.00752)
|
- [TestGenEval Paper](https://arxiv.org/abs/2410.00752)
|
||||||
- [OpenHands Documentation](https://github.com/All-Hands-AI/OpenHands)
|
- [OpenHands Documentation](https://github.com/OpenHands/OpenHands)
|
||||||
- [HuggingFace Datasets](https://huggingface.co/datasets)
|
- [HuggingFace Datasets](https://huggingface.co/datasets)
|
||||||
|
|
||||||
For any questions or issues, please open an issue in the [OpenHands repository](https://github.com/All-Hands-AI/OpenHands/issues).
|
For any questions or issues, please open an issue in the [OpenHands repository](https://github.com/OpenHands/OpenHands/issues).
|
||||||
|
|||||||
@ -124,7 +124,7 @@ def get_config(
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
|
|
||||||
sandbox_config = SandboxConfig(
|
sandbox_config = SandboxConfig(
|
||||||
|
|||||||
@ -6,7 +6,7 @@ mkdir -p $EVAL_WORKSPACE
|
|||||||
|
|
||||||
# 1. Prepare REPO
|
# 1. Prepare REPO
|
||||||
echo "==== Prepare SWE-bench repo ===="
|
echo "==== Prepare SWE-bench repo ===="
|
||||||
OH_SWE_BENCH_REPO_PATH="https://github.com/All-Hands-AI/SWE-bench.git"
|
OH_SWE_BENCH_REPO_PATH="https://github.com/OpenHands/SWE-bench.git"
|
||||||
OH_SWE_BENCH_REPO_BRANCH="eval"
|
OH_SWE_BENCH_REPO_BRANCH="eval"
|
||||||
git clone -b $OH_SWE_BENCH_REPO_BRANCH $OH_SWE_BENCH_REPO_PATH $EVAL_WORKSPACE/OH-SWE-bench
|
git clone -b $OH_SWE_BENCH_REPO_BRANCH $OH_SWE_BENCH_REPO_PATH $EVAL_WORKSPACE/OH-SWE-bench
|
||||||
|
|
||||||
|
|||||||
@ -147,7 +147,7 @@ def get_config(
|
|||||||
logger.info(
|
logger.info(
|
||||||
f'Using instance container image: {base_container_image}. '
|
f'Using instance container image: {base_container_image}. '
|
||||||
f'Please make sure this image exists. '
|
f'Please make sure this image exists. '
|
||||||
f'Submit an issue on https://github.com/All-Hands-AI/OpenHands if you run into any issues.'
|
f'Submit an issue on https://github.com/OpenHands/OpenHands if you run into any issues.'
|
||||||
)
|
)
|
||||||
|
|
||||||
sandbox_config = get_default_sandbox_config_for_eval()
|
sandbox_config = get_default_sandbox_config_for_eval()
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
# Integration tests
|
# Integration tests
|
||||||
|
|
||||||
This directory implements integration tests that [was running in CI](https://github.com/All-Hands-AI/OpenHands/tree/23d3becf1d6f5d07e592f7345750c314a826b4e9/tests/integration).
|
This directory implements integration tests that [was running in CI](https://github.com/OpenHands/OpenHands/tree/23d3becf1d6f5d07e592f7345750c314a826b4e9/tests/integration).
|
||||||
|
|
||||||
[PR 3985](https://github.com/All-Hands-AI/OpenHands/pull/3985) introduce LLM-based editing, which requires access to LLM to perform edit. Hence, we remove integration tests from CI and intend to run them as nightly evaluation to ensure the quality of OpenHands softwares.
|
[PR 3985](https://github.com/OpenHands/OpenHands/pull/3985) introduce LLM-based editing, which requires access to LLM to perform edit. Hence, we remove integration tests from CI and intend to run them as nightly evaluation to ensure the quality of OpenHands softwares.
|
||||||
|
|
||||||
## To add new tests
|
## To add new tests
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ from openhands.runtime.base import Runtime
|
|||||||
|
|
||||||
|
|
||||||
class Test(BaseIntegrationTest):
|
class Test(BaseIntegrationTest):
|
||||||
INSTRUCTION = 'Look at https://github.com/All-Hands-AI/OpenHands/pull/8, and tell me what is happening there and what did @asadm suggest.'
|
INSTRUCTION = 'Look at https://github.com/OpenHands/OpenHands/pull/8, and tell me what is happening there and what did @asadm suggest.'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def initialize_runtime(cls, runtime: Runtime) -> None:
|
def initialize_runtime(cls, runtime: Runtime) -> None:
|
||||||
|
|||||||
@ -27,7 +27,7 @@ This is the frontend of the OpenHands project. It is a React application that pr
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
git clone https://github.com/All-Hands-AI/OpenHands.git
|
git clone https://github.com/OpenHands/OpenHands.git
|
||||||
|
|
||||||
# Change the directory to the frontend
|
# Change the directory to the frontend
|
||||||
cd OpenHands/frontend
|
cd OpenHands/frontend
|
||||||
@ -163,7 +163,7 @@ npm run test:coverage
|
|||||||
|
|
||||||
1. **Component Testing**
|
1. **Component Testing**
|
||||||
- Test components in isolation
|
- Test components in isolation
|
||||||
- Use our custom [`renderWithProviders()`](https://github.com/All-Hands-AI/OpenHands/blob/ce26f1c6d3feec3eedf36f823dee732b5a61e517/frontend/test-utils.tsx#L56-L85) that wraps the components we want to test in our providers. It is especially useful for components that use Redux
|
- Use our custom [`renderWithProviders()`](https://github.com/OpenHands/OpenHands/blob/ce26f1c6d3feec3eedf36f823dee732b5a61e517/frontend/test-utils.tsx#L56-L85) that wraps the components we want to test in our providers. It is especially useful for components that use Redux
|
||||||
- Use `render()` from React Testing Library to render components
|
- Use `render()` from React Testing Library to render components
|
||||||
- Prefer querying elements by role, label, or test ID over CSS selectors
|
- Prefer querying elements by role, label, or test ID over CSS selectors
|
||||||
- Test both rendering and interaction scenarios
|
- Test both rendering and interaction scenarios
|
||||||
@ -223,12 +223,12 @@ describe("ComponentName", () => {
|
|||||||
For real-world examples of testing, check out these test files:
|
For real-world examples of testing, check out these test files:
|
||||||
|
|
||||||
1. **Chat Input Component Test**:
|
1. **Chat Input Component Test**:
|
||||||
[`__tests__/components/chat/chat-input.test.tsx`](https://github.com/All-Hands-AI/OpenHands/blob/main/frontend/__tests__/components/chat/chat-input.test.tsx)
|
[`__tests__/components/chat/chat-input.test.tsx`](https://github.com/OpenHands/OpenHands/blob/main/frontend/__tests__/components/chat/chat-input.test.tsx)
|
||||||
- Demonstrates comprehensive testing of a complex input component
|
- Demonstrates comprehensive testing of a complex input component
|
||||||
- Covers various scenarios like submission, disabled states, and user interactions
|
- Covers various scenarios like submission, disabled states, and user interactions
|
||||||
|
|
||||||
2. **File Explorer Component Test**:
|
2. **File Explorer Component Test**:
|
||||||
[`__tests__/components/file-explorer/file-explorer.test.tsx`](https://github.com/All-Hands-AI/OpenHands/blob/main/frontend/__tests__/components/file-explorer/file-explorer.test.tsx)
|
[`__tests__/components/file-explorer/file-explorer.test.tsx`](https://github.com/OpenHands/OpenHands/blob/main/frontend/__tests__/components/file-explorer/file-explorer.test.tsx)
|
||||||
- Shows testing of a more complex component with multiple interactions
|
- Shows testing of a more complex component with multiple interactions
|
||||||
- Illustrates testing of nested components and state management
|
- Illustrates testing of nested components and state management
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ const MOCK_RESPOSITORIES: GitRepository[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
full_name: "All-Hands-AI/OpenHands",
|
full_name: "OpenHands/OpenHands",
|
||||||
git_provider: "github",
|
git_provider: "github",
|
||||||
is_public: true,
|
is_public: true,
|
||||||
main_branch: "main",
|
main_branch: "main",
|
||||||
@ -114,7 +114,7 @@ describe("RepoConnector", () => {
|
|||||||
// Wait for the options to be loaded and displayed
|
// Wait for the options to be loaded and displayed
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(screen.getByText("rbren/polaris")).toBeInTheDocument();
|
expect(screen.getByText("rbren/polaris")).toBeInTheDocument();
|
||||||
expect(screen.getByText("All-Hands-AI/OpenHands")).toBeInTheDocument();
|
expect(screen.getByText("OpenHands/OpenHands")).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -118,7 +118,7 @@ describe("parse-pr-url", () => {
|
|||||||
it("should handle typical microagent finish messages", () => {
|
it("should handle typical microagent finish messages", () => {
|
||||||
const text = `
|
const text = `
|
||||||
I have successfully created a pull request with the requested changes.
|
I have successfully created a pull request with the requested changes.
|
||||||
You can view the PR here: https://github.com/All-Hands-AI/OpenHands/pull/1234
|
You can view the PR here: https://github.com/OpenHands/OpenHands/pull/1234
|
||||||
|
|
||||||
The changes include:
|
The changes include:
|
||||||
- Updated the component
|
- Updated the component
|
||||||
@ -126,7 +126,7 @@ describe("parse-pr-url", () => {
|
|||||||
- Fixed the issue
|
- Fixed the issue
|
||||||
`;
|
`;
|
||||||
const url = getFirstPRUrl(text);
|
const url = getFirstPRUrl(text);
|
||||||
expect(url).toBe("https://github.com/All-Hands-AI/OpenHands/pull/1234");
|
expect(url).toBe("https://github.com/OpenHands/OpenHands/pull/1234");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle messages with PR URLs in the middle", () => {
|
it("should handle messages with PR URLs in the middle", () => {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ interface BrowserStore extends BrowserState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const initialState: BrowserState = {
|
const initialState: BrowserState = {
|
||||||
url: "https://github.com/All-Hands-AI/OpenHands",
|
url: "https://github.com/OpenHands/OpenHands",
|
||||||
screenshotSrc: "",
|
screenshotSrc: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ Key characteristics:
|
|||||||
- **Reusable**: Knowledge can be applied across multiple projects
|
- **Reusable**: Knowledge can be applied across multiple projects
|
||||||
- **Versioned**: Support multiple versions of tools/frameworks
|
- **Versioned**: Support multiple versions of tools/frameworks
|
||||||
|
|
||||||
You can see an example of a knowledge-based agent in [OpenHands's github microagent](https://github.com/All-Hands-AI/OpenHands/tree/main/microagents/github.md).
|
You can see an example of a knowledge-based agent in [OpenHands's github microagent](https://github.com/OpenHands/OpenHands/tree/main/microagents/github.md).
|
||||||
|
|
||||||
### 2. Repository Agents
|
### 2. Repository Agents
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ Key features:
|
|||||||
- **Always active**: Automatically loaded for the repository
|
- **Always active**: Automatically loaded for the repository
|
||||||
- **Locally maintained**: Updated with the project
|
- **Locally maintained**: Updated with the project
|
||||||
|
|
||||||
You can see an example of a repo agent in [the agent for the OpenHands repo itself](https://github.com/All-Hands-AI/OpenHands/blob/main/.openhands/microagents/repo.md).
|
You can see an example of a repo agent in [the agent for the OpenHands repo itself](https://github.com/OpenHands/OpenHands/blob/main/.openhands/microagents/repo.md).
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|||||||
@ -37,4 +37,4 @@ When creating a new microagent:
|
|||||||
For detailed information, see:
|
For detailed information, see:
|
||||||
|
|
||||||
- [Microagents Overview](https://docs.all-hands.dev/usage/prompting/microagents-overview)
|
- [Microagents Overview](https://docs.all-hands.dev/usage/prompting/microagents-overview)
|
||||||
- [Example GitHub Microagent](https://github.com/All-Hands-AI/OpenHands/blob/main/microagents/github.md)
|
- [Example GitHub Microagent](https://github.com/OpenHands/OpenHands/blob/main/microagents/github.md)
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
# OpenHands V1 CLI
|
# OpenHands V1 CLI
|
||||||
|
|
||||||
A **lightweight, modern CLI** to interact with the OpenHands agent (powered by [agent-sdk](https://github.com/All-Hands-AI/agent-sdk)).
|
A **lightweight, modern CLI** to interact with the OpenHands agent (powered by [agent-sdk](https://github.com/OpenHands/agent-sdk)).
|
||||||
|
|
||||||
The [OpenHands V0 CLI (legacy)](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/cli) is being deprecated.
|
The [OpenHands V0 CLI (legacy)](https://github.com/OpenHands/OpenHands/tree/main/openhands/cli) is being deprecated.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@ -104,8 +104,8 @@ def launch_gui_server(mount_cwd: bool = False, gpu: bool = False) -> None:
|
|||||||
|
|
||||||
# Get the current version for the Docker image
|
# Get the current version for the Docker image
|
||||||
version = get_openhands_version()
|
version = get_openhands_version()
|
||||||
runtime_image = f'docker.all-hands.dev/all-hands-ai/runtime:{version}-nikolaik'
|
runtime_image = f'docker.all-hands.dev/openhands/runtime:{version}-nikolaik'
|
||||||
app_image = f'docker.all-hands.dev/all-hands-ai/openhands:{version}'
|
app_image = f'docker.all-hands.dev/openhands/openhands:{version}'
|
||||||
|
|
||||||
print_formatted_text(HTML('<grey>Pulling required Docker images...</grey>'))
|
print_formatted_text(HTML('<grey>Pulling required Docker images...</grey>'))
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ def get_cli_style() -> BaseStyle:
|
|||||||
'prompt': f'{COLOR_GOLD} bold',
|
'prompt': f'{COLOR_GOLD} bold',
|
||||||
# Ensure good contrast for fuzzy matches on the selected completion row
|
# Ensure good contrast for fuzzy matches on the selected completion row
|
||||||
# across terminals/themes (e.g., Ubuntu GNOME, Alacritty, Kitty).
|
# across terminals/themes (e.g., Ubuntu GNOME, Alacritty, Kitty).
|
||||||
# See https://github.com/All-Hands-AI/OpenHands/issues/10330
|
# See https://github.com/OpenHands/OpenHands/issues/10330
|
||||||
'completion-menu.completion.current fuzzymatch.outside': 'fg:#ffffff bg:#888888',
|
'completion-menu.completion.current fuzzymatch.outside': 'fg:#ffffff bg:#888888',
|
||||||
'selected': COLOR_GOLD,
|
'selected': COLOR_GOLD,
|
||||||
'risk-high': '#FF0000 bold', # Red bold for HIGH risk
|
'risk-high': '#FF0000 bold', # Red bold for HIGH risk
|
||||||
|
|||||||
@ -182,7 +182,7 @@ class TestLaunchGuiServer:
|
|||||||
# Check pull command
|
# Check pull command
|
||||||
pull_call = mock_run.call_args_list[0]
|
pull_call = mock_run.call_args_list[0]
|
||||||
pull_cmd = pull_call[0][0]
|
pull_cmd = pull_call[0][0]
|
||||||
assert pull_cmd[0:3] == ['docker', 'pull', 'docker.all-hands.dev/all-hands-ai/runtime:latest-nikolaik']
|
assert pull_cmd[0:3] == ['docker', 'pull', 'docker.all-hands.dev/openhands/runtime:latest-nikolaik']
|
||||||
|
|
||||||
# Check run command
|
# Check run command
|
||||||
run_call = mock_run.call_args_list[1]
|
run_call = mock_run.call_args_list[1]
|
||||||
|
|||||||
@ -44,12 +44,12 @@
|
|||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/All-Hands-AI/OpenHands.git",
|
"url": "https://github.com/OpenHands/OpenHands.git",
|
||||||
"directory": "openhands-ui"
|
"directory": "openhands-ui"
|
||||||
},
|
},
|
||||||
"homepage": "https://www.all-hands.dev/",
|
"homepage": "https://www.all-hands.dev/",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/All-Hands-AI/OpenHands/issues"
|
"url": "https://github.com/OpenHands/OpenHands/issues"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@chromatic-com/storybook": "^4.0.0",
|
"@chromatic-com/storybook": "^4.0.0",
|
||||||
|
|||||||
@ -13,7 +13,7 @@ The CodeAct agent operates through a function calling interface. At each turn, t
|
|||||||
- Interact with web browsers using `browser` and `fetch`
|
- Interact with web browsers using `browser` and `fetch`
|
||||||
- Edit files using `str_replace_editor` or `edit_file`
|
- Edit files using `str_replace_editor` or `edit_file`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Built-in Tools
|
## Built-in Tools
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class CodeActAgent(Agent):
|
|||||||
- Execute any valid Linux `bash` command
|
- Execute any valid Linux `bash` command
|
||||||
- Execute any valid `Python` code with [an interactive Python interpreter](https://ipython.org/). This is simulated through `bash` command, see plugin system below for more details.
|
- Execute any valid `Python` code with [an interactive Python interpreter](https://ipython.org/). This is simulated through `bash` command, see plugin system below for more details.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@ -94,8 +94,8 @@ def launch_gui_server(mount_cwd: bool = False, gpu: bool = False) -> None:
|
|||||||
|
|
||||||
# Get the current version for the Docker image
|
# Get the current version for the Docker image
|
||||||
version = __version__
|
version = __version__
|
||||||
runtime_image = f'docker.all-hands.dev/all-hands-ai/runtime:{version}-nikolaik'
|
runtime_image = f'docker.all-hands.dev/openhands/runtime:{version}-nikolaik'
|
||||||
app_image = f'docker.all-hands.dev/all-hands-ai/openhands:{version}'
|
app_image = f'docker.all-hands.dev/openhands/openhands:{version}'
|
||||||
|
|
||||||
print_formatted_text(HTML('<grey>Pulling required Docker images...</grey>'))
|
print_formatted_text(HTML('<grey>Pulling required Docker images...</grey>'))
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ def get_cli_style() -> Style:
|
|||||||
'prompt': f'{COLOR_GOLD} bold',
|
'prompt': f'{COLOR_GOLD} bold',
|
||||||
# Ensure good contrast for fuzzy matches on the selected completion row
|
# Ensure good contrast for fuzzy matches on the selected completion row
|
||||||
# across terminals/themes (e.g., Ubuntu GNOME, Alacritty, Kitty).
|
# across terminals/themes (e.g., Ubuntu GNOME, Alacritty, Kitty).
|
||||||
# See https://github.com/All-Hands-AI/OpenHands/issues/10330
|
# See https://github.com/OpenHands/OpenHands/issues/10330
|
||||||
'completion-menu.completion.current fuzzymatch.outside': 'fg:#ffffff bg:#888888',
|
'completion-menu.completion.current fuzzymatch.outside': 'fg:#ffffff bg:#888888',
|
||||||
'selected': COLOR_GOLD,
|
'selected': COLOR_GOLD,
|
||||||
'risk-high': '#FF0000 bold', # Red bold for HIGH risk
|
'risk-high': '#FF0000 bold', # Red bold for HIGH risk
|
||||||
|
|||||||
@ -16,7 +16,7 @@ def download_latest_vsix_from_github() -> str | None:
|
|||||||
Returns:
|
Returns:
|
||||||
Path to downloaded .vsix file, or None if failed
|
Path to downloaded .vsix file, or None if failed
|
||||||
"""
|
"""
|
||||||
api_url = 'https://api.github.com/repos/All-Hands-AI/OpenHands/releases'
|
api_url = 'https://api.github.com/repos/OpenHands/OpenHands/releases'
|
||||||
try:
|
try:
|
||||||
with urllib.request.urlopen(api_url, timeout=10) as response:
|
with urllib.request.urlopen(api_url, timeout=10) as response:
|
||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
|
|||||||
@ -974,7 +974,7 @@ class AgentController:
|
|||||||
if self.agent.config.cli_mode:
|
if self.agent.config.cli_mode:
|
||||||
# TODO(refactor): this is not ideal to have CLI been an exception
|
# TODO(refactor): this is not ideal to have CLI been an exception
|
||||||
# We should refactor agent controller to consider this in the future
|
# We should refactor agent controller to consider this in the future
|
||||||
# See issue: https://github.com/All-Hands-AI/OpenHands/issues/10464
|
# See issue: https://github.com/OpenHands/OpenHands/issues/10464
|
||||||
action.confirmation_state = ( # type: ignore[union-attr]
|
action.confirmation_state = ( # type: ignore[union-attr]
|
||||||
ActionConfirmationStatus.AWAITING_CONFIRMATION
|
ActionConfirmationStatus.AWAITING_CONFIRMATION
|
||||||
)
|
)
|
||||||
|
|||||||
@ -179,7 +179,7 @@ class LLMConfig(BaseModel):
|
|||||||
|
|
||||||
# Set an API version by default for Azure models
|
# Set an API version by default for Azure models
|
||||||
# Required for newer models.
|
# Required for newer models.
|
||||||
# Azure issue: https://github.com/All-Hands-AI/OpenHands/issues/7755
|
# Azure issue: https://github.com/OpenHands/OpenHands/issues/7755
|
||||||
if self.model.startswith('azure') and self.api_version is None:
|
if self.model.startswith('azure') and self.api_version is None:
|
||||||
self.api_version = '2024-12-01-preview'
|
self.api_version = '2024-12-01-preview'
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ ACTION_TYPE_TO_CLASS = {action_class.action: action_class for action_class in ac
|
|||||||
|
|
||||||
|
|
||||||
def handle_action_deprecated_args(args: dict[str, Any]) -> dict[str, Any]:
|
def handle_action_deprecated_args(args: dict[str, Any]) -> dict[str, Any]:
|
||||||
# keep_prompt has been deprecated in https://github.com/All-Hands-AI/OpenHands/pull/4881
|
# keep_prompt has been deprecated in https://github.com/OpenHands/OpenHands/pull/4881
|
||||||
if 'keep_prompt' in args:
|
if 'keep_prompt' in args:
|
||||||
args.pop('keep_prompt')
|
args.pop('keep_prompt')
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ def _update_cmd_output_metadata(
|
|||||||
|
|
||||||
|
|
||||||
def handle_observation_deprecated_extras(extras: dict) -> dict:
|
def handle_observation_deprecated_extras(extras: dict) -> dict:
|
||||||
# These are deprecated in https://github.com/All-Hands-AI/OpenHands/pull/4881
|
# These are deprecated in https://github.com/OpenHands/OpenHands/pull/4881
|
||||||
if 'exit_code' in extras:
|
if 'exit_code' in extras:
|
||||||
extras['metadata'] = _update_cmd_output_metadata(
|
extras['metadata'] = _update_cmd_output_metadata(
|
||||||
extras.get('metadata', None), exit_code=extras.pop('exit_code')
|
extras.get('metadata', None), exit_code=extras.pop('exit_code')
|
||||||
@ -92,7 +92,7 @@ def handle_observation_deprecated_extras(extras: dict) -> dict:
|
|||||||
extras.get('metadata', None), pid=extras.pop('command_id')
|
extras.get('metadata', None), pid=extras.pop('command_id')
|
||||||
)
|
)
|
||||||
|
|
||||||
# formatted_output_and_error has been deprecated in https://github.com/All-Hands-AI/OpenHands/pull/6671
|
# formatted_output_and_error has been deprecated in https://github.com/OpenHands/OpenHands/pull/6671
|
||||||
if 'formatted_output_and_error' in extras:
|
if 'formatted_output_and_error' in extras:
|
||||||
extras.pop('formatted_output_and_error')
|
extras.pop('formatted_output_and_error')
|
||||||
return extras
|
return extras
|
||||||
|
|||||||
@ -4,7 +4,7 @@ The official OpenHands companion extension for Visual Studio Code.
|
|||||||
|
|
||||||
This extension seamlessly integrates OpenHands into your VSCode workflow, allowing you to start coding sessions with your AI agent directly from your editor.
|
This extension seamlessly integrates OpenHands into your VSCode workflow, allowing you to start coding sessions with your AI agent directly from your editor.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ You can access the extension's commands in two ways:
|
|||||||
For the best experience, the OpenHands CLI will attempt to install the extension for you automatically the first time you run it inside VSCode.
|
For the best experience, the OpenHands CLI will attempt to install the extension for you automatically the first time you run it inside VSCode.
|
||||||
|
|
||||||
If you need to install it manually:
|
If you need to install it manually:
|
||||||
1. Download the latest `.vsix` file from the [GitHub Releases page](https://github.com/All-Hands-AI/OpenHands/releases).
|
1. Download the latest `.vsix` file from the [GitHub Releases page](https://github.com/OpenHands/OpenHands/releases).
|
||||||
2. In VSCode, open the Command Palette (`Ctrl+Shift+P`).
|
2. In VSCode, open the Command Palette (`Ctrl+Shift+P`).
|
||||||
3. Run the **"Extensions: Install from VSIX..."** command.
|
3. Run the **"Extensions: Install from VSIX..."** command.
|
||||||
4. Select the `.vsix` file you downloaded.
|
4. Select the `.vsix` file you downloaded.
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/all-hands-ai/OpenHands.git"
|
"url": "https://github.com/openhands/OpenHands.git"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.98.2",
|
"vscode": "^1.98.2",
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
Part of this Linter module is adapted from Aider (Apache 2.0 License, [original
|
Part of this Linter module is adapted from Aider (Apache 2.0 License, [original
|
||||||
code](https://github.com/paul-gauthier/aider/blob/main/aider/linter.py)).
|
code](https://github.com/paul-gauthier/aider/blob/main/aider/linter.py)).
|
||||||
- Please see the [original repository](https://github.com/paul-gauthier/aider) for more information.
|
- Please see the [original repository](https://github.com/paul-gauthier/aider) for more information.
|
||||||
- The detailed implementation of the linter can be found at: https://github.com/All-Hands-AI/openhands-aci.
|
- The detailed implementation of the linter can be found at: https://github.com/OpenHands/openhands-aci.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from openhands_aci.linter import DefaultLinter, LintResult
|
from openhands_aci.linter import DefaultLinter, LintResult
|
||||||
|
|||||||
@ -160,7 +160,7 @@ class LLM(RetryMixin, DebugMixin):
|
|||||||
'temperature'
|
'temperature'
|
||||||
) # temperature is not supported for reasoning models
|
) # temperature is not supported for reasoning models
|
||||||
kwargs.pop('top_p') # reasoning model like o3 doesn't support top_p
|
kwargs.pop('top_p') # reasoning model like o3 doesn't support top_p
|
||||||
# Azure issue: https://github.com/All-Hands-AI/OpenHands/issues/6777
|
# Azure issue: https://github.com/OpenHands/OpenHands/issues/6777
|
||||||
if self.config.model.startswith('azure'):
|
if self.config.model.startswith('azure'):
|
||||||
kwargs['max_tokens'] = self.config.max_output_tokens
|
kwargs['max_tokens'] = self.config.max_output_tokens
|
||||||
kwargs.pop('max_completion_tokens')
|
kwargs.pop('max_completion_tokens')
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Need help resolving a GitHub, GitLab, or Bitbucket issue but don't have the time to do it yourself? Let an AI agent help you out!
|
Need help resolving a GitHub, GitLab, or Bitbucket issue but don't have the time to do it yourself? Let an AI agent help you out!
|
||||||
|
|
||||||
This tool allows you to use open-source AI agents based on [OpenHands](https://github.com/all-hands-ai/openhands)
|
This tool allows you to use open-source AI agents based on [OpenHands](https://github.com/openhands/openhands)
|
||||||
to attempt to resolve GitHub, GitLab, and Bitbucket issues automatically. While it can handle multiple issues, it's primarily designed
|
to attempt to resolve GitHub, GitLab, and Bitbucket issues automatically. While it can handle multiple issues, it's primarily designed
|
||||||
to help you resolve one issue at a time with high quality.
|
to help you resolve one issue at a time with high quality.
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ Follow these steps to use this workflow in your own repository:
|
|||||||
2. Create a draft PR if successful, or push a branch if unsuccessful
|
2. Create a draft PR if successful, or push a branch if unsuccessful
|
||||||
3. Comment on the issue with the results
|
3. Comment on the issue with the results
|
||||||
|
|
||||||
Need help? Feel free to [open an issue](https://github.com/all-hands-ai/openhands/issues) or email us at [contact@all-hands.dev](mailto:contact@all-hands.dev).
|
Need help? Feel free to [open an issue](https://github.com/openhands/openhands/issues).
|
||||||
|
|
||||||
## Manual Installation
|
## Manual Installation
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ python -m openhands.resolver.resolve_issue --selected-repo [OWNER]/[REPO] --issu
|
|||||||
For instance, if you want to resolve issue #100 in this repo, you would run:
|
For instance, if you want to resolve issue #100 in this repo, you would run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python -m openhands.resolver.resolve_issue --selected-repo all-hands-ai/openhands --issue-number 100
|
python -m openhands.resolver.resolve_issue --selected-repo openhands/openhands --issue-number 100
|
||||||
```
|
```
|
||||||
|
|
||||||
The output will be written to the `output/` directory.
|
The output will be written to the `output/` directory.
|
||||||
@ -150,7 +150,7 @@ The output will be written to the `output/` directory.
|
|||||||
If you've installed the package from source using poetry, you can use:
|
If you've installed the package from source using poetry, you can use:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
poetry run python openhands/resolver/resolve_issue.py --selected-repo all-hands-ai/openhands --issue-number 100
|
poetry run python openhands/resolver/resolve_issue.py --selected-repo openhands/openhands --issue-number 100
|
||||||
```
|
```
|
||||||
|
|
||||||
## Responding to PR Comments
|
## Responding to PR Comments
|
||||||
@ -198,7 +198,7 @@ python -m openhands.resolver.send_pull_request --issue-number ISSUE_NUMBER --use
|
|||||||
|
|
||||||
## Providing Custom Instructions
|
## Providing Custom Instructions
|
||||||
|
|
||||||
You can customize how the AI agent approaches issue resolution by adding a repository microagent file at `.openhands/microagents/repo.md` in your repository. This file's contents will be automatically loaded in the prompt when working with your repository. For more information about repository microagents, see [Repository Instructions](https://github.com/All-Hands-AI/OpenHands/tree/main/microagents#2-repository-instructions-private).
|
You can customize how the AI agent approaches issue resolution by adding a repository microagent file at `.openhands/microagents/repo.md` in your repository. This file's contents will be automatically loaded in the prompt when working with your repository. For more information about repository microagents, see [Repository Instructions](https://github.com/OpenHands/OpenHands/tree/main/microagents#2-repository-instructions-private).
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-openhands-resolver:
|
call-openhands-resolver:
|
||||||
uses: All-Hands-AI/OpenHands/.github/workflows/openhands-resolver.yml@main
|
uses: OpenHands/OpenHands/.github/workflows/openhands-resolver.yml@main
|
||||||
with:
|
with:
|
||||||
macro: ${{ vars.OPENHANDS_MACRO || '@openhands-agent' }}
|
macro: ${{ vars.OPENHANDS_MACRO || '@openhands-agent' }}
|
||||||
max_iterations: ${{ fromJson(vars.OPENHANDS_MAX_ITER || 50) }}
|
max_iterations: ${{ fromJson(vars.OPENHANDS_MAX_ITER || 50) }}
|
||||||
|
|||||||
@ -349,7 +349,7 @@ def send_pull_request(
|
|||||||
pr_body = f'This pull request fixes #{issue.number}.'
|
pr_body = f'This pull request fixes #{issue.number}.'
|
||||||
if additional_message:
|
if additional_message:
|
||||||
pr_body += f'\n\n{additional_message}'
|
pr_body += f'\n\n{additional_message}'
|
||||||
pr_body += '\n\nAutomatic fix generated by [OpenHands](https://github.com/All-Hands-AI/OpenHands/) 🙌'
|
pr_body += '\n\nAutomatic fix generated by [OpenHands](https://github.com/OpenHands/OpenHands/) 🙌'
|
||||||
|
|
||||||
# For cross repo pull request, we need to send head parameter like fork_owner:branch as per git documentation here : https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#create-a-pull-request
|
# For cross repo pull request, we need to send head parameter like fork_owner:branch as per git documentation here : https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#create-a-pull-request
|
||||||
# head parameter usage : The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.
|
# head parameter usage : The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.
|
||||||
|
|||||||
@ -150,7 +150,7 @@ Key features:
|
|||||||
- Support for cloud-based deployments
|
- Support for cloud-based deployments
|
||||||
- Potential for improved security through isolation
|
- Potential for improved security through isolation
|
||||||
|
|
||||||
At the time of this writing, this is mostly used in parallel evaluation, such as this example for [SWE-Bench](https://github.com/All-Hands-AI/OpenHands/tree/main/evaluation/benchmarks/swe_bench#run-inference-on-remoteruntime-experimental).
|
At the time of this writing, this is mostly used in parallel evaluation, such as this example for [SWE-Bench](https://github.com/OpenHands/OpenHands/tree/main/evaluation/benchmarks/swe_bench#run-inference-on-remoteruntime-experimental).
|
||||||
|
|
||||||
## Related Components
|
## Related Components
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Two configuration options are required to use the Kubernetes runtime:
|
|||||||
2. **Runtime Container Image**: Specify the container image to use for the runtime environment
|
2. **Runtime Container Image**: Specify the container image to use for the runtime environment
|
||||||
```toml
|
```toml
|
||||||
[sandbox]
|
[sandbox]
|
||||||
runtime_container_image = "docker.all-hands.dev/all-hands-ai/runtime:0.59-nikolaik"
|
runtime_container_image = "docker.all-hands.dev/openhands/runtime:0.59-nikolaik"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Additional Kubernetes Options
|
#### Additional Kubernetes Options
|
||||||
|
|||||||
@ -79,7 +79,7 @@ def get_user_info() -> tuple[int, str | None]:
|
|||||||
|
|
||||||
|
|
||||||
def check_dependencies(code_repo_path: str, check_browser: bool) -> None:
|
def check_dependencies(code_repo_path: str, check_browser: bool) -> None:
|
||||||
ERROR_MESSAGE = 'Please follow the instructions in https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md to install OpenHands.'
|
ERROR_MESSAGE = 'Please follow the instructions in https://github.com/OpenHands/OpenHands/blob/main/Development.md to install OpenHands.'
|
||||||
if not os.path.exists(code_repo_path):
|
if not os.path.exists(code_repo_path):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f'Code repo path {code_repo_path} does not exist. ' + ERROR_MESSAGE
|
f'Code repo path {code_repo_path} does not exist. ' + ERROR_MESSAGE
|
||||||
@ -158,7 +158,7 @@ class LocalRuntime(ActionExecutionClient):
|
|||||||
|
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'Initializing LocalRuntime. WARNING: NO SANDBOX IS USED. '
|
'Initializing LocalRuntime. WARNING: NO SANDBOX IS USED. '
|
||||||
'This is an experimental feature, please report issues to https://github.com/All-Hands-AI/OpenHands/issues. '
|
'This is an experimental feature, please report issues to https://github.com/OpenHands/OpenHands/issues. '
|
||||||
'`run_as_openhands` will be ignored since the current user will be used to launch the server. '
|
'`run_as_openhands` will be ignored since the current user will be used to launch the server. '
|
||||||
'We highly recommend using a sandbox (eg. DockerRuntime) unless you '
|
'We highly recommend using a sandbox (eg. DockerRuntime) unless you '
|
||||||
'are running in a controlled environment.\n'
|
'are running in a controlled environment.\n'
|
||||||
|
|||||||
@ -5,7 +5,7 @@ This folder implements a skill/tool set `agentskills` for OpenHands.
|
|||||||
It is intended to be used by the agent **inside sandbox**.
|
It is intended to be used by the agent **inside sandbox**.
|
||||||
The skill set will be exposed as a `pip` package that can be installed as a plugin inside the sandbox.
|
The skill set will be exposed as a `pip` package that can be installed as a plugin inside the sandbox.
|
||||||
|
|
||||||
The skill set can contain a bunch of wrapped tools for agent ([many examples here](https://github.com/All-Hands-AI/OpenHands/pull/1914)), for example:
|
The skill set can contain a bunch of wrapped tools for agent ([many examples here](https://github.com/OpenHands/OpenHands/pull/1914)), for example:
|
||||||
- Audio/Video to text (these are a temporary solution, and we should switch to multimodal models when they are sufficiently cheap
|
- Audio/Video to text (these are a temporary solution, and we should switch to multimodal models when they are sufficiently cheap
|
||||||
- PDF to text
|
- PDF to text
|
||||||
- etc.
|
- etc.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
"""This file imports a global singleton of the `EditTool` class as well as raw functions that expose
|
"""This file imports a global singleton of the `EditTool` class as well as raw functions that expose
|
||||||
its __call__.
|
its __call__.
|
||||||
The implementation of the `EditTool` class can be found at: https://github.com/All-Hands-AI/openhands-aci/.
|
The implementation of the `EditTool` class can be found at: https://github.com/OpenHands/openhands-aci/.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from openhands_aci.editor import file_editor
|
from openhands_aci.editor import file_editor
|
||||||
|
|||||||
@ -271,7 +271,7 @@ def test_no_ps2_in_output(temp_dir, runtime_cls, run_as_openhands):
|
|||||||
is_windows(), reason='Test uses Linux-specific bash loops and sed commands'
|
is_windows(), reason='Test uses Linux-specific bash loops and sed commands'
|
||||||
)
|
)
|
||||||
def test_multiline_command_loop(temp_dir, runtime_cls):
|
def test_multiline_command_loop(temp_dir, runtime_cls):
|
||||||
# https://github.com/All-Hands-AI/OpenHands/issues/3143
|
# https://github.com/OpenHands/OpenHands/issues/3143
|
||||||
init_cmd = """mkdir -p _modules && \
|
init_cmd = """mkdir -p _modules && \
|
||||||
for month in {01..04}; do
|
for month in {01..04}; do
|
||||||
for day in {01..05}; do
|
for day in {01..05}; do
|
||||||
@ -1453,7 +1453,7 @@ def test_bash_remove_prefix(temp_dir, runtime_cls, run_as_openhands):
|
|||||||
try:
|
try:
|
||||||
# create a git repo - same for both platforms
|
# create a git repo - same for both platforms
|
||||||
action = CmdRunAction(
|
action = CmdRunAction(
|
||||||
'git init && git remote add origin https://github.com/All-Hands-AI/OpenHands'
|
'git init && git remote add origin https://github.com/OpenHands/OpenHands'
|
||||||
)
|
)
|
||||||
obs = runtime.run_action(action)
|
obs = runtime.run_action(action)
|
||||||
# logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
# logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
||||||
@ -1463,7 +1463,7 @@ def test_bash_remove_prefix(temp_dir, runtime_cls, run_as_openhands):
|
|||||||
obs = runtime.run_action(CmdRunAction('git remote -v'))
|
obs = runtime.run_action(CmdRunAction('git remote -v'))
|
||||||
# logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
# logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
||||||
assert obs.metadata.exit_code == 0
|
assert obs.metadata.exit_code == 0
|
||||||
assert 'https://github.com/All-Hands-AI/OpenHands' in obs.content
|
assert 'https://github.com/OpenHands/OpenHands' in obs.content
|
||||||
assert 'git remote -v' not in obs.content
|
assert 'git remote -v' not in obs.content
|
||||||
finally:
|
finally:
|
||||||
_close_test_runtime(runtime)
|
_close_test_runtime(runtime)
|
||||||
|
|||||||
@ -114,7 +114,7 @@ def test_load_microagents_with_selected_repo(temp_dir, runtime_cls, run_as_openh
|
|||||||
try:
|
try:
|
||||||
# Load microagents with selected repository
|
# Load microagents with selected repository
|
||||||
loaded_agents = runtime.get_microagents_from_selected_repo(
|
loaded_agents = runtime.get_microagents_from_selected_repo(
|
||||||
'All-Hands-AI/OpenHands'
|
'OpenHands/OpenHands'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify all agents are loaded
|
# Verify all agents are loaded
|
||||||
|
|||||||
@ -17,7 +17,7 @@ def test_initialize_repository_for_runtime(temp_dir, runtime_cls, run_as_openhan
|
|||||||
runtime, config = _load_runtime(temp_dir, runtime_cls, run_as_openhands)
|
runtime, config = _load_runtime(temp_dir, runtime_cls, run_as_openhands)
|
||||||
mock_repo = Repository(
|
mock_repo = Repository(
|
||||||
id='1232',
|
id='1232',
|
||||||
full_name='All-Hands-AI/OpenHands',
|
full_name='OpenHands/OpenHands',
|
||||||
git_provider=ProviderType.GITHUB,
|
git_provider=ProviderType.GITHUB,
|
||||||
is_public=True,
|
is_public=True,
|
||||||
)
|
)
|
||||||
@ -27,7 +27,7 @@ def test_initialize_repository_for_runtime(temp_dir, runtime_cls, run_as_openhan
|
|||||||
return_value=mock_repo,
|
return_value=mock_repo,
|
||||||
):
|
):
|
||||||
repository_dir = initialize_repository_for_runtime(
|
repository_dir = initialize_repository_for_runtime(
|
||||||
runtime, selected_repository='All-Hands-AI/OpenHands'
|
runtime, selected_repository='OpenHands/OpenHands'
|
||||||
)
|
)
|
||||||
|
|
||||||
assert repository_dir is not None
|
assert repository_dir is not None
|
||||||
|
|||||||
@ -219,7 +219,7 @@ def test_send_pull_request_bitbucket(
|
|||||||
mock_service_context.assert_called_once()
|
mock_service_context.assert_called_once()
|
||||||
|
|
||||||
# Verify create_pull_request was called with the correct data
|
# Verify create_pull_request was called with the correct data
|
||||||
expected_body = 'This pull request fixes #123.\n\nAutomatic fix generated by [OpenHands](https://github.com/All-Hands-AI/OpenHands/) 🙌'
|
expected_body = 'This pull request fixes #123.\n\nAutomatic fix generated by [OpenHands](https://github.com/OpenHands/OpenHands/) 🙌'
|
||||||
mock_service.create_pull_request.assert_called_once_with(
|
mock_service.create_pull_request.assert_called_once_with(
|
||||||
{
|
{
|
||||||
'title': 'Test PR',
|
'title': 'Test PR',
|
||||||
@ -733,7 +733,7 @@ def test_initialize_repository_for_runtime_with_bitbucket_token(
|
|||||||
# Set up environment with BITBUCKET_TOKEN
|
# Set up environment with BITBUCKET_TOKEN
|
||||||
with patch.dict(os.environ, {'BITBUCKET_TOKEN': 'username:app_password'}):
|
with patch.dict(os.environ, {'BITBUCKET_TOKEN': 'username:app_password'}):
|
||||||
result = initialize_repository_for_runtime(
|
result = initialize_repository_for_runtime(
|
||||||
runtime=mock_runtime, selected_repository='all-hands-ai/test-repo'
|
runtime=mock_runtime, selected_repository='openhands/test-repo'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify the result
|
# Verify the result
|
||||||
@ -756,7 +756,7 @@ def test_initialize_repository_for_runtime_with_bitbucket_token(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Check that the repository was passed correctly
|
# Check that the repository was passed correctly
|
||||||
assert args[3] == 'all-hands-ai/test-repo' # selected_repository
|
assert args[3] == 'openhands/test-repo' # selected_repository
|
||||||
assert args[4] is None # selected_branch
|
assert args[4] is None # selected_branch
|
||||||
|
|
||||||
|
|
||||||
@ -789,7 +789,7 @@ def test_initialize_repository_for_runtime_with_multiple_tokens(
|
|||||||
},
|
},
|
||||||
):
|
):
|
||||||
result = initialize_repository_for_runtime(
|
result = initialize_repository_for_runtime(
|
||||||
runtime=mock_runtime, selected_repository='all-hands-ai/test-repo'
|
runtime=mock_runtime, selected_repository='openhands/test-repo'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify the result
|
# Verify the result
|
||||||
@ -853,7 +853,7 @@ def test_initialize_repository_for_runtime_without_bitbucket_token(
|
|||||||
del os.environ['BITBUCKET_TOKEN']
|
del os.environ['BITBUCKET_TOKEN']
|
||||||
|
|
||||||
result = initialize_repository_for_runtime(
|
result = initialize_repository_for_runtime(
|
||||||
runtime=mock_runtime, selected_repository='all-hands-ai/test-repo'
|
runtime=mock_runtime, selected_repository='openhands/test-repo'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify the result
|
# Verify the result
|
||||||
|
|||||||
@ -4,7 +4,7 @@ from openhands.resolver.patching.patch import diffobj, parse_diff
|
|||||||
|
|
||||||
def test_patch_apply_with_empty_lines():
|
def test_patch_apply_with_empty_lines():
|
||||||
# The original file has no indentation and uses \n line endings
|
# The original file has no indentation and uses \n line endings
|
||||||
original_content = '# PR Viewer\n\nThis React application allows you to view open pull requests from GitHub repositories in a GitHub organization. By default, it uses the All-Hands-AI organization.\n\n## Setup'
|
original_content = '# PR Viewer\n\nThis React application allows you to view open pull requests from GitHub repositories in a GitHub organization. By default, it uses the OpenHands organization.\n\n## Setup'
|
||||||
|
|
||||||
# The patch has spaces at the start of each line and uses \n line endings
|
# The patch has spaces at the start of each line and uses \n line endings
|
||||||
patch = """diff --git a/README.md b/README.md
|
patch = """diff --git a/README.md b/README.md
|
||||||
@ -14,8 +14,8 @@ index b760a53..5071727 100644
|
|||||||
@@ -1,3 +1,3 @@
|
@@ -1,3 +1,3 @@
|
||||||
# PR Viewer
|
# PR Viewer
|
||||||
|
|
||||||
-This React application allows you to view open pull requests from GitHub repositories in a GitHub organization. By default, it uses the All-Hands-AI organization.
|
-This React application allows you to view open pull requests from GitHub repositories in a GitHub organization. By default, it uses the OpenHands organization.
|
||||||
+This React application was created by Graham Neubig and OpenHands. It allows you to view open pull requests from GitHub repositories in a GitHub organization. By default, it uses the All-Hands-AI organization."""
|
+This React application was created by Graham Neubig and OpenHands. It allows you to view open pull requests from GitHub repositories in a GitHub organization. By default, it uses the OpenHands organization."""
|
||||||
|
|
||||||
print('Original content lines:')
|
print('Original content lines:')
|
||||||
for i, line in enumerate(original_content.splitlines(), 1):
|
for i, line in enumerate(original_content.splitlines(), 1):
|
||||||
@ -40,7 +40,7 @@ index b760a53..5071727 100644
|
|||||||
expected_result = [
|
expected_result = [
|
||||||
'# PR Viewer',
|
'# PR Viewer',
|
||||||
'',
|
'',
|
||||||
'This React application was created by Graham Neubig and OpenHands. It allows you to view open pull requests from GitHub repositories in a GitHub organization. By default, it uses the All-Hands-AI organization.',
|
'This React application was created by Graham Neubig and OpenHands. It allows you to view open pull requests from GitHub repositories in a GitHub organization. By default, it uses the OpenHands organization.',
|
||||||
'',
|
'',
|
||||||
'## Setup',
|
'## Setup',
|
||||||
]
|
]
|
||||||
|
|||||||
10
third_party/runtime/impl/daytona/README.md
vendored
10
third_party/runtime/impl/daytona/README.md
vendored
@ -48,7 +48,7 @@ Once executed, OpenHands should be running locally and ready for use.
|
|||||||
## Manual Initialization
|
## Manual Initialization
|
||||||
|
|
||||||
### Step 1: Set the `OPENHANDS_VERSION` Environment Variable
|
### Step 1: Set the `OPENHANDS_VERSION` Environment Variable
|
||||||
Run the following command in your terminal, replacing `<openhands-release>` with the latest release's version seen in the [main README.md file](https://github.com/All-Hands-AI/OpenHands?tab=readme-ov-file#-quick-start):
|
Run the following command in your terminal, replacing `<openhands-release>` with the latest release's version seen in the [main README.md file](https://github.com/OpenHands/OpenHands?tab=readme-ov-file#-quick-start):
|
||||||
|
|
||||||
#### Mac/Linux:
|
#### Mac/Linux:
|
||||||
```bash
|
```bash
|
||||||
@ -85,14 +85,14 @@ This command pulls and runs the OpenHands container using Docker. Once executed,
|
|||||||
#### Mac/Linux:
|
#### Mac/Linux:
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm --pull=always \
|
docker run -it --rm --pull=always \
|
||||||
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:${OPENHANDS_VERSION}-nikolaik \
|
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/openhands/runtime:${OPENHANDS_VERSION}-nikolaik \
|
||||||
-e LOG_ALL_EVENTS=true \
|
-e LOG_ALL_EVENTS=true \
|
||||||
-e RUNTIME=daytona \
|
-e RUNTIME=daytona \
|
||||||
-e DAYTONA_API_KEY=${DAYTONA_API_KEY} \
|
-e DAYTONA_API_KEY=${DAYTONA_API_KEY} \
|
||||||
-v ~/.openhands:/.openhands \
|
-v ~/.openhands:/.openhands \
|
||||||
-p 3000:3000 \
|
-p 3000:3000 \
|
||||||
--name openhands-app \
|
--name openhands-app \
|
||||||
docker.all-hands.dev/all-hands-ai/openhands:${OPENHANDS_VERSION}
|
docker.all-hands.dev/openhands/openhands:${OPENHANDS_VERSION}
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: If you used OpenHands before version 0.44, you may want to run `mv ~/.openhands-state ~/.openhands` to migrate your conversation history to the new location.
|
> **Note**: If you used OpenHands before version 0.44, you may want to run `mv ~/.openhands-state ~/.openhands` to migrate your conversation history to the new location.
|
||||||
@ -100,14 +100,14 @@ docker run -it --rm --pull=always \
|
|||||||
#### Windows:
|
#### Windows:
|
||||||
```powershell
|
```powershell
|
||||||
docker run -it --rm --pull=always `
|
docker run -it --rm --pull=always `
|
||||||
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:${env:OPENHANDS_VERSION}-nikolaik `
|
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/openhands/runtime:${env:OPENHANDS_VERSION}-nikolaik `
|
||||||
-e LOG_ALL_EVENTS=true `
|
-e LOG_ALL_EVENTS=true `
|
||||||
-e RUNTIME=daytona `
|
-e RUNTIME=daytona `
|
||||||
-e DAYTONA_API_KEY=${env:DAYTONA_API_KEY} `
|
-e DAYTONA_API_KEY=${env:DAYTONA_API_KEY} `
|
||||||
-v ~/.openhands:/.openhands `
|
-v ~/.openhands:/.openhands `
|
||||||
-p 3000:3000 `
|
-p 3000:3000 `
|
||||||
--name openhands-app `
|
--name openhands-app `
|
||||||
docker.all-hands.dev/all-hands-ai/openhands:${env:OPENHANDS_VERSION}
|
docker.all-hands.dev/openhands/openhands:${env:OPENHANDS_VERSION}
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: If you used OpenHands before version 0.44, you may want to run `mv ~/.openhands-state ~/.openhands` to migrate your conversation history to the new location.
|
> **Note**: If you used OpenHands before version 0.44, you may want to run `mv ~/.openhands-state ~/.openhands` to migrate your conversation history to the new location.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user