AEGIS Governance Decision SDK — quantitative governance toolkit for engineering decisions
Reason this release was yanked:
Package withdrawn — private IP, not intended for public distribution
Project description
AEGIS Governance Decision SDK
Governance infrastructure for autonomous engineering decisions.
AEGIS standardizes engineering decisions and creates a hash-chained audit trail, giving enterprises the confidence to let AI agents operate autonomously. Evaluate proposals through six quantitative gates — returning structured PROCEED/PAUSE/ESCALATE/HALT decisions with tamper-evident audit trails.
Quickstart
pip install aegis-governance
Python SDK
from aegis_governance import AegisConfig, PCWContext, PCWPhase, PCWStatus, 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,
quality_score=0.85,
),
gate_evaluator=evaluator,
)
if decision.status == PCWStatus.PROCEED:
print("Safe to proceed")
else:
print(f"Decision: {decision.status.value} — {decision.rationale}")
CLI
# Evaluate a proposal
echo '{"proposal_summary":"Add caching","estimated_impact":"low","complexity_score":0.8}' \
| aegis evaluate
# Validate configuration
aegis validate-config schema/interface-contract.yaml
# Version info
aegis version
Additional commands: aegis health, aegis metrics, aegis admin (customer management). Exit codes: 0 = proceed, 1 = halt, 2 = pause/escalate. See CLI Reference for full documentation.
MCP Server (for AI Agents)
pip install aegis-governance[mcp]
aegis-mcp-server # Starts MCP server (stdio transport)
Exposes tools: aegis_evaluate_proposal, aegis_quick_risk_check, aegis_check_thresholds, aegis_get_scoring_guide, aegis_crypto_status.
What AEGIS Does
AEGIS runs proposals through six quantitative gates:
| Gate | What It Checks |
|---|---|
| Risk | Is the risk delta acceptable? (Bayesian confidence) |
| Profit | Does the expected value justify the change? (Bayesian confidence) |
| Novelty | How novel is this approach? (Logistic scoring) |
| Complexity | Is system complexity within bounds? (Hard floor) |
| Quality | Does code quality meet standards? (Minimum + no zero subscores) |
| Utility | Is the net utility positive? (Lower confidence bound) |
Every evaluation returns a structured decision with gate results, confidence scores, rationale, next steps, and a unique decision ID for audit trails.
Cryptography
AEGIS provides tamper-evident governance through three cryptographic capabilities:
- Two-key override signatures -- BIP-322 Schnorr or Ed25519 + ML-DSA-44 hybrid (post-quantum). Two custodians must independently sign before any gate override is approved. See Crypto Overview.
- PII encryption at rest -- 12 telemetry fields encrypted with X25519 + ML-KEM-768 + AES-256-GCM hybrid encryption. See Post-Quantum Rationale.
- MCP tool schema signing -- AMTSS protocol ensures tool definitions are tamper-evident in transit.
Key Management
AEGIS protects cryptographic keys at rest with envelope encryption:
| Provider | Backend | Install |
|---|---|---|
| AWS KMS | boto3 KMS Encrypt/Decrypt |
pip install aegis-governance[kms] |
| HSM (PKCS#11) | CloudHSM, YubiHSM 2, SoftHSM2 | pip install aegis-governance[hsm] |
| Environment | Base64 env vars | Built-in |
See Key Management Guide for setup and rotation.
Installation
# Core (zero runtime dependencies)
pip install aegis-governance
# With scipy for utility calculations (z-scores)
pip install aegis-governance[engine]
# With Prometheus metrics exporter
pip install aegis-governance[telemetry]
# With YAML config loading
pip install aegis-governance[config]
# With MCP server for AI agents
pip install aegis-governance[mcp]
# With post-quantum cryptography
pip install aegis-governance[crypto,pqc]
# With AWS KMS key management
pip install aegis-governance[kms]
# With HSM (PKCS#11) key management
pip install aegis-governance[hsm]
# Everything
pip install aegis-governance[all]
Configuration
AEGIS defaults match the frozen parameters in schema/interface-contract.yaml. Override via YAML or dict:
# From YAML (requires pyyaml)
config = AegisConfig.from_yaml("my-config.yaml")
# From dict
config = AegisConfig.from_dict({"epsilon_R": 0.02, "quality_min_score": 0.8})
# Config is immutable (frozen dataclass) — prevents parameter drift
config.epsilon_R = 0.5 # Raises AttributeError
Integration Layers
| Layer | Interface | Consumer |
|---|---|---|
| Python SDK | from aegis_governance import pcw_decide |
Python applications |
| CLI | aegis evaluate < proposal.json |
CI/CD pipelines, shell scripts |
| REST API | POST /evaluate |
Any language, HTTP clients |
| MCP Server | aegis_evaluate_proposal tool |
Claude Code, Codex, AI agents |
| GitHub Action | aegis-gate composite action |
PR governance gates |
Compliance & Governance
AEGIS includes compliance infrastructure for regulatory frameworks:
- AI Governance (ai/) — ISO 42001, NIST AI RMF, EU AI Act artifacts
- System register, risk register (OWASP Agentic Top 10), model/data cards
- Human oversight plan, post-market monitoring, AIMS policy
- EU AI Act Annex IV technical file
- Operational Runbooks (docs/compliance/) — SOC 2, FedRAMP procedures
- System description, BCP/DRP, incident response plan
- Access review, vendor risk, change management, privacy operations
- CI Validators (tools/ci/) — 9 compliance validators
- AI RMF/AIMS artifacts, EU AI Act technical file structure
- Log schema validation, engineering scorecard
Examples
See the examples/ directory:
basic_evaluation.py— 20-line quickstartcustom_config.py— YAML and dict configurationci_cd_integration.py— GitHub Action usageautonomous_agent.py— AI agent + AFABridge
Development
# Setup
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# Quality gates (run all before committing)
make all # Runs: lint, type, sec, test, ai-validate, scaffold-check
# Or run individually:
make fmt # Auto-fix formatting
make lint # Lint check (ruff + black)
make type # Type check (mypy)
make test # Test suite (pytest)
make sec # Security scan (bandit)
make ai-validate # AI governance validators
make score # Engineering scorecard
3713 tests | ~93.4% coverage | Python 3.9-3.12 | Zero runtime dependencies
Contributing
See CONTRIBUTING.md for full guidelines. Quick summary:
- Read
CLAUDE.mdfor repository conventions and agent guidance - All changes require tests (90% coverage floor enforced in pyproject.toml)
- Follow
{type}({scope}): {description}commit format (conventional commits) - Run
make allbefore pushing (all quality gates must pass) - Frozen parameter changes require formal recalibration approval
- Change classes: A (style), B (refactor), C (behavioral) — see CONTRIBUTING.md
- AI-assisted contributions must include attribution in PR description
License
MIT License — See LICENSE for details.
References
- Documentation — Full documentation site
- Specification — Core guardrail specifications
- Interface Contract — Frozen parameters (authoritative)
- Architecture — Full system specification
- Gap Analysis — Component gap tracking
- CLI Reference — Full command-line documentation
- Roadmap — Future work
- Compliance Runbooks — Operational procedures (SOC 2, FedRAMP, EU AI Act)
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 aegis_governance-1.1.0.tar.gz.
File metadata
- Download URL: aegis_governance-1.1.0.tar.gz
- Upload date:
- Size: 477.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1965869393613132d781f00433e3ff60b7ccff0ddd433da239a352823d5a0146
|
|
| MD5 |
a308dff97c199d7514696523b28a6d2c
|
|
| BLAKE2b-256 |
876a31097d4784c43d80e06d9accf555ef3af62005128ad4a08f7dfdd13a8cec
|
Provenance
The following attestation bundles were made for aegis_governance-1.1.0.tar.gz:
Publisher:
pypi-publish.yml on undercurrentai/aegis-governance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aegis_governance-1.1.0.tar.gz -
Subject digest:
1965869393613132d781f00433e3ff60b7ccff0ddd433da239a352823d5a0146 - Sigstore transparency entry: 1097871644
- Sigstore integration time:
-
Permalink:
undercurrentai/aegis-governance@f5fba2761d8b0c0eff8733b9357e2ecf3b0a19b4 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/undercurrentai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@f5fba2761d8b0c0eff8733b9357e2ecf3b0a19b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aegis_governance-1.1.0-py3-none-any.whl.
File metadata
- Download URL: aegis_governance-1.1.0-py3-none-any.whl
- Upload date:
- Size: 278.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e21a20599096f1abf9cf8daad78f07c19944f75489f66931dfea30feb93c27b
|
|
| MD5 |
5da9e81cfe36494f2e124c4f6ee92857
|
|
| BLAKE2b-256 |
45bde9573124464a6ee7a2cc5dac6e5ea887814c973ba0d7d16a14b193ea28d1
|
Provenance
The following attestation bundles were made for aegis_governance-1.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on undercurrentai/aegis-governance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aegis_governance-1.1.0-py3-none-any.whl -
Subject digest:
8e21a20599096f1abf9cf8daad78f07c19944f75489f66931dfea30feb93c27b - Sigstore transparency entry: 1097871651
- Sigstore integration time:
-
Permalink:
undercurrentai/aegis-governance@f5fba2761d8b0c0eff8733b9357e2ecf3b0a19b4 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/undercurrentai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@f5fba2761d8b0c0eff8733b9357e2ecf3b0a19b4 -
Trigger Event:
push
-
Statement type: