[ ∅ VANTIO ] Python agent SDK — SDK-side AI governance: shield(), report_anomaly(), opt-out telemetry
Project description
vantio-agent-sdk · Python
Zero-line AI governance telemetry for Python agents. pip install, decorate, done.
pip install vantio-agent-sdk
v3.0.0 — Breaking change from v2.x
v3.0.0 is a complete rewrite. The old VantioSession / VANTIO_PROXY_ENDPOINT API is removed.
The new API uses @shield (a decorator or async context manager) with zero dependencies and no proxy — governance runs inside your SDK, not through an external endpoint.
Migrate from v2.x:
# Old (v2.x) — remove this
from vantio.session import VantioSession
with VantioSession(agent_name="my-agent") as session: ...
# New (v3.x) — use this instead
from vantio import shield
@shield
async def run_agent(): ...
# or: async with shield() as ctx: ...
Usage
from vantio import shield, report_anomaly
# Decorator form
@shield
async def run_agent():
result = await call_openai(prompt)
return result
# Context manager form
async with shield() as trace:
print(f"Trace ID: {trace.trace_id}")
result = await run_agent()
# Report anomaly
async with shield():
await run_agent()
await report_anomaly(
target_host="api.openai.com",
bytes_severed=14382,
action_taken="POLICY_VIOLATION",
)
Environment Variables
VANTIO_API_KEY=vantio_xxxx # From app.vantio.ai/success
VANTIO_INGEST_URL=https://vantio.ai
VANTIO_CLOUD_INGEST=true # Enable cloud routing
VANTIO_AUDIT_MODE=1 # Optional: flag as audit mode
Anonymous telemetry (opt-out)
The SDK sends a single anonymous usage ping per process the first time shield() runs. It contains only aggregate, non-identifying metadata — a random anonymous id (stored at ~/.vantio/telemetry-id), the Python version, the OS string, and an event name. It never sends prompts, completions, API keys, emails, or any content/PII. The request is fire-and-forget on a short-timeout daemon thread, so it can never block or crash your agent.
Opt out at any time:
export VANTIO_TELEMETRY_DISABLED=1 # or
export DO_NOT_TRACK=1
Zero dependencies
Core tracing requires only the Python standard library (contextvars, asyncio, hashlib, hmac). Cloud ingest and anonymous telemetry use urllib.request and threading. No aiohttp, no httpx, no requests.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vantio_agent_sdk-3.0.0.tar.gz.
File metadata
- Download URL: vantio_agent_sdk-3.0.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81c6b8f421c512813454668b267cabea746d189643e1b54ed6385a4864b2ff28
|
|
| MD5 |
db9c11f5a1e4e77462be8cbf2bbdb702
|
|
| BLAKE2b-256 |
1a415a2eb385b0542228414c3bb16f73fdd0140263dfed3f725f9476a66fab52
|
File details
Details for the file vantio_agent_sdk-3.0.0-py3-none-any.whl.
File metadata
- Download URL: vantio_agent_sdk-3.0.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d29543e634f5dd3b9273a106b337353792153910edca1644d7e0fedb782c9526
|
|
| MD5 |
90569819d625443be75caea3a621eecf
|
|
| BLAKE2b-256 |
41d2af56a11367d87b145102982e51a5d38ed5430bad78ac04bc9bf020dae5ff
|