Skip to main content

Runtime security for AI agents — evaluate tool calls against policies in real time

Project description

verdicter

Runtime security for AI agents. Evaluate every tool call against your policies - get ALLOW, DENY, or ESCALATE in under 50ms.

PyPI version Python versions license

Get your free API key at verdicter.dev


Install

pip install verdicter

With LangChain support:

pip install "verdicter[langchain]"

Quick start

import asyncio
from verdicter import Verdicter

client = Verdicter(api_key="verdicter_live_...")

async def main():
    result = await client.evaluate(
        agent_id="support_bot",   # registered in your Verdicter dashboard
        tool="send_email",
        payload={"to": user_email, "subject": subject, "body": body},
    )

    if result.decision == "ALLOW":
        await send_email(payload)
    elif result.decision == "DENY":
        raise PermissionError(f"Blocked: {result.reason}")
    elif result.decision == "ESCALATE":
        await request_human_approval(payload)

Wrap a function

Zero per-call boilerplate - evaluation happens automatically on every invocation:

from verdicter import Verdicter, WrapOptions

client = Verdicter(api_key="verdicter_live_...")

safe_send_email = client.wrap(
    "send_email",
    send_email,
    WrapOptions(agent_id="support_bot"),
)

# Policy enforcement is automatic
await safe_send_email(to=user_email, subject=subject, body=body)

LangChain adapter

from verdicter import Verdicter
from verdicter.adapters.langchain import wrap_tools
from langchain_core.tools import tool

client = Verdicter(api_key="verdicter_live_...")

@tool
def send_email(to: str, subject: str, body: str) -> str:
    """Send an email."""
    ...

# Wrap your tools - every invocation goes through Verdicter
safe_tools = wrap_tools([send_email], client, agent_id="support_bot")

agent = create_react_agent(llm=llm, tools=safe_tools)

Configuration

client = Verdicter(
    api_key="verdicter_live_...",
    timeout=5.0,        # seconds, default 5.0
    max_retries=2,      # default 2
    fail_open=False,    # if True, ALLOW on network errors (default: False = fail closed)
)

Decisions

Decision Meaning
ALLOW Policy passed - run the tool
DENY Policy blocked it - don't run
ESCALATE Needs human review - route to your approval flow

Links


MIT License © Verdicter

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verdicter-1.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verdicter-1.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file verdicter-1.0.1.tar.gz.

File metadata

  • Download URL: verdicter-1.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for verdicter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e839d7acced807fdabbd7babcd858d70a55fa939e217680e2743dfa5dde0dfa0
MD5 2c2fd621be5bddd04cd71710ba067310
BLAKE2b-256 d55ea86d2e696f13025c681de4dd2bbdff07337e2c6bb29d1521102d0556587e

See more details on using hashes here.

File details

Details for the file verdicter-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: verdicter-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for verdicter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eca713c06182d9ffd41328d3fbbfbe3c5d8d0d237e69aeb1388dcc56b0b916eb
MD5 4a8a0ff7da7024088905eaf6a7a21bd5
BLAKE2b-256 cd9c0eee5f294750ea83738811a1daef3bcaae7c2a90e792883b294973c32e1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page