Skip to content

Add GitHub PR review agent example for macOS#29

Closed
munnamihir wants to merge 3 commits into
NVIDIA:mainfrom
munnamihir:add-github-pr-review-agent
Closed

Add GitHub PR review agent example for macOS#29
munnamihir wants to merge 3 commits into
NVIDIA:mainfrom
munnamihir:add-github-pr-review-agent

Conversation

@munnamihir

Copy link
Copy Markdown

What this adds:

A new community example: examples/github-pr-review-agent/

An agent that automatically reviews open GitHub pull requests using a local Ollama model and posts structured review comments back to GitHub.

Why it's useful:

  • No API keys or credits needed — runs fully local via Ollama
  • First Mac-native example in the community repo (tested on Apple Silicon, Sonoma 14.x)
  • Inside OpenShell sandbox, inference routes to Nemotron via inference.local automatically
  • policy.yaml locks egress to api.github.com and inference.local only — nothing else leaves the sandbox

Files added:

  • agent.py — main agent logic
  • policy.yaml — OpenShell network policy
  • .env.example — environment variable template
  • README.md — setup and usage guide

Tested:

  • Fetches open PRs from a GitHub repo
  • Downloads unified diff
  • Reviews with local LLM
  • Posts comment back to GitHub
  • OpenShell policy enforced

- reviews open PRs using local Ollama model (no API key needed)
- posts structured review comments back to GitHub
- includes OpenShell policy.yaml locking egress to github + inference.local
- tested on macOS Apple Silicon Sonoma 14.x
- works locally with Ollama and inside NemoClaw sandbox with Nemotron

Signed-off-by: munnamihir <munnamihir1999@gmail.com>
@munnamihir
munnamihir force-pushed the add-github-pr-review-agent branch from ec4c75a to fe35082 Compare June 2, 2026 01:18
Signed-off-by: munnamihir <munnamihir1999@gmail.com>
@munnamihir

Copy link
Copy Markdown
Author

Looks like the DCO workflow is failing due to gsactions/dco-check@v1.1.1 not being in the allowed actions list for this org — not related to this PR's changes. Happy to re-sign or adjust anything needed once the workflow issue is resolved on the repo side.

Signed-off-by: munnamihir <munnamihir1999@gmail.com>
@nv-nedelman-1

Copy link
Copy Markdown
Collaborator

@munnamihir some concerns about this PR:

  1. these examples should make use of a nemoclaw-supported agent harness (e.g. hermes, openclaw etc), as opposed to a simple agent script
  2. it seems to me like the agent script doesn't run in an "always-on" fashion - it requires the user to explicitly run it. a better example would make use of an always-on agent that periodically/automatically reviews PRs

@nv-nedelman-1

Copy link
Copy Markdown
Collaborator

Closing this PR for now - please re-open when above items are addressed and we'll re-review. thanks!

@munnamihir

Copy link
Copy Markdown
Author

Thanks for the detailed feedback this is a really helpful direction.
I'll rework this example to:

Use Hermes as the agent harness that is replace the standalone script with a Hermes skill that handles PR review, following the pattern in personal-community-sentiment-triage
Make it always-on: add a polling loop inside the Hermes skill that watches for new PRs on a configurable interval (e.g. every 15 minutes via a scheduled trigger), so it runs continuously without manual invocation
Add a SOUL.md: define the agent's behavior and PR review persona the same way hermes-launchable structures it

Give me a day or two to rebuild it properly. Happy to get this merged the right way.

@munnamihir

Copy link
Copy Markdown
Author

Thanks for the detailed feedback, really appreciated.

I've reworked the example to address both points:

Hermes agent harness replaced the standalone script with a proper Hermes agent structure (agents/hermes/) including SOUL.md, a github-pr-review skill with SKILL.md and a helper script, following the pattern from personal-community-sentiment-triage.

Always-on — the skill now runs in watch mode, polling for new PRs every 15 minutes continuously. Reviewed PRs are tracked in /tmp/reviewed_prs.json to avoid double-reviewing. A scripts/bring-up.sh starts the full NemoClaw sandbox
Inference — switched from Ollama to integrate.api.nvidia.com with Nemotron via the NVIDIA Build API, routed through NemoClaw

Let me know if the structure needs further adjustment happy to iterate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants