How google/mantis works
Mantis is an ADK-based harness for autonomous, human-reviewed security research. Its main workflow accepts a file or repository and optional focus, plans and executes agent research, records findings, then supports verification, remediation, and reporting. The README also describes history review, semantic navigation, threat modeling, exploit chaining, iteration learning, and secure-development advice. Relationships shown from source are limited by partial excerpts; other capability links use the README’s documented workflow rather than implying unsampled calls.
Main entry points: main.py Campaign orchestrator · research_tools.py Research agents and tools · launch.py Campaign launcher · synthesizer.py Graph synthesis
Components 22
Campaign entry
- Campaign launcher
reference/scripts/launch.py - Campaign orchestrator
reference/main.py - Configuration
reference/core/config.py
Research planning
- Code survey
reference/core/surveyor.py - Research planner
reference/core/planner.py - Graph synthesis
reference/core/synthesizer.py - Agent graph loader
reference/core/graph_loader.py
Agent execution
- Research agents and tools
reference/tools/research_tools.py - LLM gateway
reference/core/llm_gateway.py - Sandbox tools
reference/tools/sandbox_tools.py - Execution environments
reference/core/environments - Run context
reference/core/context.py
Finding validation
- Evidence capture
reference/core/evidence.py - Finding store
reference/core/database.py - Finding deduplication
reference/core/database.py - Vulnerability correlation
reference/core/correlator.py - Risk calibration
reference/core/cost.py
Remediation and learning
- Patch and verification
reference/tools/sandbox_tools.py - Reports and SARIF
reference/core/sarif.py - Iteration memory
reference/core/memory.py - Secure-development advice
reference/scripts/advise.py
Other components
- Operator
Connections 22
- Operator → Campaign launcher: starts campaign
- Campaign launcher → Campaign orchestrator: launches
reference/scripts/launch.py - Campaign orchestrator → Configuration: loads settings
reference/main.py - Campaign orchestrator → Code survey: surveys target
reference/main.py - Campaign orchestrator → Research planner: plans research
reference/main.py - Campaign orchestrator → Graph synthesis: synthesizes graph
reference/main.py - Graph synthesis → Agent graph loader: loads topology
reference/core/synthesizer.py - Campaign orchestrator → Agent graph loader: loads agents
reference/main.py - Campaign orchestrator → Research agents and tools: runs research
reference/main.py - Research agents and tools → LLM gateway: requests analysis
reference/tools/research_tools.py - Research agents and tools → Finding store: records findings
reference/tools/research_tools.py - Research agents and tools → Sandbox tools: requests execution
reference/tools/__init__.py - Sandbox tools → Execution environments: executes in
reference/tools/sandbox_tools.py - Execution environments → Run context: uses active context
reference/core/environments/base.py - Campaign orchestrator → Evidence capture: verifies findings
reference/main.py - Campaign orchestrator → Finding deduplication: deduplicates findings
reference/main.py - Campaign orchestrator → Vulnerability correlation: builds exploit chains
reference/main.py - Campaign orchestrator → Risk calibration: calibrates severity
reference/main.py - Campaign orchestrator → Patch and verification: patches and verifies
- Campaign orchestrator → Reports and SARIF: produces reports
reference/main.py - Campaign orchestrator → Iteration memory: reflects learnings
reference/main.py - Operator → Secure-development advice: requests advice