Catalog PyPI
PACKAGE EXPLORERView in registry

aegis-gateway

PyPI

Self-hosted AI gateway: guardrails, human approvals and a tamper-evident audit ledger behind an OpenAI-compatible API.

ai-gatewayauditgovernanceguardrailsllmopenaipii
Versions collected1
Direct dependencies8From release 2.0.0a6
Last observed20 Oct, 20:16 UTC

README

Version 2.0.0a6 documentation

Aegis — the self-hosted AI gateway that shows its work

aegis-gateway

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.

Install

pip install aegis-gateway
python -m spacy download en_core_web_sm   # model used by the PII pack

Requires Python 3.12+.

Sixty seconds to a governed endpoint

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

Four verdicts, nothing else

VerdictWhat happens
allowContinue unchanged.
sanitizeContinue with rewritten content.
blockStop. The client gets a refusal; the ledger gets the reason.
require_approvalCheckpoint and pause until a named human approves or denies.

What's included

PackageProvides
aegis-gateway-coreKernel: config, plugin registry, pipeline, contracts, test kits
aegis-gateway-serverFastAPI server: OpenAI-compatible and native APIs, auth, ledger
aegis-gateway-cliThe aegis command
aegis-gateway-sdkPython client (sync + async)
aegis-gateway-pack-piiPII masking with Presidio
aegis-gateway-pack-residencyData-residency enforcement
aegis-gateway-pack-classificationContent labelling
aegis-gateway-pack-budgetsPer-principal monthly spend caps
aegis-gateway-pack-contentModel-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.

Learn more

Aegis is alpha software, licensed under AGPL-3.0-or-later.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
2.0.0a627 Sept 20268

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
e-choness/aegis

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:16 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b16651e5c2dbf2f3af9aad054534c17f23563d9acf056103d81031848868ff07