EYDII Verify SDK for Python
EYDII is the trustless verification layer for autonomous AI agents. Check every action before execution — without ever seeing the underlying data. Mathematical attestation. Sub-15ms latency. Content-blind.
Install
pip install veritera
Complete Flow: Zero to Verified in 60 Seconds
from veritera import Eydii
eydii = Eydii(api_key="vt_live_...") # Get your key at id.veritera.ai
# 1. Create a policy (do this once)
policy = eydii.create_policy_sync(
name="finance-controls",
description="Block high-value transactions and dangerous operations",
rules=[
{"type": "action_whitelist", "params": {"allowed": ["payment.read", "payment.create", "balance.check"]}},
{"type": "amount_limit", "params": {"max": 10000, "currency": "USD"}},
{"type": "action_blacklist", "params": {"blocked": ["database.drop", "admin.override"]}},
],
)
print(f"Policy created: {policy.name} (ID: {policy.id})")
# 2. Verify an action
result = eydii.verify_sync(
action="payment.create",
agent_id="finance-bot",
params={"amount": 500, "currency": "USD", "recipient": "vendor@acme.com"},
policy="finance-controls",
)
if result.verified:
print(f"Approved — proof: {result.proof_id}")
# Safe to execute the action
else:
print(f"Blocked — reason: {result.reason}")
# Do NOT execute
# 3. List your policies
for p in eydii.list_policies_sync():
print(f" {p.name} (v{p.version}) — {len(p.rules)} rules")
# 4. Test a policy without executing
test = eydii.test_policy_sync(
policy_id=policy.id,
action="database.drop",
params={"table": "users"},
)
print(f"Test: {test.verdict}") # "denied"
That's it. No GUI needed. No dashboard required. Everything from code.
Async Usage
import asyncio
from veritera import Eydii
async def main():
async with EYDII(api_key="vt_live_...") as eydii:
policy = await eydii.create_policy(
name="email-controls",
rules=[{"type": "rate_limit", "params": {"max_per_hour": 50}}],
)
result = await eydii.verify_decision(
agent_id="support-bot",
action="send_email",
params={"to": "customer@example.com", "subject": "Your refund"},
policy="email-controls",
)
print("Approved" if result.verified else f"Blocked: {result.reason}")
asyncio.run(main())
Generate Policies from Natural Language
Don't want to write JSON rules? Describe what you want in plain English:
result = eydii.generate_policy_sync(
"Only allow my agent to read files, send emails (max 50 per hour), "
"and check balances. Block all deletions and admin operations.",
save=True, # save it immediately
)
print(f"Created: {result['name']}")
print(f"Rules: {result['rules']}")
Use with Framework Integrations
The policy you create here works with all Eydii framework packages:
# Create the policy once
eydii.create_policy_sync("finance-controls", rules=[...])
# Then use it in any framework:
# OpenAI Agents SDK: eydii_protect(tools, policy="finance-controls")
# LangGraph: EydiiVerifyMiddleware(policy="finance-controls")
# CrewAI: EydiiVerifyTool(policy="finance-controls")
# LlamaIndex: EydiiVerifyToolSpec(policy="finance-controls")
| Package | Install |
|---|---|
| eydii-openai | pip install eydii-openai |
| langchain-eydii | pip install langchain-eydii |
| crewai-eydii | pip install crewai-eydii |
| llama-index-tools-eydii | pip install llama-index-tools-eydii |
API Reference
Eydii(api_key, **options)
| Option | Type | Default | Description |
|---|---|---|---|
api_key |
str |
required | Your API key (vt_live_... or vt_test_...) |
base_url |
str |
https://id.veritera.ai |
API base URL |
timeout |
float |
10.0 |
Request timeout (seconds) |
max_retries |
int |
2 |
Retries on 5xx errors |
fail_closed |
bool |
True |
Return denied instead of raising on errors |
debug |
bool |
False |
Enable debug logging |
Verification
| Method | Description |
|---|---|
verify_decision(agent_id, action, params, policy) |
Verify an action (async) |
verify_sync(action, agent_id, params, policy) |
Verify an action (sync) |
get_proof(proof_id) |
Retrieve a verification proof |
verify_proof_locally(attestation, payload, public_key) |
Verify Ed25519 attestation offline |
Policies
| Method | Description |
|---|---|
create_policy(name, rules, description) |
Create a new policy (async) |
create_policy_sync(name, rules, description) |
Create a new policy (sync) |
list_policies() / list_policies_sync() |
List all active policies |
get_policy(policy_id) / get_policy_sync(policy_id) |
Get a policy by ID |
update_policy(policy_id, name, rules, description) / update_policy_sync(...) |
Update a policy |
delete_policy(policy_id) / delete_policy_sync(policy_id) |
Deactivate a policy |
test_policy(policy_id, action, params) / test_policy_sync(...) |
Test a policy without persisting |
generate_policy(prompt, save) / generate_policy_sync(...) |
Generate policy from natural language |
get_policy_templates() |
Get all available policy templates |
Policy Rule Types
| Type | Description | Params |
|---|---|---|
action_whitelist |
Only allow specific actions | {"allowed": ["action1", "action2"]} |
action_blacklist |
Block specific actions | {"blocked": ["action1", "action2"]} |
amount_limit |
Cap transaction amounts | {"max": 10000, "currency": "USD"} |
rate_limit |
Limit action frequency | {"max_per_hour": 50} |
time_window |
Restrict to business hours | {"start": "09:00", "end": "17:00", "timezone": "US/Eastern"} |
require_confirmation |
Flag for human approval | {"actions": ["payment.create"]} |
recipient_constraint |
Control who agent can contact | {"allowed_domains": ["@company.com"]} |
resource_access |
Restrict file/resource access | {"denied_resources": [".env*", "*.key"]} |
custom |
Custom constraint logic | {...} |
Delegations
| Method | Description |
|---|---|
create_delegation(agent_id, allowed_actions, constraints, expires_in) |
Create a scoped delegation |
Account
| Method | Description |
|---|---|
get_usage(period) |
Get billing usage statistics |
health() |
Check API health |
Error Handling
from veritera import EydiiError, RateLimitError
try:
result = await eydii.verify_decision(...)
except RateLimitError as e:
print(f"Rate limited — retry in {e.retry_after_ms}ms")
except EydiiError as e:
print(f"Error: {e.code} ({e.status}): {e}")
Fail-Closed (Default)
When fail_closed=True, network/server errors return a denied result instead of raising. Your agent is blocked, not crashed. This is the safe default.
Circuit Breaker
After 5 consecutive failures, the SDK opens a circuit breaker for 30 seconds. After 30s, one request is allowed through (half-open). On success, the circuit closes.
Requirements
- Python >= 3.9
- Dependencies:
httpx,cryptography
Get Your API Key
- Go to veritera.ai
- Sign up (free tier: 250 verifications)
- Copy your API key from the dashboard
- Set it:
export VERITERA_API_KEY=vt_live_...
License
MIT — EYDII by Veritera
Metadata
Release files for veritera 0.4.1
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 | |
|---|---|---|---|---|
| veritera-0.4.1.tar.gz | 15.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| veritera-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.4 kB
Release files / veritera-0.4.1.tar.gz
| Download URL | veritera-0.4.1.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14c21b16166a6161bb23c11aec788c0da27013d47ce667135123a5e36cf0fb95
|
|
BLAKE2b-256 checksum How to use checksums |
e17225e643610b20e6dc0d3d6e6b6e14b8b019b77ca75e096dd0467ae7c76398
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / veritera-0.4.1-py3-none-any.whl
| Download URL | veritera-0.4.1-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
108f68b4cc83f500665d9b0d384a42618f4a46ce0c14b26b71919262d77c29bc
|
|
BLAKE2b-256 checksum How to use checksums |
aa1a8888039e64f1da310be52592076031a403879b1b359f98a9efb545bdcfde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Security for veritera 0.4.1
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.