Use the GitHub Repository Monitor when you want Agent Canvas to watch a repository and trigger an OpenHands agent when matching activity happens. Common examples include:Documentation Index
Fetch the complete documentation index at: https://allhandsai-docs-onboarding-agent-canvas.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Monitoring new issues and pull requests
- Watching failed CI runs
- Checking for dependency or release activity
- Creating follow-up work when a repository changes
Prerequisites
Before you start, make sure you have:- Agent Canvas installed and running
- An LLM configured for the backend that will run the automation
- Access to create a GitHub token for the repository you want to monitor
- Access to install MCP servers and save secrets in Agent Canvas
Create a GitHub Access Token
- Go to GitHub Developer Settings.
- Click
Generate new token. - Prefer a fine-grained personal access token if your organization supports it.
- Give the token a clear name, such as
Agent Canvas Repo Monitor. - Select repository access:
- Choose
Only select repositoriesfor the safest setup. - Choose
All repositoriesonly if the automation needs broad access.
- Choose
- Set an expiration date that matches your team’s security policy.
Add Repository Permissions
In the token setup screen, grant only the permissions your monitor needs. For most repository monitors, start with:| Permission | Access |
|---|---|
Contents | Read-only, or read and write if the agent will open changes |
Issues | Read and write if the agent will triage or comment on issues |
Pull requests | Read and write if the agent will inspect or comment on pull requests |
Metadata | Read-only |
Actions | Read-only, if the automation should inspect workflow runs |
Checks | Read-only, if the automation should inspect check runs |
Generate token and copy the token immediately.
If you change token permissions later, you may need to update the token or create a new one.
Add the GitHub MCP Server
The GitHub MCP server gives the agent tools for reading repository state and taking GitHub actions.- In Agent Canvas, check the backend switcher in the bottom-left corner.
- Make sure the active backend is the backend where you want the repository monitor to run.
- Open
Customize. - Open
MCP Servers. - Select
GitHubfrom the MCP library. - Paste the GitHub token you created earlier.
- Save the MCP server configuration.
Add the GitHub Token as a Secret
Some automations also need the token available as a backend secret, especially when the agent runs GitHub commands or accesses private repositories.- Open
Settings. - Open
Secrets. - Click
Add a new Secret. - Set the secret name to
GITHUB_TOKEN. - Paste the GitHub token as the secret value.
- Save the secret.
Start the Repository Monitor Workflow
- Open
Automatein the left navigation. - Find
Start from a proven workflow. - Choose the GitHub repository monitor workflow.
- Agent Canvas opens a new conversation with a prefilled setup prompt.
- Send the prompt as-is, or edit it first if you already know what you want.
Customize the Monitor
You do not need to know every detail before sending the prefilled prompt. The agent will ask follow-up questions to clarify:- The repository owner and name
- The events or conditions the monitor should watch
- How often the automation should check the repository, if it is schedule-based
- What the agent should do when it finds a match
- Where the agent should report results, such as a GitHub comment or Slack channel
Verify the Automation
After the automation is created:- Open
Automate. - Confirm the new automation appears in the list.
- Open the automation details and check that it is enabled.
- Trigger or wait for matching repository activity.
- Confirm that the agent run appears and performs the action you requested.

