Overview
Set up an OpenHands Agent Canvas automation that picks up new bug reports from your issue tracker, works on them in a sandbox and opens pull requests, only for issues that meet rules your team writes down.
Problem or Objective
- Which agents turn an issue report into a fix?
- Which agents take on multi-step tasks in the background and report back when they finish or need approval?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- OpenHands
- Prerequisites
- A self-hosted OpenHands Agent Canvas (Docker recommended for sandboxed conversations), a connected Git provider and issue tracker, and a model provider for the LLM profile.
How It Works
Install OpenHands Agent Canvas, preferably with a Docker sandbox so each conversation runs in its own container. Connect your Git provider, then open the Automations view and start the Issue to Pull Request template. In the setup conversation, write the team rules into the automation draft: which repositories it watches, which label marks an issue as ready for the agent, which issues it must skip, and that it must run the tests before opening a pull request. Check whether the setup form itself can limit the automation to that label; if it cannot, keep the rule in the instructions and watch the first runs. Choose an LLM profile, review the draft and enable it. The automation opens a pull request for each issue it takes; a developer reviews and merges, and nothing is merged automatically.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up OpenHands.
- Connect the toolsConnect the tools this workflow relies on: OpenHands.
- Check the prerequisitesA self-hosted OpenHands Agent Canvas (Docker recommended for sandboxed conversations), a connected Git provider and issue tracker, and a model provider for the LLM profile.
- Gather your detailsCollect what the prompt asks for: Repository to watch, Label that allows the agent, Label the agent must skip, Paths the agent must not change, Test command.
- Run the starter promptPaste the starter prompt below into OpenHands and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at docs.openhands.dev before you rely on it.
Practical Starter Prompt: Set up rule-bound bug fixing
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Create an Issue to Pull Request automation for [Repository to watch]. Only take issues labelled [Label that allows the agent]; skip anything labelled [Label the agent must skip] or touching [Paths the agent must not change]. For each issue, reproduce the bug, make the smallest fix, run [Test command], and open a pull request that links the issue and lists what you tested. Never merge, never push to the main branch, and comment on the issue instead of guessing when it is unclear. A developer will review every pull request.Paste this into the setup conversation of the Issue to Pull Request template and review the draft before enabling it. A developer reviews every pull request and merges it by hand; check the first few runs to confirm the label rule is being followed.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The OpenHands automation page documents pre-built automations, including Issue to Pull Request, and backends that run agents on a schedule or in response to external events; the README documents Docker sandboxes. No cited page shows how reliably an automation follows written team rules, so how well it filters issues or fixes them is untested here.
Limitations and Considerations
Give the Git token only the access the automation needs, and check before the first run that it cannot push straight to your main branch. Every change arrives as a pull request: review the code and the test results yourself before merging. Model usage costs depend on the LLM profile you choose. Rules written as instructions are followed by a model, not enforced by the tracker, so check early runs for issues it should have skipped. The README notes that the Docker option isolates conversation execution but does not move the whole Canvas or automation service into a sandbox. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About OpenHands/OpenHands
Setting up a CVE Remediation Factory with OpenHands (opens in a new tab)
Walkthrough of OpenHands by OpenHands: it is on the project’s own channel.
Watch on YouTube (opens in a new tab)About OpenHands/OpenHands
One AI Agent, Multiple LLMs: Automatic Model Routing in OpenHands (opens in a new tab)
Published by the project’s official channel.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Setup a Pre-built Automation - OpenHands Docs (opens in a new tab)
Project documentation · docs.openhands.dev · Undated · Source checked 25 Nov 2026, 11:59 UTC
What this source supports
- Agent Canvas ships with a set of pre-built automations for the most common agent workflows.
- Backends created by the agent-canvas launcher include Automation Server, so they can run agents on a schedule or in response to external events.
- A template that finishes its setup in a conversation opens the two-panel automation setup view: the template’s seed arrives as the first message, and the automation draft sits beside the chat for the agent to fill in.
- OpenHands/OpenHands README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC
What this source supports
- Run each new conversation in its own Docker container, with its own Agent Server and tools.
- This setting isolates conversation execution; it does not move the entire Canvas or automation service into a sandbox.

