Vizier Guard (Python SDK)
Deterministic Authorization & Audit Firewall for AI Agent Actions.
Vizier is an ultra-low-latency (sub-2ms) deterministic policy kernel that evaluates proposed AI agent actions before they cause external side-effects (payments, database mutations, external messages, code execution, worker deployments).
Installation
pip install vizier-guard
Zero external dependencies required out of the box (uses Python standard library).
30-Second Quickstart: @vizier_guard Decorator
Wrap any dangerous tool or Python function with deterministic policy rules:
from vizier import VizierClient, vizier_guard
client = VizierClient(
base_url="https://vizier.vassiliy-lakhonin.workers.dev",
api_key="your-vizier-api-key"
)
@vizier_guard(
client=client,
action_type="purchase",
max_amount=500.0,
currency="USD",
allowed_targets=["approved-hotel.com", "supplier-corp.com"]
)
def book_hotel(amount: float, target: str):
# This only runs if Vizier returns ALLOW
print(f"Booking confirmed at {target} for ${amount}")
return {"status": "booked", "amount": amount}
# Allowed: $350 <= $500 to approved target
book_hotel(amount=350.0, target="approved-hotel.com")
# Blocked: $1200 > $500 (raises ActionBlockedError)
book_hotel(amount=1200.0, target="approved-hotel.com")
LangChain Integration
Protect any LangChain BaseTool from agent hallucinations or runaway spending:
from vizier import VizierClient
from vizier.integrations.langchain import VizierLangChainToolGuard
from langchain_community.tools import DuckDuckGoSearchRun
client = VizierClient(api_key="...")
# Wrap your tool
safe_search = VizierLangChainToolGuard(
tool=DuckDuckGoSearchRun(),
client=client,
allowed_actions=["search"],
max_amount=0.0
)
# Pass safe_search into your LangChain or LangGraph agent
agent = create_react_agent(llm, tools=[safe_search])
CrewAI Integration
from vizier.integrations.crewai import VizierCrewAIToolGuard
guarded_tool = VizierCrewAIToolGuard(
tool=my_dangerous_payment_tool,
max_amount=250.0,
agent_id="finance_agent"
)
Standalone Verification
from vizier import VizierClient
vizier = VizierClient(api_key="...")
decision = vizier.check(
action_type="deploy_worker",
target="worker:payment-service",
parameters={"git_commit": "abcdef123..."},
allowed_actions=["deploy_worker"]
)
if decision.is_allowed:
print(f"Action permitted! Receipt ID: {decision.receipt.id}")
else:
print(f"Action rejected ({decision.decision}): {decision.explanation}")
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 vizier_guard-0.3.0.tar.gz.
File metadata
- Download URL: vizier_guard-0.3.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1be1d9036e392d10a36bd44ac8e3080fcdadc704180a9af93b786445c8aa3f82
|
|
| MD5 |
5922582bdaa01168112081d9c532afec
|
|
| BLAKE2b-256 |
248e6f59286469babf968515039168d9f5bcd32b50f14b1bbe731ee8950067d1
|
File details
Details for the file vizier_guard-0.3.0-py3-none-any.whl.
File metadata
- Download URL: vizier_guard-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17fcb0ae4df8f9ed3c93d754cb69c056cf0cde50a826b1e78ca67193d61c476a
|
|
| MD5 |
96bb1bf3af76a7e676fbfe76892cc6ed
|
|
| BLAKE2b-256 |
538201ed127855b80f24c83a81c691336f237048bbea85923de1bf4f7b9f0494
|