A previous release had provenance metadata, but this release does not. View details.
Veil Python SDK
One-liner observability for AI agents.
Installation
pip install veil-sdk
Quickstart
import veil
veil.init(api_key="vl_xxx")
That's it. Add this before your agent runs. Veil automatically instruments OpenAI, Anthropic, LangChain, LlamaIndex, and other popular LLM libraries, and sends all telemetry to your Veil dashboard.
Serverless functions (Lambda, Cloud Functions, Vercel, etc.)
In long-running processes (servers, scripts, notebooks), Veil automatically sends all telemetry when the process exits. No extra code needed.
In serverless functions, the process doesn't exit cleanly — it gets frozen or killed by the platform the moment your handler returns. Any telemetry still in the buffer is silently dropped, and your session never closes in the dashboard.
Call veil.flush() at the end of your handler to force delivery before the
freeze:
import veil
veil.init(api_key="vl_xxx", agent_name="My Lambda")
def handler(event, context):
# ... your agent logic ...
veil.flush() # send everything before Lambda freezes
return result
flush() does two things in order:
- Forces the OpenTelemetry exporter to drain any buffered spans (LLM call data)
- Sends a
session.endevent so Veil closes and classifies the session
It is safe to call multiple times — only the first call does anything.
Environments where you must call flush():
| Platform | Why |
|---|---|
| AWS Lambda | Handler returns → process frozen immediately |
| Google Cloud Functions | Same — process suspended after return |
| Vercel / Netlify Functions | Execution context torn down after response |
| Azure Functions | Consumption plan freezes after invocation |
Environments where flush() is optional (but harmless):
- Long-running servers (FastAPI, Flask, Django)
- CLI scripts
- Jupyter notebooks
- Docker containers
How it works
- Telemetry is collected and sent asynchronously — zero impact on your agent's performance.
- Sessions are automatically tracked from the first LLM call through to process exit.
- Failures are detected and classified server-side — no configuration required.
- Every failure triggers an alert in your Veil dashboard and via email.
Supported Libraries
Veil auto-instruments all major LLM frameworks including:
- OpenAI
- Anthropic
- LangChain
- LlamaIndex
- Cohere
- Mistral
- Google Gemini
- AWS Bedrock
- And more
Requirements
- Python >= 3.9
Your API Key
Find your API key in the Veil Dashboard under Settings.
Keys follow the format vl_ followed by 64 hex characters.
Self-hosting
If you are running Veil on your own infrastructure, pass the endpoint parameter:
veil.init(api_key="vl_xxx", endpoint="https://your-veil-instance.com")
Metadata
Release files for veil-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| veil_sdk-0.2.0.tar.gz | 4.6 kB | Without provenance | Details for veil_sdk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| veil_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for veil_sdk-0.2.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / veil_sdk-0.2.0.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | veil_sdk-0.2.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1377d39e47a7465b3155264aaa4a6e34d91b1d7e5e397a91c2353e4d94361de
|
|
BLAKE2b-256 checksum How to use checksums |
69eb6f5caf8a428dfaddfc201e45a44d91c2c475c6c1c72c09813e8c9a5fdbb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / veil_sdk-0.2.0-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | veil_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a559b31558036376d5e08ffea5870328712001539049e35728a1625e6f74c81a
|
|
BLAKE2b-256 checksum How to use checksums |
37dcfc86660aaf8b224c13fba4c03e44fc509083160fd4fbb7d47b5bdaf64ecf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for veil-sdk 0.2.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.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.1.0 2 files With provenance
- Added 0.2.0 2 files Without provenance
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.