AWS Builder Center
Weekend Agent Challenge:RepoWatch

Weekend Agent Challenge:RepoWatch

An always-on AWS agent that triages new GitHub issues on its own. Every 10 minutes, it checks for new issues, reasons through severity, complexity, and area with Amazon Bedrock (Nova), posts a decision as a comment, and auto-applies labels, no dashboard, no clicking, just a repo that triages itself while you're away. Built with EventBridge Scheduler, Lambda, and Bedrock.

Student at MSRIT
I used to open a repo's issue tab and immediately triage in my head: is this actually urgent, how big is this really, whose problem is this. I did that same mental math on every new issue, every time, and never wrote any of it down. RepoWatch does that thinking for me, automatically, before I've even opened the tab.
It's a personal always-on agent that watches a GitHub repo, reasons about every new issue like a senior engineer would, posts its decision as a comment, and labels the issue accordingly. No button. No dashboard I have to remember to check. I find out it worked because the issue is already labeled and commented on by the time I look.
I didn't want to build something that just summarizes issues. Summaries don't do anything. I wanted an agent that makes a call and acts on it.
Architecture Diagram-RepoWatch

Figure 1: High-level architecture of RepoWatch. Amazon EventBridge Scheduler invokes an AWS Lambda function every 10 minutes, which analyzes GitHub issues using Amazon Bedrock and automatically comments on and labels them.

Vision & What the Agent Does

Issue triage is repetitive in a specific way: the questions are always the same (how bad is this, how big is this, who should touch it), but nobody wants to spend the first ten minutes of their day answering them for every open issue. That's exactly the kind of judgment work an agent should be doing while I'm not looking.
What triggers it: Amazon EventBridge Scheduler, running every 10 minutes. No manual invoke required for it to do its job; I only trigger it by hand when I'm debugging.
Amazon EventBridge Scheduler invokes RepoWatch every 10 minutes without requiring manual intervention.

Figure 2: EventBridge Scheduler configured to invoke RepoWatch automatically every 10 minutes.
What it does on its own:
  1. Pulls open issues from the repo via the GitHub API.
  1. Checks whether it's already commented on an issue (its own comment is the only state it needs, no database) and skips anything already processed.
  1. For everything new, calls Amazon Bedrock with a Nova model and forces a strict JSON decision, not a summary:
  • Severity: low / medium / high, with a one-sentence reason
  • Estimated complexity: small / medium / large
  • Suggested area: frontend / backend / docs / testing
  • Whether it looks like a good first issue
  1. Posts that decision as a formatted comment on the issue.
  1. Applies GitHub labels automatically based on the decision, things like  high-priority ,  frontend ,  good-first-issue , without touching any existing labels already on the issue.
How it reports back: there's no separate report. The repo itself is the report.Open the issue list and the labels tell you the state of the world at a glance; open any issue and the comment tells you why.
A newly created issue before RepoWatch processes it.

Figure 3: A newly created GitHub issue before RepoWatch has processed it. At this stage, the issue has no AI-generated comment or automatically assigned labels.
After the scheduled execution, RepoWatch automatically posts its reasoning and applies labels based on Amazon Bedrock's structured decision.

Figure 4: The same GitHub issue after RepoWatch's scheduled execution. Amazon Bedrock analyzes the issue, posts a structured triage comment, and automatically applies labels based on the generated decision.

How I Built It

I scoped this deliberately small: one Lambda, one trigger, one data source, no branching integrations. The build order I followed:
  1. Get the GitHub API calls working first (list issues, read comments, post a comment, patch labels) against a real test repo, using nothing but a personal access token.
  1. Wire the Bedrock call second, with a prompt that forces JSON output and nothing else.
  1. Connect the two, then hand it a schedule.
The entire agent runs inside a single AWS Lambda function.

Figure 5: AWS Lambda function hosting the complete RepoWatch workflow. The function retrieves GitHub issues, invokes Amazon Bedrock for reasoning, and updates the repository with comments and labels.
Key decisions I made:
  • Use an existing bot comment as the dedup check instead of a database. The obvious approach is a DynamoDB table tracking "last checked" state. I skipped it. Checking whether the bot has already commented on an issue is a free, stateless way to know if it's been processed, and it removes an entire piece of infrastructure I'd otherwise have to provision and debug.
  • Force a decision, not a summary. My first draft of the prompt asked Bedrock to "summarize the issue." That produced text nobody needed. I rewrote it to demand a structured decision (severity, complexity, suggested area) because a decision is something you can act on and a summary is just something you can read.
  • Labels are the real output, the comment is the explanation. The comment exists so a human can see why the label got applied, but the label itself is what makes this feel like an agent taking action rather than an LLM leaving a note.
Challenges I hit and how I fixed them:
  • Bedrock doesn't always return clean JSON. Even with a strict prompt, occasional responses came wrapped in extra text. I added a step that strips everything before the first  {  and after the last  }  before parsing, with a try/catch so one malformed response doesn't take down the whole run.
  • One bad issue shouldn't kill the batch. Early on, a single API error on one issue stopped the whole Lambda invocation. I wrapped each issue's handling in its own try/catch so the agent processes everything it can and just logs what it couldn't.
  • Labels have to exist before you can apply them. The GitHub API rejects a label patch if the label name doesn't already exist on the repo. I pre-created the full label set once, up front, rather than discovering this mid-demo.

AWS Services Used / Architecture Overview

Service
Role
Amazon EventBridge Scheduler
Fires every 10 minutes; the only trigger
AWS Lambda (Node.js)
Fetches issues, calls Bedrock, comments, labels; one function, one job
Amazon Bedrock (Nova)
Structured JSON triage decision via the Converse API
GitHub REST API
Issue read/write and label management, authenticated via a fine-grained PAT
IAM
Lambda execution role scoped to Bedrock access and basic logging
Amazon CloudWatch
Logs for each run: issues checked, issues processed, errors
No S3, no SES, no database. One straight pipeline, which is exactly what made it possible to build in under an hour.
CloudWatch confirms successful executions, showing the number of issues checked, processed, and any errors encountered during each scheduled run.

Figure 6: Amazon CloudWatch logs confirming successful scheduled executions of RepoWatch, including the number of issues checked, processed, and any errors encountered during each run.

What I Learned

The most useful thing I relearned this weekend: scope is a design decision, not a compromise. My first instinct was to reach for a database to track state, and the moment I asked "do I actually need this, or is there a stateless way to know the same thing," the whole build got simpler and more reliable at the same time.
I also learned that the difference between an agent and an LLM wrapper is genuinely just whether it takes an action with consequences. A comment alone is advice. A label is a decision that changes what the rest of the team sees when they open the repo. That one extra step, patching labels instead of stopping at the comment, is what made this feel autonomous rather than chatty.
If I extend this later, I'd add a weekly rollup showing how many issues got auto-triaged and how the severity distribution shifted over time, so the agent's judgment becomes something I can audit, not just trust.

Link to App or Repo

RepoWatch (Project Source Code)

Demo Repository Used for Testing

This repository was used to create and test GitHub issues while validating RepoWatch's automated triage workflow.

Tools I Used

I built this with Cursor, working directly against the AWS Lambda, EventBridge Scheduler, and Bedrock consoles as I went. No SAM or CDK, just a single deployable function I could zip and upload directly, which kept the whole build inside the weekend's time budget.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article