Multiple agents. One verdict. Zero blind spots.
Project description
xFire is an AI-powered multi-agent security review tool. Three independent AI agents — Claude, Codex, and Gemini — each review your code blind, then argue about it under structured adversarial cross-examination. Only vulnerabilities that survive the debate make the final report.
How It Works
+-----------+ +-----------+ +-----------+
| Claude | | Codex | | Gemini |
+-----+-----+ +-----+-----+ +-----+-----+
| | |
PR / Repo | blind review (parallel) |
| +--------+--------+--------+--------+
v |
+-------------+ +-----------+ v +-------------+ +-----------+
| Context |-->| Intent |-->[ Findings ]-| Adversarial |-->| Verdict |
| Building | | Inference | [ Synthesis] | Debate | | & Report |
+-------------+ +-----------+ +-------------+ +-----------+
Stage by stage: Context building gathers the diff, dependencies, and repo structure. Intent inference figures out what the code is supposed to do. Three agents review independently — no agent sees another's output. The synthesis layer clusters and cross-validates findings. Disputed findings enter an adversarial debate: prosecutor, defense, judge. The consensus algorithm weighs evidence quality, unanimity, and purpose-aware overrides to produce a final verdict.
For the full architectural deep dive, see docs/architecture.md.
Why xFire
| No SAST, no rules engine | Agents read and reason about code, not pattern-match |
| Purpose-aware | Intent inference understands what the repo is supposed to do — intended capabilities with proper controls are never flagged |
| Three independent reviewers | Claude, Codex, and Gemini review in isolation; blind spots from one are caught by another |
| Adversarial debate | Every disputed finding goes through prosecutor → defense → judge cross-examination |
| Three pipelines | Whole-repo audit, GitHub PR diff review, or continuous baseline-aware delta scanning |
| Live terminal UI | Animated phase spinners, per-agent status, live debate chat streaming |
Installation
Requires Python 3.11+.
pip install xfire
Or from source:
git clone https://github.com/Har1sh-k/xfire
cd xfire
pip install -e ".[dev]"
You need at least one agent CLI or API key:
| Agent | CLI | API key env |
|---|---|---|
| Claude | claude.ai/code | ANTHROPIC_API_KEY |
| Codex | github.com/openai/codex | OPENAI_API_KEY |
| Gemini | ai.google.dev | GOOGLE_API_KEY |
Quick Start
# Initialize config
xfire init
# Verify agents are reachable
xfire test-llm
# Audit the whole repo
xfire code-review .
# Review a GitHub PR
xfire analyze-pr --repo owner/repo --pr 123 --github-token $GITHUB_TOKEN
# Baseline-aware delta scan
xfire scan . --since-last-scan
# Stream live debate chat as each agent responds
xfire code-review . --debate
# Full debug trace + markdown log
xfire code-review . --debug
# Play synthetic UI demo (no LLM calls)
xfire demo --ui
Configuration
Run xfire init to generate .xfire/config.yaml. The key settings:
agents:
claude:
enabled: true
mode: cli # cli | api
codex:
enabled: true
mode: cli
gemini:
enabled: true
mode: cli
severity_gate:
fail_on: high # minimum severity to fail CI
min_confidence: 0.7
Full config reference: docs/architecture.md
CI/CD Integration
Stateless PR Review
- name: xFire security review
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
pip install xfire
xfire analyze-pr \
--repo ${{ github.repository }} \
--pr ${{ github.event.pull_request.number }} \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--format sarif --output xfire.sarif --post-comment
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: xfire.sarif
Baseline-Aware Scan (recommended for main)
- name: Restore xFire baseline
uses: actions/cache@v4
with:
path: .xfire/baseline/
key: xfire-baseline-${{ github.ref_name }}
- name: xFire baseline scan
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
pip install xfire
xfire scan . --since-last-scan --format sarif --output xfire.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: xfire.sarif
- name: Save xFire baseline
uses: actions/cache/save@v4
with:
path: .xfire/baseline/
key: xfire-baseline-${{ github.ref_name }}
Development
make setup # install with dev dependencies
make test # run all tests
make test-unit # unit tests only
make lint # lint + type-check
make format # auto-fix formatting
make demo # run synthetic UI demo (no LLM calls)
Documentation
| Doc | What it covers |
|---|---|
| Architecture | Full pipeline diagrams, component inventory, call graphs, data models, config flow |
| Debate Engine | Role assignment, debate flow, silent dissent, budget tiers, consensus algorithm, evidence scoring |
| Review Methodology | How agents review code, purpose-aware decision framework |
| Prompting Strategy | Prompt design philosophy, debate prompt structure |
| Finding Schema | Finding model, 50 categories, evidence requirements, debate routing |
| Threat Model | What xFire detects, prompt injection guardrails, trust model |
| Evaluation Plan | Test fixtures, precision/recall metrics |
License
GNU General Public License v3.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xfire-0.1.3.tar.gz.
File metadata
- Download URL: xfire-0.1.3.tar.gz
- Upload date:
- Size: 240.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bc7a15075f9dc208dbe28ae7ac6033b2861ae479b534aefee4107b3dd06c9ea
|
|
| MD5 |
5e6279a62138bc6b8571511e77abf4f3
|
|
| BLAKE2b-256 |
d29d65a46816d0ccb832c83951282d7686e38fb607f9c83b56b9ab150b67157e
|
File details
Details for the file xfire-0.1.3-py3-none-any.whl.
File metadata
- Download URL: xfire-0.1.3-py3-none-any.whl
- Upload date:
- Size: 163.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fe1d7294301e314bf720fdff878bb356fdbc19b9339106a36b486b7d5612f78
|
|
| MD5 |
69448658a436c89aedfe59391ce6c70c
|
|
| BLAKE2b-256 |
ae5efa84b1fef47aed0de43409d68d06cc3cefc838401e20e12666415079c491
|