Metadata-Version: 2.5
Name: aegis-gateway-core
Version: 2.0.0a5
Summary: Aegis kernel: typed config, plugin registry, guardrail pipeline and contract test kits.
Project-URL: Homepage, https://e-choness.github.io/aegis/
Project-URL: Documentation, https://e-choness.github.io/aegis/
Project-URL: Repository, https://github.com/e-choness/aegis
Project-URL: Changelog, https://e-choness.github.io/aegis/changelog
Project-URL: Issues, https://github.com/e-choness/aegis/issues
Author: Aegis contributors
License-Expression: AGPL-3.0-or-later
License-File: LICENSE
Keywords: ai-gateway,audit,governance,guardrails,llm,openai,pii
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: keyring>=25.0
Requires-Dist: langchain-core>=0.3
Requires-Dist: langchain-mcp-adapters>=0.1.0
Requires-Dist: langgraph-checkpoint-postgres>=3.1.2
Requires-Dist: langgraph-checkpoint-sqlite>=3.1.1
Requires-Dist: langgraph>=0.2
Requires-Dist: litellm>=1.0
Requires-Dist: mcp>=1.28.1
Requires-Dist: pydantic-settings>=2.14.2
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: rag
Requires-Dist: chromadb>=0.5; extra == 'rag'
Requires-Dist: langchain-chroma>=0.1; extra == 'rag'
Requires-Dist: langchain-postgres>=0.0.12; extra == 'rag'
Requires-Dist: langchain-text-splitters>=0.3; extra == 'rag'
Description-Content-Type: text/markdown

# aegis-gateway-core

The Aegis kernel: typed `aegis.yaml` configuration, `secret://` resolution,
entry-point plugin discovery, the LangGraph pipeline (ingress → execute →
egress), the four-verdict guardrail contract, and contract test kits for
plugin authors.

```bash
pip install aegis-gateway-core          # add [rag] for Chroma/pgvector retrieval
```

Depend on this package when you **write a plugin**. The public API for pack
factories is `aegis_core.packs`; guardrails implement
`async scan(state) -> Verdict`.

```python
from aegis_core.pipeline.state import RunState
from aegis_core.pipeline.verdict import Verdict


class NoTicketsGuard:
    name = "no_tickets"
    streaming = "none"

    async def scan(self, state: RunState) -> Verdict:
        if "INC-" in state.messages[-1].content:
            return Verdict.block("internal ticket ids must not leave the company")
        return Verdict.allow()
```

See [Write a plugin]({DOCS}/develop/plugins) and [Testing]({DOCS}/develop/testing).

## Links

- [Documentation](https://e-choness.github.io/aegis/) · [Changelog](https://e-choness.github.io/aegis/changelog) · [Source](https://github.com/e-choness/aegis)
- Most users want the umbrella package: `pip install aegis-gateway`.

Part of [Aegis](https://pypi.org/project/aegis-gateway/), a self-hosted AI gateway. Licensed under [AGPL-3.0-or-later](https://github.com/e-choness/aegis/blob/main/LICENSE).
