The Python Governance Platform for AI Agents โ 80 policy rules, per-tool interception, HITL, FinOps, A2A, vendor concentration, determinism.
Project description
Drako ๐
Scan before you ship. Govern after you deploy.
Scans your codebase, scores your governance posture, flags what's reachable,
connects findings to known advisories. Free, offline, no account required.
Full runtime enforcement when you're ready.
pip install drako && drako scan .
Scan
โโ Drako Scan โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ my-project โ crewai 0.86.0 โ 0.4s โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Agent BOM: 3 agents โ 12 tools โ 2 models โ 4 prompts
GOVERNANCE: 42/100 [D] โฐโฐโฐโฐโฐโฐโฐโฐโฑโฑโฑโฑโฑโฑโฑโฑโฑโฑโฑโฑ 42%
DETERMINISM: 34/100 [F] โฐโฐโฐโฐโฐโฐโฐโฑโฑโฑโฑโฑโฑโฑโฑโฑโฑโฑโฑโฑ 34%
Better than 28% of scanned projects
CRITICAL 3 โ HIGH 5 โ MEDIUM 4 โ LOW 2
SEC-001 API key hardcoded in source (src/main.py)
โ REACHABLE โ used by agent 'researcher'
Related: DRAKO-ABSS-2026-003
Impact: Attacker inherits all agent permissions
Ref: CWE-798, OWASP LLM06
SEC-005 Arbitrary code execution in tool (tools/runner.py)
โ UNREACHABLE โ no agent references this tool
DET-001 LLM temperature not set (agents/writer.py)
Impact: Non-deterministic outputs between runs
Two scores, two audiences. Governance speaks to security teams: are your agents safe? Determinism speaks to engineers: will they behave the same way twice?
Reachability separates real risks from theoretical ones โ a dangerous tool that no agent actually uses is dimmed, not screamed at you.
drako scan . # Full scan, both scores
drako scan --details # Code snippets + fix suggestions
drako scan --benchmark # Compare against 100 scanned projects
drako scan --baseline # Acknowledge existing issues, only show new ones
drako scan --format sarif # GitHub Code Scanning
drako scan --fail-on critical # CI gate
drako scan --share # Generate shareable score card
drako fix --dry-run # Preview auto-fixes
drako scan --diff HEAD~1 # Only scan changed files
drako history # view policy snapshot history
drako diff v2 v3 # compare policy versions
drako rollback v2 # restore previous policy
Agent BOM
Standalone inventory. No runtime, no network, pure AST.
drako bom .
Agents 3 researcher, writer, reviewer
Tools 12 web_search, file_reader, code_runner, ...
Models 2 gpt-4o, claude-sonnet-4-20250514
MCP 1 server (filesystem)
Prompts 4 system prompts (content hashed, not exposed)
Perms filesystem, network, code_execution
Framework crewai 0.86.0
Vendors OpenAI (model), Anthropic (model)
Output formats: --format text (default) ยท json ยท markdown
Rules
80 deterministic rules across 16 categories. No LLM in the evaluation loop. Same code, same result, every time. Full rule reference โ
| Category | Rules | What it catches |
|---|---|---|
| Security | SEC-001 โ SEC-011 | Hardcoded keys, prompt injection, code execution, filesystem/network access |
| Governance | GOV-001 โ GOV-011 | No audit logging, no HITL, self-modifying prompts, no fallback |
| Compliance | COM-001 โ COM-005 | EU AI Act Art. 9, 11, 12, 14 gaps |
| Determinism | DET-001 โ DET-007 | Temperature not set, no timeout, no retry, no iteration limit, no seed |
| Vendor Concentration | VCR-001 โ VCR-003 | Same vendor across model + framework + cloud + governance layers |
| Framework-Specific | FW-001 โ FW-010 | CrewAI delegation risks, AutoGen code exec defaults, LangGraph state issues |
| Operational Boundaries | ODD-001 โ ODD-004 | No boundary definition, unrestricted tools, no spend cap |
| Magnitude | MAG-001 โ MAG-003 | No spend cap, no rate limit, unclassified data access |
| Identity | ID-001 โ ID-003 | Static credentials, shared credentials, no identity |
| Multi-Agent | MULTI-001 โ MULTI-004 | No topology, circular deps, no conflict protection |
| Hooks | HOOK-001 โ HOOK-003 | No pre-action validation, no session-end gate |
| Versioning | CV-001 โ CV-002 | No policy versioning, no audit policy reference |
| FinOps | FIN-001 โ FIN-003 | No cost tracking, single model for all tasks, no cache |
| Resilience | RES-001 โ RES-002 | No fallback for critical ops, no state preservation |
| A2A | A2A-001 โ A2A-003 | No A2A auth, unvalidated inter-agent input |
| Best Practices | BP-001 โ BP-005 | Outdated framework, no tests, too many tools |
Vendor Concentration rules detect when your model, framework, and governance stack come from the same vendor โ flagging audit independence risk that vendor-affiliated tools have no incentive to report.
Framework-Specific rules detect known governance gaps in the frameworks you use, including default configurations that ship insecure.
Scoring: start at 100, deduct per finding with caps per category. Grades: A (90-100) ยท B (75-89) ยท C (60-74) ยท D (40-59) ยท F (0-39)
Advisories
Drako ships with 25 security advisories in the DRAKO-ABSS format (Agent Behavioral Security Standard) โ covering OWASP Top 10 for LLMs, MITRE ATLAS techniques, and real CVEs from CrewAI, LangChain, and AutoGen.
Advisories appear inline in scan findings:
SEC-007 Prompt injection vulnerability (agents/researcher.py)
Related: DRAKO-ABSS-2026-001 โ System Prompt Extraction
Ref: OWASP LLM01:2025, MITRE AML.T0051
Each advisory includes: affected configurations, IOC pattern hashes for runtime matching, taint paths, and remediation mapped to Drako rules.
๐ Browse advisories โ ยท ABSS format spec โ
Baseline
Existing projects get 40+ findings on first scan. The baseline lets teams acknowledge known issues and focus only on new ones.
drako scan . --baseline # save current state
drako scan . # only NEW findings from now on
drako baseline show # what's baselined
drako baseline reset # start fresh
- Score always reflects all findings โ real posture, not a filtered view
- CI pass/fail is based on new findings only
- SARIF marks baselined findings as
"baselineState": "unchanged" - Baseline file commits to your repo โ shared across the team
Configure
drako init # generate .drako.yaml from your scan
# .drako.yaml โ pre-filled with YOUR agents and tools
governance_level: autopilot # autopilot | balanced | strict
agents:
researcher:
source: agents/researcher.py
tools:
web_search:
type: read
code_runner:
type: execute # โ flagged CRITICAL by scan
policies:
odd:
researcher:
permitted_tools: [web_search, file_reader]
forbidden_tools: [code_runner]
dlp:
mode: enforce
circuit_breaker:
failure_threshold: 5
hitl:
triggers:
tool_types: [write, execute, payment]
spend_above_usd: 100.00
Autopilot reads your scan, generates the config, starts in audit mode. When ready: drako upgrade --balanced enables enforcement.
Industry templates: drako init --template fintech ยท healthcare ยท eu-ai-act ยท startup ยท enterprise
๐ Full config reference โ ยท Policy templates โ
Runtime Enforcement
One line to protect agents in production:
from drako import govern
crew = govern(crew) # every tool call passes through enforcement
Every tool call goes through a 13-stage pipeline before executing. If a tool is forbidden, carries PII, exceeds spend caps, matches a known threat, or needs human approval โ blocked before it runs.
Key capabilities
- ๐ DLP โ Presidio-based PII/PCI scanning. Critical PII blocked before reaching downstream APIs.
- ๐ค Human-in-the-Loop โ Agent pauses on high-risk actions, escalates to human. Configurable triggers. EU AI Act Art. 14.
- โก Circuit Breaker โ Per-agent AND per-tool. One failing tool doesn't kill the whole agent.
- ๐ Audit Trail โ SHA-256 hash chain with Ed25519 signatures. Tamper-evident, exportable, regulator-ready.
- ๐ Collective Intelligence โ Anonymous IOC sharing across deployments. One detection protects everyone. Sub-5s propagation.
๐ Full runtime docs โ โ covers all 20 capabilities including Trust Score, Intent Fingerprinting, ODD Enforcement, Magnitude Limits, FinOps, Secure A2A, Topology Monitoring, Chaos Engineering, Observability, Alerting, and OTEL/SIEM Export.
Out-of-process proxy
Zero code changes. The agent can't bypass what doesn't run in its process.
drako proxy start
export OPENAI_BASE_URL=http://localhost:8990/openai/v1
๐ Proxy docs โ ยท Docker + Helm โ
Autopilot Mode
Zero-config governance. One command, smart defaults from your scan.
drako init # autopilot (default) โ audit-first
drako init --balanced # enforcement active with escape hatches
drako init --strict # maximum governance for enterprise
drako init --manual # full YAML with all sections
drako init --template fintech # start from industry template
Autopilot analyzes your project and generates a .drako.yaml pre-configured with:
- ODD: Each agent locked to its discovered tools
- DLP: Audit mode (logging PII, not blocking yet)
- Circuit Breaker: Threshold 5 failures / 60s window
- HITL: Active for write/execute tools (auto-allow on timeout)
- FinOps: Cost tracking enabled
Everything starts in audit mode. When you're ready for enforcement:
drako upgrade --balanced # DLP enforce, ODD enforce, HITL reject on timeout
drako upgrade --strict # + intent verification, cryptographic audit, magnitude enforce
CI/CD
GitHub Action
The Drako GitHub Action posts inline PR comments on the exact lines where issues are found, uploads SARIF to Code Scanning, and gates merges on governance score.
# .github/workflows/drako.yml
name: Drako Governance
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: "3.12" }
- run: pip install drako
- run: drako scan . --format sarif > results.sarif
- run: drako scan . --fail-on critical --threshold 70
- uses: github/codeql-action/upload-sarif@v3
with: { sarif_file: results.sarif }
if: always()
Pre-commit hook
# .pre-commit-config.yaml
- repo: https://github.com/angelnicolasc/drako
hooks:
- id: drako-scan
Ecosystem Ratings
Drako scans popular frameworks, MCP servers, and open-source projects โ and publishes the results.
- ๐ Framework Security Ratings โ Governance grades for CrewAI, LangGraph, AutoGen, Semantic Kernel, PydanticAI, Google ADK, OpenAI Agents SDK
- ๐ MCP Server Directory โ Permission scope, input validation, and governance assessment for popular MCP servers
- ๐ AI Agent Governance Index โ Aggregate governance stats from 100 open-source AI agent projects (the data behind
--benchmark)
Supported Frameworks
| Framework | Detection | Specific Rules |
|---|---|---|
| CrewAI | AST | FW-001 โ FW-003 (code exec, memory isolation, delegation) |
| LangGraph | AST | FW-004 โ FW-005 (unrestricted ToolNode, no checkpointing) |
| AutoGen | AST | FW-006 โ FW-007 (LocalCommandLineCodeExecutor, no output validation) |
| Semantic Kernel | AST | FW-008 โ FW-009 (auto-imported plugins, no cost guard) |
| PydanticAI | Import | FW-010 (untyped tool returns) |
| LlamaIndex | Import | General rules |
| LangChain | Import | General rules |
EU AI Act
High-risk system rules take effect August 2, 2026.
| Article | Requirement | How Drako covers it |
|---|---|---|
| Art. 9 | Risk management | 80 scan rules, ODD enforcement, magnitude limits |
| Art. 11 | Technical documentation | Agent BOM, compliance reports, context versioning |
| Art. 12 | Record-keeping | Cryptographic audit trail with policy snapshot references |
| Art. 14 | Human oversight | HITL checkpoints, programmable hooks, escalation policies |
๐ Compliance report generation โ
Performance
80 rules, 10,000 iterations, time.perf_counter_ns(), after 1,000 warmup:
| Scenario | P50 | P99 |
|---|---|---|
| Single rule | 0.031ms | 0.08ms |
| Full scan (80 rules) | 2.1ms | 3.8ms |
| Batch (100 tool calls) | 1.79ms | 2.8ms |
Governance overhead: <0.3% of a typical LLM call.
Policy Templates
Industry-specific governance presets. Start from a template, override what you need.
drako templates list # show available templates
drako templates show fintech # preview a template
drako init --template healthcare # init with template
Available templates:
| Template | Focus |
|---|---|
| base | Sensible defaults for any project |
| fintech | PCI compliance, spend caps, strict DLP |
| healthcare | HIPAA alignment, PHI detection, audit trails |
| eu-ai-act | EU AI Act Articles 9, 11, 12, 14 compliance |
| startup | Lightweight audit-first governance |
| enterprise | Maximum governance, intent verification, A2A security |
Templates support inheritance via extends::
# .drako.yaml
extends: fintech
governance_level: balanced
# Your overrides here โ template provides the base
See It in Action
git clone https://github.com/angelnicolasc/drako.git
cd drako/examples/demo-crewai
pip install drako
drako scan .
The demo project has intentional governance gaps and scores ~35 (Grade F). See what Drako finds.
Roadmap
- Beyond Python โ TypeScript and Go SDKs. If it makes a tool call, Drako governs it.
- Compliance packages โ SOC 2 Type II audit evidence, ISO 42001 templates.
Drako is actively developed and moving fast. If you're deploying AI agents to production, watch the repo โ or better, run the scan and see what it finds. ๐ Full roadmap โ
License
BUSL-1.1. Free to use in production. Cannot offer governance capabilities as a competing hosted service. Converts to Apache 2.0 four years after release. See LICENSE.
Contributing
Every rule requires a positive fixture, a negative fixture, and a standard reference. See CONTRIBUTING.md.
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 drako-2.2.1.tar.gz.
File metadata
- Download URL: drako-2.2.1.tar.gz
- Upload date:
- Size: 298.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4db04a0e07bd7008a34223d490cfba3fecb8300a776b64306d5947b4cf9284f2
|
|
| MD5 |
3047849961b53aa320ace330dca8ce52
|
|
| BLAKE2b-256 |
a6bf9e7e82db259aa3f00d5b66d0085b0ab20ed6c0dae30b8ded01e0ba512891
|
File details
Details for the file drako-2.2.1-py3-none-any.whl.
File metadata
- Download URL: drako-2.2.1-py3-none-any.whl
- Upload date:
- Size: 230.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
189262f7553a43e56720927be0708f59aa576a67721b4c873b8cb1b2ef57c7d6
|
|
| MD5 |
1ddf477fadc2ba0eb11b7d1a2f0b1969
|
|
| BLAKE2b-256 |
67e159d070d7cc51a2a8de11be63c266ccad8d564380e62b2a3c3e3ac7a85431
|