Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/automated_pr_review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v8.3.0

- name: Set up Python and Virtual Environment
run: |
uv python install 3.13
uv venv --python 3.13

- name: Install Dependencies
run: |
uv pip install google-antigravity requests

- name: Run Antigravity Review
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
Expand Down
24 changes: 16 additions & 8 deletions tools/private/reviewbot/antigravity_review.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "google-antigravity",
# "requests",
# ]
# ///
import argparse
import asyncio
from pathlib import Path
Expand All @@ -17,24 +24,25 @@ async def main():
# Read prompt file
prompt = Path(args.prompt).read_text()

# General coordinator instructions for the reviewer agent.
system_instructions = (
"You are a code review assistant. Use your available skills to perform "
"reviews on pull requests."
)

# Initialize the Antigravity Agent in read-only mode for security.
# Register the review-pr skill from the local reviewbot folder.
config = LocalAgentConfig(
skills_paths=["tools/private/reviewbot/skills/review-pr"],
system_instructions=system_instructions,
skills_paths=[str(Path(__file__).parent / "skills" / "review-pr" / "SKILL.md")],
capabilities=CapabilitiesConfig(
allow_filesystem_read=True,
allow_filesystem_write=False,
allow_network=False,
),
)

# General coordinator instructions for the reviewer agent.
system_instructions = (
"You are a code review assistant. Use your available skills to perform "
"reviews on pull requests."
)

async with Agent(config, system_instructions=system_instructions) as agent:
async with Agent(config) as agent:
response = await agent.chat(prompt)
report = await response.text()

Expand Down