GraFlag Documentation
Distributed benchmarking framework for Graph Anomaly Detection.
GraFlag runs graph anomaly detection (GAD) methods on a Docker Swarm cluster
and collects their results in one standard form. Each method is a
containerised image built from a pinned upstream commit, each experiment is a
one-shot Swarm service that writes its scores to shared NFS storage, and
graflag evaluate computes the same metrics and plots for every method.
The distribution ships 33 methods – 17 PyGOD detectors on one shared image
and 16 dedicated integrations – and 43 dataset descriptors whose files are
downloaded on first use. Everything is driven from the client machine,
through a CLI, a Python API, a web dashboard or, for AI agents, an MCP server;
graflag verify checks that a run’s published scores reproduce the AUC the
method reported, and an agent skill lets coding agents integrate new methods
under the same checks.
Integrating Methods
- GraFlag Method Integration Guide
- Overview
- Directory Structure
- Step 1: Create
.envConfiguration File - Step 2: Create Dockerfile
- Step 3: Create Training Wrapper (
train_graflag.py) - Step 4: Check the Contract, Then Test Locally (Optional)
- Step 5: Deploy to GraFlag Cluster
- Advanced Features
- Troubleshooting
- Best Practices
- Quick Reference
- Complete Checklist
- Example: Complete Integration (Minimal)
- Resources
- Graph Anomaly Detection Result Types
- AI Agent Instructions: GraFlag Method Integration
- Quick Reference
- Two Integration Patterns
- Integration Checklist
- File 1:
.envConfiguration - File 2:
Dockerfile - File 3:
train_graflag.py - File 4: Dataset Directory (only for a new dataset)
- Result Types Reference
- Common Errors and Fixes
- Testing Commands
- Agent Prompt Template
- Example: Complete GADY Integration
- Example: bond_cola Integration (a shared image)
- Summary
- Method Integration Skill
Internals