Skip to main content

Python client for the AEGIS Governance API — quantitative decision governance for engineering teams

Project description

AEGIS Governance SDK

Quantitative decision governance for engineering teams.

AEGIS evaluates engineering proposals through 6 mathematical gates — risk, profit, novelty, complexity, quality, and utility — using Bayesian posterior analysis and KL divergence drift detection. This SDK is the Python client for the AEGIS Governance API.

Installation

pip install aegis-governance

Quick Start

from aegis import Aegis

client = Aegis(api_key="uk_live_xxx")  # or set AEGIS_API_KEY env var

decision = client.evaluate(
    proposal_summary="Add Redis caching layer to reduce API latency",
    estimated_impact="medium",
    risk_baseline=0.02,
    risk_proposed=0.05,
    novelty_score=0.75,
    complexity_score=0.8,
    quality_score=0.9,
)

print(decision.status)       # "proceed" | "pause" | "halt" | "escalate"
print(decision.confidence)   # 0.87
print(decision.rationale)    # "All 6 gates passed. Proposal approved."

Features

Feature Description
6 Bayesian gates Risk, profit, novelty, complexity, quality, utility
KL divergence drift Detects when your risk baseline shifts
Shadow mode Evaluate without enforcing (calibration)
Typed responses Full dataclass types with IDE autocomplete
Async support AsyncAegis with identical API surface
Retry + backoff Automatic retry on transient failures (429, 5xx)
Idempotency Safe retries with auto-generated idempotency keys
TLS enforced HTTPS always on, no opt-out

Quick Risk Check

result = client.risk_check(
    risk_score=0.15,
    threshold=0.3,
    action_description="Deploy to production",
)
print(result.safe)  # True

Async Usage

from aegis import AsyncAegis

async with AsyncAegis() as client:
    decision = await client.evaluate(
        proposal_summary="Migrate database to Postgres 17",
        estimated_impact="high",
    )

Gate Results

Access individual gate evaluations:

decision = client.evaluate(proposal_summary="...")

if decision.gates:
    print(decision.gates.risk)        # GateResult(passed=True, value=0.05, ...)
    print(decision.gates.novelty)     # GateResult(passed=True, value=0.75, ...)
    print(decision.gates.complexity)  # GateResult(passed=True, value=0.80, ...)

Error Handling

import aegis

try:
    decision = client.evaluate(proposal_summary="...")
except aegis.AuthenticationError:
    print("Invalid API key")
except aegis.RateLimitError as e:
    print(f"Rate limited. Retry after {e.retry_after}s")
except aegis.ValidationError as e:
    print(f"Bad request: {e.message}")
except aegis.AegisError as e:
    print(f"API error: {e.message} (request_id={e.request_id})")

Configuration

client = Aegis(
    api_key="uk_live_xxx",       # or AEGIS_API_KEY env var
    base_url="https://...",      # or AEGIS_BASE_URL env var
    timeout=60.0,                # seconds (default: 30)
    max_retries=3,               # retry attempts (default: 2)
)

Customer Management

profile = client.get_profile()
print(profile.tier)              # "professional"

usage = client.get_usage()
print(usage.total_evaluations)   # 847

keys = client.list_keys()
new_key = client.create_key("CI Pipeline")

Get Your API Key

  1. Sign up at portal.veiltide.com
  2. Create an API key in the dashboard
  3. Set AEGIS_API_KEY in your environment

Pricing

Tier Monthly Evaluations Rate Limit
Community Free 100/month 10/min
Professional $3,500 10,000/month 100/min
Enterprise $18,000 100,000/month 1,000/min

Full pricing details

Links

License

Apache 2.0 - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aegis_governance-0.1.0.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aegis_governance-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file aegis_governance-0.1.0.tar.gz.

File metadata

  • Download URL: aegis_governance-0.1.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for aegis_governance-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dbcff440f9c5f92ec11530175f65f9bdec072e77aea4d1d2452fcc4efa5bacb8
MD5 2b14ab18996ecbd46f6d2535d9480d5b
BLAKE2b-256 daac52623287e13522e2eb6a8bfeec0474fd124cb73f39d019cf085936543686

See more details on using hashes here.

File details

Details for the file aegis_governance-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aegis_governance-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f03b4f5e7b4ee8af19552917e373e4545c6a3d2e67dba5f82b4d547fd1a3d32c
MD5 a5ec9d2d1aa85ff7e57c7b3cc575da69
BLAKE2b-256 b72c051c6f34899509da49bd9cf0262ad1476ab7c8352bd26dc8aef191cf5759

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page