vigil-sdk
Route OpenAI and Anthropic API calls through the Vigil AI security proxy. One-line integration — wrap your existing client and everything else stays the same.
Quickstart
from openai import OpenAI
from vigil_sdk import wrap
client = wrap(OpenAI())
response = client.chat.completions.create(
model="gpt-4o", messages=[{"role": "user", "content": "Hello"}]
)
Install
pip install vigil-sdk[openai] # for OpenAI
pip install vigil-sdk[anthropic] # for Anthropic
pip install vigil-sdk[all] # both
Usage
OpenAI
from openai import OpenAI
from vigil_sdk import wrap
client = wrap(OpenAI())
# Use client exactly as before — all traffic flows through Vigil
Anthropic
from anthropic import Anthropic
from vigil_sdk import wrap
client = wrap(Anthropic())
# Use client exactly as before — all traffic flows through Vigil
Async clients
from openai import AsyncOpenAI
from vigil_sdk import wrap
client = wrap(AsyncOpenAI())
Custom proxy URL
client = wrap(OpenAI(), proxy_url="http://localhost:9090")
Or set the VIGIL_PROXY_URL environment variable.
How it works
wrap() reconfigures the client's underlying HTTP transport to route through the Vigil proxy at localhost:8080. The proxy intercepts requests, runs them through Vigil's security pipeline (injection detection, policy enforcement, anomaly scoring), and forwards allowed requests to the upstream API. Blocked requests return a 403 before reaching the AI provider.
Requirements
- Python 3.9+
- Vigil proxy running locally (the Vigil menu bar app handles this)
openai>=1.0and/oranthropic>=0.20
License
MIT
Metadata
Release files for vigil-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| vigil_sdk-0.1.0.tar.gz | 3.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vigil_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.6 kB
Release files / vigil_sdk-0.1.0.tar.gz
| Download URL | vigil_sdk-0.1.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3f42b1b68cbeb2da181ff8d39cc28b150f4154b23acaf5a9823c064071d549e
|
|
BLAKE2b-256 checksum How to use checksums |
a475c432e41dceecde2c92b80576b05a90941267d4852964e9f9d52e0c5039d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / vigil_sdk-0.1.0-py3-none-any.whl
| Download URL | vigil_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
377f200f2b7fee9337ff65593038b31291e196faf01fd480d9cb0d9cadc2a23f
|
|
BLAKE2b-256 checksum How to use checksums |
35f66582d0ab2876c68dae6ea6216edf465182ee3fe9f8229cc911db8c690f4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for vigil-sdk 0.1.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.