Skip to main content

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

Project description

AEGIS Python 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.3.0.tar.gz (21.2 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.3.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aegis_governance-0.3.0.tar.gz
  • Upload date:
  • Size: 21.2 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.3.0.tar.gz
Algorithm Hash digest
SHA256 67fa93afc82336cbc52aadfb61305169f89a9d2074e247f5b42c62f0362b21b2
MD5 4fd016a93413e068c0600c898e6c1943
BLAKE2b-256 41fdbc67658eb6b3524b19588127a8e2a63cd95cc0a82362c2998fd581356799

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aegis_governance-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec2b1750917ab177d7a351f5ae81ddaa9b15de297bb8bac93fe0f397994cb704
MD5 2f66f2a2dd452118c3671dfe90a9bf18
BLAKE2b-256 6e3e64299490e0570c80f00a125b0afd49368aa12449a050f01b1c2b07831367

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