AEGIS Governance Decision SDK¶
Quantitative governance for engineering decisions.
AEGIS evaluates proposals through Bayesian confidence gates, complexity analysis, and utility functions — returning structured PROCEED / PAUSE / ESCALATE / HALT decisions with full audit trails.
Get Started Try the Advisor API Reference
Why AEGIS?¶
| Problem | AEGIS Solution |
|---|---|
| "Should we ship this?" is a gut call | Six quantitative gates with Bayesian confidence |
| No audit trail for engineering decisions | Every evaluation gets a unique decision_id and timestamp |
| Risk thresholds are tribal knowledge | Configurable, frozen parameters with version-controlled schemas |
| AI agents act without governance | MCP server, GitHub Action, and SDK for agent-native integration |
How It Works¶
Proposal → [Risk] [Profit] [Novelty] [Complexity] [Quality] [Utility] → Decision
↓ ↓
Bayesian posterior PROCEED / PAUSE / HALT / ESCALATE
P(delta >= 2 | data) + confidence + rationale + next steps
Every proposal is evaluated against six gates:
| Gate | Method | Default Threshold |
|---|---|---|
| Risk | Bayesian posterior | > 0.95 confidence |
| Profit | Bayesian posterior | > 0.95 confidence |
| Novelty | Logistic function | >= 0.8 |
| Complexity | Normalized floor | >= 0.5 |
| Quality | Min score + no zero subscores | >= 0.7 |
| Utility | Lower confidence bound | > 0 |
Quick Example¶
from aegis_governance import AegisConfig, PCWContext, PCWPhase, pcw_decide
config = AegisConfig.default()
evaluator = config.create_gate_evaluator()
decision = pcw_decide(
PCWContext(
agent_id="my-agent",
session_id="session-1",
phase=PCWPhase.PLAN,
proposal_summary="Add Redis caching layer",
estimated_impact="medium",
risk_proposed=0.15,
complexity_score=0.7,
),
gate_evaluator=evaluator,
)
print(decision.status.value) # "proceed"
Integration Options¶
| Method | Best For | Docs |
|---|---|---|
| REST API | Any language, CI/CD pipelines | Quickstart |
| Python SDK | Python applications, scripts | Quickstart |
| CLI | Shell scripts, local evaluation | Quickstart |
| MCP Server | AI agent integration | MCP Tools |
| GitHub Action | PR governance gates | Action |
Key Features¶
- Zero runtime dependencies — core SDK uses only Python stdlib
- 3029 tests, ~94.8% coverage — battle-tested across Python 3.9-3.12
- Post-quantum cryptography — Ed25519 + ML-DSA-44 hybrid signatures
- Full audit trails — hash-chained, tamper-evident decision logs
- Configurable thresholds — YAML-driven parameter management
- Shadow mode — evaluate without affecting production decisions
- Drift detection — KL-divergence monitoring for parameter drift