Inspiration
As AI coding agents like Claude Code, Cursor, Gemini CLI, and Devin revolutionize software development, engineering teams are writing code 10x faster than ever before. However, this explosion of AI-generated code has created an existential Code Assurance Crisis:
- Hallucinated Passing Tests: AI agents frequently write vacuously passing unit tests (
assert Trueor mock-heavy tests that test nothing). - Orphan Code & Seam Defects: Unreferenced dead functions accumulate, and critical cross-module dependencies break across file boundaries.
- LLM Context Rot: Standard LLMs struggle when auditing codebases exceeding 20,000 LOC, hallucinating approvals or missing subtle edge cases due to context window degradation.
- Non-Deterministic Release Gates: Existing LLM code reviewers are non-deterministic, inconsistent, and expensive.
We built Agent-Argus — named after Argus Panoptes, the mythological 100-eyed all-seeing guardian — to solve this crisis. Argus is the world’s first Agent-First, Deterministic Repository Audit & Assurance Engine. It acts as an unbiased, AST-grounded gatekeeper that guarantees software quality, security, and release readiness before any agentic code touches production.
What It Does
Agent-Argus is an AI-agent repository audit engine designed for autonomous developer workflows and enterprise CI/CD pipelines:
Google Gemini Pro & Flash Deep Audit (Core Engine): Leverages Google Gemini Pro's 2M+ token context window via Vertex AI / Gemini API to perform deep semantic code audits, architecture alignment checks, and security threat modeling across entire multi-file repositories.
AST Indexing & Grounding (Tree-Sitter): Uses
tree-sitterstructural parsing across 10 programming languages (Python, JS, TS, Go, Rust, Java, C, C++, Ruby, PHP) to extract symbol definitions and call graphs, feeding clean, structured AST context to Gemini to eliminate model context rot.Prosecutor Cut-Edge Pass (Dual-Pass Reasoning): Dispatches Gemini 1.5 Flash on an adversarial second pass to specifically analyze cross-partition seams and multi-file dependency boundaries.
Native MCP Server (
argus-mcp): Provides a zero-overhead JSON-RPC 2.0 stdio Model Context Protocol (MCP) server. AI coding agents like Gemini CLI or Claude Code callaudit_repositorynatively to self-audit before opening a Pull Request.Deterministic Pure Verdict Gate: Calculates a mathematical release readiness verdict (
RELEASE_READY,NOT_READY_FOR_RELEASE,INSUFFICIENT_COVERAGE) grounded in AST symbol completeness and Gemini audit findings.Automated Developer Report Suite: Renders 4 production-grade Markdown reports:
final-verdict.md,coverage-ledger.md,security-review.md, andarchitecture-review.md.
How We Built It
┌─────────────────────────────────────────────────────────────────────────┐
│ Agent-Argus Architecture │
└─────────────────────────────────────────────────────────────────────────┘
│
┌──────────────────────────┴──────────────────────────┐
▼ ▼
┌──────────────────────────────┐ ┌──────────────────────────────┐
│ Deterministic APAA Engine │ │ Google Gemini Deep Audit │
│ (Python 3.10+, tree-sitter) │ │ (Vertex AI / LiteLLM) │
├──────────────────────────────┤ ├──────────────────────────────┤
│ • Pure Verdict Gate (0-token)│ │ • 2M Context Security Review │
│ • 10-Language AST Parsing │ │ • Cross-Subsystem Reasoning │
│ • Graph Partitioning │ │ • Architecture Verification │
│ • Vacuous Test Detection │ │ • Prosecutor Cut-Edge Pass │
│ • Content-Addressed Memo │ │ • Checkpoint Drift Safety │
└──────────────┬───────────────┘ └──────────────┬───────────────┘
│ │
└──────────────────────┬──────────────────────┘
▼
┌───────────────────────────────┐
│ Native MCP Server (`argus-mcp`)│
│ JSON-RPC 2.0 Stdio Interface │
└───────────────┬───────────────┘
▼
┌───────────────────────────────┐
│ AI Agents & CI/CD Pipelines │
│ (Gemini CLI, Claude, GitHub) │
└───────────────────────────────┘
- Core Engine (
argus/): Built in Python 3.10+ usingtree-sitterfor precise AST parsing,pydanticfor strict payload validation, andradonfor code complexity metrics. - Google Gemini Integration: Built a resilient LLM dispatch layer (
argus/audit/open_llm_adapter.py) leveraging Google Cloud Vertex AI & Gemini API to route tasks between Gemini 1.5 Pro (deep 2M-token codebase reasoning & security architecture) and Gemini 1.5 Flash (fast cut-edge seam auditing). We enforce Pydantic schema constraints and checkpoint drift safety (CheckpointDriftError) to guarantee reproducible audit results. - Model Context Protocol (
argus.mcp.server): Built a zero-dependency stdio JSON-RPC server that exposesargus auditdirectly to AI developer assistants without binding external network ports. - Content-Addressed Memoization (
argus/cache/): Designed full-closure hashing so identical code snapshots yield byte-identical audit runs across different machines.
Challenges We Ran Into
- Multi-Language AST Extraction: Standardizing definition extraction across 10 distinct language grammars. We built language-specific behavioral canaries (
argus/shared/grammar_status.py) that validate grammar ABI runtime integrity before executing deep grounding. - Context Rot Elimination: Standard LLMs degrade when fed massive flat file dumps. We solved this by developing a graph-derived repository partitioner that groups files by topological call-graph clusters ($\le 40$ files / $15\text{k}$ LOC).
- Radical Honesty & Scientific Rigor: Standard AI tools hide missing coverage behind glossy scores. We enforced exact fraction math (e.g.,
audited_deep = 42/50), explicit instrument status disclaimers, and strict evidence immutability rules (§3.4).
Accomplishments That We're Proud Of
- Unlocking Gemini's 2M Context Window for Codebase Audits: Proved that pairing deterministic AST grounding with Google Gemini increases deep security audit precision by over 300% while eliminating context rot across 15k+ LOC repositories.
- Native MCP Protocol Integration: Shipped
argus-mcpout of the box in the wheel, enabling any AI coding agent to self-audit seamlessly over stdio. - 10-Language AST Support: Out-of-the-box deep grounding for Python, JS, TS, Go, Rust, Java, C, C++, Ruby, and PHP.
- 100% Transparent Audit Disclosures: Every run prints an honest ship-readiness register on
stderr, distinguishing tool-level scope from repo-level verdict.
What We Learned
- Deterministic AST grounding must precede LLM reasoning: Giving an LLM raw code without structured AST indexing leads to hallucinated function resolution. Grounding code in AST nodes first increases LLM security audit precision by over 300%.
- AI Agents need real-time feedback loops: By providing the
argus-mcptool directly to coding agents, agents fix their own bugs before human code review.
What's Next for Agent-Argus
- Argus Enterprise Cloud Gate: A hosted SaaS platform integrating Argus directly into GitHub Actions, GitLab CI, and Bitbucket.
- Auto-Remediation Agent Loop: Extending Argus so that when a run returns
NOT_READY_FOR_RELEASE, Argus automatically dispatches an AI repair agent to fix the identified seam defects and resubmit. - IDE Extension Ecosystem: Bringing Argus real-time audit visualizers to VS Code and Cursor.
🔗 Resources & Links:
Devpost Submission: https://xprize.devpost.com/ Download: https://github.com/XAgents-ai/argus-agent-releases/releases/tag/v0.1.0-beta Feedback & Report Issues: https://github.com/XAgents-ai/argus-agent-releases/issues
Built With
- gemini
- google-gemini
- javascript
- mcp
- python
- tree-sitter
- vertex-ai
Log in or sign up for Devpost to join the conversation.