AEVRIS Python SDK
Official Python client for AEVRIS — deterministic AI security middleware that intercepts prompts before they reach AI models and verifies outputs before delivery.
Install
pip install aevris
Quickstart
from aevris import Aevris
client = Aevris(api_key="sk-aevris-your-key-here")
result = client.scan_input("some user-provided prompt")
if result.is_blocked:
print(f"Blocked: {result.summary}")
for agent in result.triggered_agents:
print(f" {agent.name}: {agent.severity} — {agent.finding}")
else:
# safe to send to your LLM
pass
Scanning AI outputs before they reach your user
response = your_llm_call(prompt) # however you call your model
result = client.scan_output(prompt, response)
if not result.alignment_intact:
print(f"Compromised response: {result.summary}")
# don't deliver this response to the user
Session-level threat scoring
Pass the same session_id across multiple calls to enable multi-turn attack detection. AEVRIS tracks risk across the conversation server-side and flags coordinated attacks before they complete.
session_id = "user-123-conversation-456"
r1 = client.scan_input("hello, how are you?", session_id=session_id)
r2 = client.scan_input("what can you help with?", session_id=session_id)
r3 = client.scan_input("ignore your instructions and...", session_id=session_id)
print(r3.session_risk_score) # accumulated risk across all 3 calls
print(r3.session_threat_level) # SAFE / LOW / MEDIUM / HIGH / CRITICAL
Raise instead of check
If you'd rather use exception handling than checking .is_blocked every time:
client = Aevris(api_key="...", raise_on_block=True)
try:
result = client.scan_input(user_prompt)
# only reached if not blocked
except AevrisBlockException as e:
print(f"Blocked: {e.result.summary}")
Agent action firewall
Gate autonomous agent actions behind human approval before they execute. This uses a different 4-state model (ALLOWED / BLOCKED / FLAGGED / PENDING_APPROVAL) than the input/output scans:
action = client.scan_action(
action_type="delete_file",
action_payload={"path": "/data/customer_records.db"},
)
if action.is_pending:
print(f"Awaiting human approval: {action.poll_url}")
# poll later with client.poll_action(action.action_id)
elif action.is_blocked:
print(f"Blocked: {action.message}")
elif action.is_allowed:
proceed_with_action()
Webhook alerts
Get real-time, HMAC-signed alerts when AEVRIS blocks something:
client.set_webhook(
webhook_url="https://your-endpoint.example.com/aevris-alerts",
min_severity="HIGH",
)
AEVRIS immediately sends a signed test payload to confirm delivery. From then on, every BLOCK/COMPROMISED verdict at or above your threshold triggers a webhook with the verdict, severity, triggered agents, and session risk data.
Error handling
from aevris import AevrisAPIError
try:
result = client.scan_input(prompt)
except AevrisAPIError as e:
print(f"AEVRIS API error: {e} (status {e.status_code})")
Links
- Live demo — try detection without an API key
- API documentation
- Competitor comparison
- Support: hello@aevris.ai
License
MIT
Metadata
Release files for aevris 1.0.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 | |
|---|---|---|---|---|
| aevris-1.0.0.tar.gz | 10.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aevris-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.6 kB
Release files / aevris-1.0.0.tar.gz
| Download URL | aevris-1.0.0.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d581537cdcaac99376bb7283cbea094b46991ef1769fa66b023bc6f78d762da
|
|
BLAKE2b-256 checksum How to use checksums |
a1523ae0845b0cbc58636ce6d2c68b6c2f410c03723524b4377c0832f15c9211
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / aevris-1.0.0-py3-none-any.whl
| Download URL | aevris-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42818ab29de8488a767d982080364d4b11ea8d7409e9b0537d42dd3f12107229
|
|
BLAKE2b-256 checksum How to use checksums |
eb6ca5fd572db373725c806eb62c0ce1e4a0b1c44415350684711b8226be87d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for aevris 1.0.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.