Skip to main content

Quantitative AI governance — works immediately, no signup required. 10 free evaluations/day.

Project description

AEGIS Python SDK

Quantitative AI governance — works immediately, no signup required.

AEGIS evaluates engineering proposals through 6 mathematical gates — risk, profit, novelty, complexity, quality, and utility — using Bayesian posterior analysis and KL divergence drift detection.

Quick Start (no signup needed)

pip install aegis-governance
from aegis import Aegis

client = Aegis()  # Works immediately — 10 free evaluations/day

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

print(decision.status)      # "proceed"
print(decision.remaining)   # 9 sandbox evaluations left today

No API key, no signup, no configuration. The gate engine runs server-side — your code hits the same evaluation engine used in production.

For Production Use

Get a free API key at portal.undercurrentholdings.com for 100 evaluations/month:

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

Features

Feature Description
Sandbox mode 10 free evaluations/day, no signup required
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:  # sandbox mode works here too
    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.SandboxLimitError as e:
    print(f"Sandbox limit reached. Sign up at {e.upgrade_url}")
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",       # omit for sandbox mode
    base_url="https://...",      # or AEGIS_BASE_URL env var
    timeout=60.0,                # seconds (default: 30)
    max_retries=3,               # retry attempts (default: 2)
)

Customer Management

client = Aegis(api_key="uk_live_xxx")

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")

Pricing

Tier Monthly Evaluations Rate Limit
Sandbox Free 10/day No signup
Community Free 100/month 60/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.4.0.tar.gz (25.0 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.4.0-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aegis_governance-0.4.0.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aegis_governance-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9434624404eb685bd4d43cfdddf6af00ca75579810348d8387f6feca1c58d99e
MD5 8fdb2d2c1b9f65513ffb1720e6233b24
BLAKE2b-256 68f120fca924cf468a8ff2323d6611d700c54937c4fac3e93865517f79179ae8

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_governance-0.4.0.tar.gz:

Publisher: sdk-publish.yml on undercurrentai/aegis-governance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for aegis_governance-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4af4fc5121c2284bb6aef128cd92d12cceb4a8e12348b23d6d63b611f22f65f4
MD5 1cfd0475fe9a72c4ae3b1ddc98f38039
BLAKE2b-256 b3bd3ba5148de1bdc74a9da68acbdd97f463bed375fd455b9328bbf6b9cc8837

See more details on using hashes here.

Provenance

The following attestation bundles were made for aegis_governance-0.4.0-py3-none-any.whl:

Publisher: sdk-publish.yml on undercurrentai/aegis-governance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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