veto-sdk (Python)
A guardrail system for AI agent tool calls. Veto intercepts and validates tool calls made by AI models before execution.
Installation
pip install veto-sdk
With provider integrations:
pip install veto-sdk[openai] # OpenAI support
pip install veto-sdk[anthropic] # Anthropic support
pip install veto-sdk[langchain] # LangChain support
Quick Start
from veto_sdk import Veto, ToolCallDeniedError, ToolDefinition
# Define tools
tools = [
ToolDefinition(
name="read_file",
description="Read a file",
input_schema={
"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"]
},
handler=lambda args: open(args["path"]).read()
)
]
# Initialize Veto and wrap tools
veto = await Veto.init()
definitions, implementations = veto.wrap_tools(tools)
# Use implementations - validation happens automatically
try:
content = await implementations["read_file"]({"path": "/home/user/file.txt"})
except ToolCallDeniedError as e:
print(f"Blocked: {e.validation_result.reason}")
Configuration
Create veto/rules/defaults.yaml:
rules:
- id: block-system-paths
name: Block system path access
enabled: true
severity: critical
action: block
tools:
- read_file
conditions:
- field: arguments.path
operator: starts_with
value: /etc
API Reference
Veto.init(config_dir="./veto", mode=None)
Initialize Veto asynchronously. Loads config and rules from the specified directory.
veto.wrap_tools(tools)
Wrap tools and return (definitions, implementations).
veto.validate_tool_call(call)
Manually validate a tool call.
veto.get_mode()
Get current operating mode ("strict" or "log").
veto.get_loaded_rules()
Get all loaded rules.
License
Apache-2.0
Metadata
Release files for veto-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 | Actions |
|---|---|---|---|---|
| veto_sdk-0.1.0.tar.gz | 5.6 kB | Without provenance | Details for veto_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| veto_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for veto_sdk-0.1.0-py3-none-any.whl |
Total release size: 10.8 kB
Release files / veto_sdk-0.1.0.tar.gz
| Download URL | veto_sdk-0.1.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56b9feddcb66e2d04c8d24c50bc8c23ed932e54475b471759c8e320042ba6ce7
|
|
BLAKE2b-256 checksum How to use checksums |
9ad50c78dec63fe5927dc6fb832a6d1a24c57c3a86bd4e7457d3efa9a2f42c1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / veto_sdk-0.1.0-py3-none-any.whl
| Download URL | veto_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb7e9bfcc8d2f486cbf0a281d0831ca9e5b202f13f5acf730a62c6d333d85ffd
|
|
BLAKE2b-256 checksum How to use checksums |
9fe788a865ec7f744e7bfa4d411435a77ca7e12a79e0eed07bd386817c76a161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for veto-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.