Verdict Python SDK
The synchronous tryverdictguard-sdk package (imported as tryverdictguard_sdk) evaluates proposed tool actions against Verdict Core. It returns the decision for your application to inspect; it never invokes a downstream tool.
Requires Python 3.11 or newer.
Licensed under Apache-2.0. See LICENSE.
Install
pip install tryverdictguard-sdk
Provide credentials from Verdict Core directly or with VERDICT_CLIENT_ID,
VERDICT_CLIENT_SECRET, and VERDICT_DPOP_PRIVATE_KEY. The key value is the
base64url-encoded Ed25519 private key (dpop_private_key_b64). VERDICT_BASE_URL
defaults to https://api.tryverdictguard.com; set it explicitly for local development.
Evaluate a proposed action
from tryverdictguard_sdk import VerdictClient
with VerdictClient(agent_id="billing-agent") as verdict:
decision = verdict.evaluate(
tool_name="refund_payment",
original_args={"payment_id": "pay_123", "amount_usd": 25.00},
session_id="checkout-session-1001",
end_user_id="user_456",
risk_category="FINANCIAL",
monetary_value_usd=25.00,
pre_flight_snapshot={"payment_status": "captured"},
)
if decision.verdict_status == "ALLOWED":
# Decide in application code whether and how to invoke the tool.
pass
The evaluation request contains correlation_id, agent_id, session_id,
end_user_id, tool_name, risk_category, monetary_value_usd,
original_args, and pre_flight_snapshot. The session ID, end-user ID, risk
category, and monetary value are required on
every evaluation so separate users and sessions are not accidentally combined
or assigned guessed decision inputs; a correlation ID is generated when omitted.
EvaluationResult includes the execution ID, status,
policy/block information, computed diff, latency, RPM, session spend, and record
hash when supplied. Unknown status strings are preserved.
Authenticated endpoints
Evaluation and each method below use a fresh Ed25519 DPoP proof on every request:
record_intent(tool_name, raw_arguments, llm_model, correlation_id=None)posts to/v1/telemetry/intent.wait_for_escrow(execution_id)makes one GET to/v1/guard/escrow/{execution_id}/wait. It does not poll automatically; every non-2xx response, including HTTP 408, is surfaced asVerdictAPIError.commit_snapshot(execution_id, execution_output)posts to/v1/guard/commit-snapshot.
OAuth client-credentials tokens are obtained from /oauth2/token, cached until
shortly before expiry, and fetched again when needed. Protected requests use
Authorization: DPoP <access_token>. DPoP htu values exclude query strings
and fragments as specified by RFC 9449; request URLs retain their encoded query
and path components.
VerdictAPIError exposes status_code, operation, and an optional request ID.
VerdictTransportError identifies network and timeout failures. Error messages
avoid including response bodies or credentials. The client owns its HTTP
connection pool; use it as a context manager or call close().
Metadata
Release files for tryverdictguard-sdk 1.0.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 |
|---|---|---|---|---|
| tryverdictguard_sdk-1.0.0.tar.gz | 16.2 kB | Without provenance | Details for tryverdictguard_sdk-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tryverdictguard_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for tryverdictguard_sdk-1.0.0-py3-none-any.whl |
Total release size: 29.5 kB
Release files / tryverdictguard_sdk-1.0.0.tar.gz
| Download URL | tryverdictguard_sdk-1.0.0.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c3ce2a620c69337319687d1a4c6b467c77b451f4c3aa162f21e92d09235faae
|
|
BLAKE2b-256 checksum How to use checksums |
dc4e5f4a4744f05ec48c9585c93aaae7dcc2e43a1095784e15752bdbdb1ded87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / tryverdictguard_sdk-1.0.0-py3-none-any.whl
| Download URL | tryverdictguard_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d007891cf9586373f1c66b964f2dfa5b3e31439d52348804bcd564b18e126092
|
|
BLAKE2b-256 checksum How to use checksums |
f857a63bcc35f67d2d88caf45fb1738cc00d3219c27d24d607d1a9c9d5ce25c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for tryverdictguard-sdk 1.0.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.