Skip to main content

Argus — the security layer for all AI models

PyPI version PyPI downloads DOI

An OpenAI-compatible gateway that sits in front of any LLM — OpenAI, Anthropic, Bedrock, Gemini, Mistral, vLLM, Ollama, anything with an OpenAI-shaped endpoint — and enforces security policy before a model ever sees your data.

Every request passes through the policy engine on the way in and on the way out. Cost intelligence (tiered routing, graceful budgets, per-task attribution) rides along via tokenecon, but security is the product.

The security layer

request -> auth -> INPUT policy -> budget -> route -> model
                                              -> OUTPUT policy -> audit -> response

Pluggable detectors (each scans, the policy decides):

Detector Catches Default action
Secrets AWS keys, private keys, GitHub/OpenAI tokens, password = ... block — never reaches a model
PII emails, phones, SSNs, credit cards, IPs redact — [REDACTED:EMAIL], request continues
Prompt injection "ignore previous instructions", role overrides, system-prompt probes, known jailbreaks flag — allowed but marked (one flag away from block)
Blocklist your own regexes block

Policy engine: per-direction rules (in / out / both) with four actions — allow, redact, block, flag. Add an ML-based detector later by subclassing Detector; no other code changes.

Audit log: every decision recorded — timestamp, key, task, detector, action, redacted snippet. Raw PII and secrets never touch the audit trail. GET /admin/audit for compliance review.

Quickstart

pip install argus-gateway
export AIGW_MASTER_KEY="sk-admin-secret"
export OPENAI_API_KEY="..."
argus   # serves on 127.0.0.1:4000

Point any OpenAI client at it — one base_url change:

import openai
client = openai.OpenAI(api_key="<virtual-key>", base_url="http://localhost:4000/v1")

Self-hosted models sit behind the same layer:

from gateway.providers.generic import GenericProvider
# vLLM, Ollama, llama.cpp — any OpenAI-shaped endpoint

Every response carries what happened:

"gateway": {
  "provider": "openai", "tier": "small", "difficulty": 0.17,
  "cost_usd": 0.000004, "degraded": false,
  "security": {"redactions": ["pii:EMAIL"], "flags": ["prompt_injection:INSTRUCTION_OVERRIDE"]}
}

Also inside: cost intelligence

  • Tiered routing — requests scored for difficulty, cheapest capable tier wins
  • Graceful budgets — over budget? Falls back to the cheapest tier and flags degraded: true instead of failing (hard-stop mode available)
  • Per-task attribution — X-Task-Id groups an agentic run's turns into one costed task: GET /admin/tasks/{id}

Admin API (X-Admin-Key required)

  • POST /admin/keys — issue virtual keys with budgets (degrade/hard, daily/monthly)
  • GET /admin/spend, GET /admin/keys/{id}/spend — spend tracking
  • GET /admin/tasks/{task_id} — per-task cost breakdown
  • GET /admin/audit?limit=&key_id= — security decisions

Roadmap

Streaming (SSE), Bedrock/Gemini/Mistral adapters, semantic caching, OTEL/Prometheus export, admin UI, SSO/RBAC, ML-based injection detector.

License

MIT — Karmendra Pandey.

Metadata

Release files for argus-gateway 0.1.1

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

Source distribution (sdist)

Source distribution for argus-gateway 0.1.1
File Size Uploaded Provenance
argus_gateway-0.1.1.tar.gz 21.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for argus-gateway 0.1.1
File Interpreter ABI Platform
argus_gateway-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.2 kB

Release files / argus_gateway-0.1.1.tar.gz

Download URL argus_gateway-0.1.1.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
466dcf3b73a80ab3623326a24d918647e9b39390ca89d89477991fb3de553b69
BLAKE2b-256 checksum
How to use checksums
240ca94ba1965099b56d0caec404d6b3b9a328b2a32a585499b47470a69ee7c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / argus_gateway-0.1.1-py3-none-any.whl

Download URL argus_gateway-0.1.1-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2090780c9593518f4cc5e173c481101b89df6c30ef70cfcadb15fa44f0f285c2
BLAKE2b-256 checksum
How to use checksums
577bdaf1e139a077a76facc00fe5cb02469d51664bf7436a9130f281312f8050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for argus-gateway 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for argus_gateway-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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