Skip to main content

Aegis Runtime (aegis-runtime) v0.6.0

Zero-trust deterministic flight controller and autonomous behavioral defense for AI agents featuring causal exfiltration guards, statistical anomaly detection, self-hardening policy synthesis, circuit breakers, state locks, human-in-the-loop approval gates, atomic rollbacks, and SHA-256 tamper-proof audit logs with zero external dependencies.

pip install aegis-runtime

What's New in v0.6.0

  • Causal Exfiltration & Sequence Guards (forbid_after / require_sequence): Block multi-step data exfiltration chains (forbidding send_webhook after read_secrets -> BLOCKED_EXFILTRATION) and enforce strict tool call ordering (BLOCKED_SEQUENCE).
  • Statistical Behavioral Anomaly Detector (anomaly_multiplier): Automatically learn rolling parameter baselines via statistics.mean and block sudden behavioral spikes (BLOCKED_ANOMALY) before execution.
  • Autonomous Policy Synthesizer (aegis harden): Compile verified SHA-256 production audit logs directly into hardened aegis_policy.json guardrails via AegisRuntime.synthesize_policy() or aegis harden audit.json -o aegis_policy.synthesized.json.

Core Features & Quickstart

Aegis enforces hard deterministic rules in Python prior to sensitive tool execution to prevent indirect prompt injections, multi-step exfiltration, and runaway loops.

from aegis_runtime import AegisRuntime

aegis = AegisRuntime(max_calls=5)

@aegis.guard()
def read_customer_db(query: str):
    return 'sensitive_records'

@aegis.guard(forbid_after=['read_customer_db'])
def post_external_webhook(url: str, payload: str):
    return f'Posted to {url}'

@aegis.guard(anomaly_multiplier=3.0, require_approval=True)
def issue_refund(amount: float, user_id: str):
    return f'Refunded ${amount} to {user_id}'
  • Policy-as-Code (aegis_policy.json): Define rules, required state flags, argument limits, sequence rules, and approval requirements externally.
  • Human-in-the-Loop & Universal Adapters: Attach approval callbacks or export tool schemas for OpenAI, Anthropic, Groq, LangGraph, and n8n.
  • Atomic Time-Travel Rollbacks (@aegis.transaction): Automatically rewind state stores if a multi-step workflow fails.
  • Cryptographic Verification & Hardening CLI: Verify SHA-256 hash-chained audit logs (aegis verify audit.json) and synthesize hardened policies (aegis harden audit.json).

Aegis Cloud Control Plane (Live Hosted Sandbox)

Stream SHA-256 hash-chained audit logs and trigger remote Human-in-the-Loop approval gates from any Python agent:

  1. Open the live control plane at https://aegis-cloud-lzcu.onrender.com and click Generate Free API Key (or test immediately with aegis_live_demo_key_001).
  2. Connect AegisRuntime to your isolated workspace:
from aegis_runtime import AegisRuntime

aegis = AegisRuntime(
    telemetry_url='https://aegis-cloud-lzcu.onrender.com/v1/events',
    api_key='aegis_live_demo_key_001',
)

@aegis.guard(max_args={'amount': 500}, require_approval=True)
def transfer_funds(amount: float, recipient: str):
    return f'Sent \${amount} to {recipient}'

License

MIT License

Metadata

Release files for aegis-runtime 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aegis-runtime 0.6.0
File Size Uploaded Provenance Actions
aegis_runtime-0.6.0.tar.gz 15.1 kB Without provenance Details for aegis_runtime-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aegis-runtime 0.6.0
File Interpreter ABI Platform Actions
aegis_runtime-0.6.0-py3-none-any.whl Python 3 none any Details for aegis_runtime-0.6.0-py3-none-any.whl

Total release size: 26.5 kB

Release files / aegis_runtime-0.6.0.tar.gz

Download URL aegis_runtime-0.6.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
83d9c3dc92bdb995006dd744427ebc8e7f586120efeea690d09adfdddda892c6
BLAKE2b-256 checksum
How to use checksums
d3a6f5163b05a5fe41fbc505654117d3b73306bb026226e4a5f1346d7380330a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / aegis_runtime-0.6.0-py3-none-any.whl

Download URL aegis_runtime-0.6.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f5a322cc0e0a62dfbe3af1f6e67942b27d3042dd560e3b41fbd01e2a0f49456
BLAKE2b-256 checksum
How to use checksums
53949342fadaa795ae7494c78f0805805915a8bca3792d6a37f915b8428ed9b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for aegis-runtime 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page