Observed since 20 Oct, 20:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Self-hosted AI gateway: guardrails, human approvals and a tamper-evident audit ledger behind an OpenAI-compatible API.
Aegis is a self-hosted AI gateway. It sits between your applications and any LLM provider, runs every request through guardrails you declare in one YAML file, and records every decision in a hash-chained audit ledger — so "why was this blocked, masked or paused, and who signed off?" always has an answer.
This is the umbrella package: the aegis CLI, the server, the kernel and all
first-party policy packs.
pip install aegis-gateway
python -m spacy download en_core_web_sm # model used by the PII pack
Requires Python 3.12+.
aegis init # aegis.yaml: fake provider + PII masking
aegis serve --config aegis.yaml --no-auth # http://localhost:8000
Point any OpenAI client at it — the model field selects an Aegis route:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="dev")
reply = client.chat.completions.create(
model="default",
messages=[{"role": "user", "content": "Email jane@example.com the summary"}],
)
print(reply.choices[0].message.content) # the model only ever saw <EMAIL_ADDRESS_0>
Then read the trail:
export AEGIS_SERVER_URL=http://localhost:8000
aegis explain --last # verdict-by-verdict trail
aegis audit export -o ledger.jsonl && aegis audit verify ledger.jsonl
| Verdict | What happens |
|---|---|
allow | Continue unchanged. |
sanitize | Continue with rewritten content. |
block | Stop. The client gets a refusal; the ledger gets the reason. |
require_approval | Checkpoint and pause until a named human approves or denies. |
| Package | Provides |
|---|---|
aegis-gateway-core | Kernel: config, plugin registry, pipeline, contracts, test kits |
aegis-gateway-server | FastAPI server: OpenAI-compatible and native APIs, auth, ledger |
aegis-gateway-cli | The aegis command |
aegis-gateway-sdk | Python client (sync + async) |
aegis-gateway-pack-pii | PII masking with Presidio |
aegis-gateway-pack-residency | Data-residency enforcement |
aegis-gateway-pack-classification | Content labelling |
aegis-gateway-pack-budgets | Per-principal monthly spend caps |
aegis-gateway-pack-content | Model-based content inspection (opt-in model: pip install "aegis-gateway[content]") |
Install a subset instead if you only need part of it — e.g. pip install aegis-gateway-core to build a plugin.
Aegis is alpha software, licensed under AGPL-3.0-or-later.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.0.0a6 | 27 Sept 2026 | 8 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b16651e5c2dbf2f3af9aad054534c17f23563d9acf056103d81031848868ff07