|
|
@@ -37,12 +37,15 @@ the [README for the OpenHands Resolver](https://github.com/All-Hands-AI/OpenHand
|
|
|
|
|
|
You can provide custom directions for OpenHands by following the [README for the resolver](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/resolver/README.md#providing-custom-instructions).
|
|
|
|
|
|
-### Configure custom macro
|
|
|
+### Custom configurations
|
|
|
|
|
|
-To customize the default macro (`@openhands-agent`):
|
|
|
+Github resolver will automatically check for valid [repository secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions?tool=webui#creating-secrets-for-a-repository) or [repository variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#creating-configuration-variables-for-a-repository) to customize its behavior. The customization options you can set are:
|
|
|
|
|
|
-1. [Create a repository variable](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#creating-configuration-variables-for-a-repository) named `OPENHANDS_MACRO`
|
|
|
-2. Assign the variable a custom value
|
|
|
+| **Attribute name** | **Type** | **Purpose** | **Example** |
|
|
|
+| -------------------------------- | -------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
|
|
+| `OPENHANDS_MAX_ITER` | Variable | Set max limit for agent iterations | `OPENHANDS_MAX_ITER=10` |
|
|
|
+| `OPENHANDS_MACRO` | Variable | Customize default macro for invoking the resolver | `OPENHANDS_MACRO=@resolveit` |
|
|
|
+| `OPENHANDS_BASE_CONTAINER_IMAGE` | Variable | Custom Sandbox ([learn more](https://docs.all-hands.dev/modules/usage/how-to/custom-sandbox-guide)) | `OPENHANDS_BASE_CONTAINER_IMAGE="custom_image"` |
|
|
|
|
|
|
## Writing Effective .openhands_instructions Files
|
|
|
|
|
|
@@ -55,6 +58,7 @@ The `.openhands_instructions` file is a file that you can put in the root direct
|
|
|
2. **Repository Structure**: Explain the key directories and their purposes, especially highlighting where different types of code (e.g., frontend, backend) are located.
|
|
|
|
|
|
3. **Development Workflows**: Document the essential commands for:
|
|
|
+
|
|
|
- Building and setting up the project
|
|
|
- Running tests
|
|
|
- Linting and code quality checks
|
|
|
@@ -69,24 +73,29 @@ The `.openhands_instructions` file is a file that you can put in the root direct
|
|
|
|
|
|
```markdown
|
|
|
# Repository Overview
|
|
|
+
|
|
|
[Brief description of the project]
|
|
|
|
|
|
## General Setup
|
|
|
+
|
|
|
- Main build command
|
|
|
- Development environment setup
|
|
|
- Pre-commit checks
|
|
|
|
|
|
## Backend
|
|
|
+
|
|
|
- Location and structure
|
|
|
- Testing instructions
|
|
|
- Environment requirements
|
|
|
|
|
|
## Frontend
|
|
|
+
|
|
|
- Setup prerequisites
|
|
|
- Build and test commands
|
|
|
- Environment variables
|
|
|
|
|
|
## Additional Guidelines
|
|
|
+
|
|
|
- Code style requirements
|
|
|
- Special considerations
|
|
|
- Common workflows
|