Know what breaks before you merge.
Blast Radius AI is a multi-agent GitHub App that automatically analyzes every pull request and commit to map the full blast radius of any code change β which files will break, which functions will degrade, and which areas are safe β before a single line reaches production.
YOUTUBE LINK: https://youtu.be/3JxaJCqRF9o?si=QCyJq2kiULnH_a66
In a team codebase, a single renamed function, a changed API response shape, or a shifted database field can silently cascade into dozens of broken files. Code reviewers catch the change β they rarely catch the downstream impact. Teams ship, something breaks in production, and nobody knew it was coming.
Blast Radius AI solves this at the PR level, before merge.
- Intercepts every PR via a GitHub App webhook the moment it's opened or updated
- Reads the diff and understands semantically what changed β not just line diffs, but what the change means (function renamed, API shape changed, field removed)
- Scans the entire codebase to find every file that imports, calls, or depends on the changed entity
- Classifies each impact as HIGH (will break), MEDIUM (may degrade silently), or LOW (minor effect)
- Posts a blast radius report as a PR comment for the reviewer to see inline
- Builds persistent agent memory β a growing knowledge base of fragile areas, high-risk functions, and past findings, committed to git after every analysis
- Provides a real-time dashboard β a live feed of every analyzed PR, a codebase risk map, and the agent's full memory
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GitHub β
β β
β Developer opens PR βββΊ GitHub App Webhook βββΊ FastAPI β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LangGraph Pipeline β
β β
β βββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ β
β β Agent 1 β β Agent 2 β β Agent 3 β β
β β Diff Reader βββββΊβ Impact Scanner βββββΊβ Reporter β β
β β β β β β β β
β β β’ Fetch PR β β β’ Read memory β β β’ Write report β β
β β diff β β β’ Clone repo β β β’ Post PR commentβ β
β β β’ Identify β β β’ Search for β β β’ Update memory β β
β β semantic β β usages β β β’ Commit to git β β
β β change β β β’ LLM evaluate β β β β
β β β’ Extract β β each hit β β β β
β β search β β β’ Score severity β β β β
β β terms β β β β β β
β βββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ β
β β β β β
β ββββββββββββββββββββββ΄ββββββββββββββββββββββββ β
β Shared BlastRadiusState β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Storage Layer β
β β
β SQLite DB βββΊ Analysis results, impacted files, severity β
β Git Repo βββΊ .gitagent/memory/ committed after each PR β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Next.js Dashboard β
β β
β PR Analysis Feed β Codebase Risk Map β Agent Memory Viewer β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The core of Blast Radius AI is a 3-agent LangGraph pipeline. Each agent has a dedicated role, a SOUL.md system prompt, and its own set of tools.
Role: Understand what semantically changed, not just which lines changed.
- Fetches the raw unified diff from GitHub
- Lists all changed files
- Sends diff + file list to LLaMA 3.3 70B with a structured prompt
- Returns a JSON object describing the semantic change:
{
"change_type": "function_signature",
"entity_name": "processPayment",
"file": "services/payment.py",
"before": "processPayment(amount, currency)",
"after": "processPayment(amount, currency, idempotency_key)",
"search_terms": ["processPayment", "process_payment"],
"risk_level": "HIGH",
"summary": "Added required idempotency_key param to processPayment"
}Role: Find every file in the codebase that will be affected by this change.
- Reads
.gitagent/memory/to get known fragile areas and high-risk functions - Clones the repo locally (cached per session) using the GitHub App installation token
- Searches the entire codebase for each
search_termusing pure Python (os.walk+re.compile) - For each match found, asks the LLM: "Given this change, will this specific usage break?"
- Classifies each impacted file as HIGH / MEDIUM / LOW with a reason
Role: Format findings, communicate them, and persist learned knowledge.
- Builds a structured markdown blast radius report
- Posts it as a PR comment on GitHub so reviewers see it inline
- Updates
.gitagent/memory/high_risk_functions.mdandfragile_areas.md - Appends a timestamped entry to
past_findings.md - Commits all memory updates to git β giving a full audit trail
START
β
βΌ
node_diff_reader
β Outputs: diff_content, semantic_change
βΌ
node_impact_scanner
β Outputs: impacted_files[]
βΌ
node_reporter
β Outputs: report, severity, impact_count
βΌ
node_save βββΊ SQLite βββΊ Dashboard
β
END
This project is built on the GitAgent protocol β a standard for git-native AI agents where behavior, memory, and tools live inside the repository itself.
backend/
βββ .gitagent/
βββ agent1/
β βββ SOUL.md β System prompt: "You are a code change analyst..."
β βββ SKILL.md β Tool descriptions: fetch_diff, list_pr_files
β βββ agent.yaml β Model config: llama-3.3-70b-versatile, temp=0
βββ agent2/
β βββ SOUL.md β System prompt: "You are a dependency detective..."
β βββ SKILL.md β Tool descriptions: search_codebase, read_memory
β βββ agent.yaml
βββ agent3/
β βββ SOUL.md β System prompt: "You are a technical communicator..."
β βββ SKILL.md β Tool descriptions: post_pr_comment, update_memory
β βββ agent.yaml
βββ memory/
βββ {repo_owner}_{repo_name}/
βββ high_risk_functions.md β Grows with every PR
βββ fragile_areas.md
βββ past_findings.md
Why this matters: The agent's memory is not stored in a database β it lives inside the git repository as markdown files. Every time the agent learns something new about a codebase, it commits that knowledge. You get a full history of what the agent learned and when, just by running git log .gitagent/memory/.
| Layer | Technology | Purpose |
|---|---|---|
| LLM | Groq β LLaMA 3.3 70B Versatile | All three agent reasoning tasks |
| Agent Framework | LangGraph + LangChain | Multi-agent state machine, tool calling |
| Backend | FastAPI + Python | Webhook handler, REST API, async pipeline |
| GitHub Integration | GitHub App (JWT + Installation Tokens) | Webhook events, diff fetch, PR comments |
| Agent Protocol | GitAgent (SOUL.md / SKILL.md / agent.yaml) | Git-native agent identity and memory |
| Codebase Search | Pure Python (os.walk + re.compile) | Cross-platform file search, no grep needed |
| Database | SQLite | Analysis result persistence |
| Frontend | Next.js 15 (App Router) | Real-time dashboard with 5s polling |
| Deployment | Railway (backend) + Vercel (frontend) | Cloud hosting |
BlastRadius/
βββ backend/
β βββ main.py # FastAPI app, webhook handler, scan endpoints
β βββ pipeline.py # LangGraph StateGraph β 4-node pipeline
β βββ database.py # SQLite init, save/query analysis results
β βββ agents/
β β βββ diff_reader.py # Agent 1
β β βββ impact_scanner.py # Agent 2
β β βββ reporter.py # Agent 3
β βββ tools/
β β βββ github_tools.py # fetch_diff, post_pr_comment, list_pr_files
β β βββ search_tools.py # Codebase cloning + file search
β β βββ memory_tools.py # Read/write/commit .gitagent/memory/
β βββ .gitagent/
β β βββ agent1/SOUL.md
β β βββ agent2/SOUL.md
β β βββ agent3/SOUL.md
β β βββ memory/ # Committed after every PR analysis
β βββ requirements.txt
β βββ .env # Local only β never committed
β
βββ frontend/
βββ app/
β βββ layout.tsx # Root layout + sticky nav
β βββ NavBar.tsx # Client component nav with active state
β βββ page.tsx # PR Analysis Feed
β βββ globals.css # Design system (CSS custom properties)
β βββ risk-map/
β β βββ page.tsx # Codebase risk map by file
β βββ memory/
β βββ page.tsx # Agent memory viewer
βββ package.json
βββ .env.local # Local only β never committed
- Python 3.10+
- Node.js 18+
- A Groq API key
- A GitHub App (see setup below)
- ngrok for local webhook testing
git clone https://github.com/your-username/blast-radius-ai.git
cd blast-radius-ai
# Backend
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Frontend
cd ../frontend
npm install# backend/.env
GITHUB_APP_ID=your_app_id
GITHUB_PRIVATE_KEY_PATH=./your-key.pem
GITHUB_WEBHOOK_SECRET=your_webhook_secret
GROQ_API_KEY=your_groq_key
# frontend/.env.local
NEXT_PUBLIC_API_URL=http://localhost:8000- Go to GitHub Settings β Developer Settings β GitHub Apps β New GitHub App
- Set permissions:
Pull requests(Read & Write),Contents(Read) - Subscribe to events:
Pull request,Installation - Set webhook URL to your ngrok URL +
/webhook - Download the private key
.pemfile and place it inbackend/
# Terminal 1 β expose localhost to GitHub
ngrok http 8000
# Terminal 2 β backend
cd backend
uvicorn main:app --reload --port 8000
# Terminal 3 β frontend
cd frontend
npm run devOpen http://localhost:3000 β the dashboard is live.
Install your GitHub App on any repo, then either:
- Open a pull request β analysis runs automatically
- Use the "Scan Existing Repo" button on the dashboard β analyzes recent commits/PRs retroactively
| Variable | Where | Description |
|---|---|---|
GITHUB_APP_ID |
backend | Your GitHub App's numeric ID |
GITHUB_PRIVATE_KEY |
backend (cloud) | Full contents of the .pem file |
GITHUB_PRIVATE_KEY_PATH |
backend (local) | Path to the .pem file |
GITHUB_WEBHOOK_SECRET |
backend | Secret set in GitHub App settings |
GROQ_API_KEY |
backend | From console.groq.com |
NEXT_PUBLIC_API_URL |
frontend | URL of the deployed backend |
| Method | Endpoint | Description |
|---|---|---|
POST |
/webhook |
GitHub App webhook receiver |
GET |
/api/analyses |
All PR analyses (used by dashboard feed) |
GET |
/api/analyses/{owner}/{repo}/{pr} |
Single PR analysis |
GET |
/api/risk-map/{owner}/{repo} |
File risk scores for a repo |
GET |
/api/memory/{owner}/{repo} |
Agent memory files for a repo |
POST |
/api/scan |
Trigger retroactive scan { repo_name, limit } |
- New Project β Deploy from GitHub β root directory:
backend - Set all env vars in Railway dashboard (use
GITHUB_PRIVATE_KEYwith full.pemcontents) - Copy the Railway URL
- New Project β Import repo β root directory:
frontend - Add
NEXT_PUBLIC_API_URL= your Railway URL - Deploy
Go to your GitHub App settings and update the Webhook URL from your ngrok address to:
https://your-railway-app.up.railway.app/webhook
The Next.js frontend polls the backend every 5 seconds β no WebSocket setup needed. As soon as the agent pipeline completes for a PR, the result appears automatically in the feed.
Three views:
- PR Analysis Feed β every analyzed PR with severity, impact count, semantic summary, and a drill-down modal showing the full breakdown by file
- Codebase Risk Map β all files in a repo ranked by cumulative blast radius score across all PRs. Files that appear repeatedly in impacts rise to the top
- Agent Memory β the live contents of
.gitagent/memory/, showing what the agent has learned about fragile areas, high-risk functions, and past findings
This project implements the GitAgent protocol β a standard for building AI agents whose identity, instructions, and memory live natively in git.
Each agent in this system has:
- A SOUL.md β the system prompt defining who the agent is and how it thinks
- A SKILL.md β descriptions of the tools the agent can use
- An agent.yaml β model configuration (model name, temperature, max tokens)
The agent memory is stored in .gitagent/memory/ and committed to the repository after every PR analysis, making the agent's learned knowledge versioned, auditable, and portable.
Built for the GitAgent Builder Challenge.