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.2.tar.gz (7.8 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.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: verdicter-1.0.2.tar.gz
  • Upload date:
  • Size: 7.8 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.2.tar.gz
Algorithm Hash digest
SHA256 f1818be59454468cccbf1e75fb6aea410bea428fc5c6b1bc766ffcd2759eb519
MD5 3e167f05fdbeb70ce804a03fcd17306f
BLAKE2b-256 c32b8a7fb318f47d60972cadff321088b0a10067784b7bfc27d07d05dad3f382

See more details on using hashes here.

File details

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

File metadata

  • Download URL: verdicter-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5d69ebac5dc43c29d8a59ce3fd776e4832e6d7f5ee4b24c7a21c2f4829698887
MD5 96a1311690e279c8e4216ebba462f4f5
BLAKE2b-256 7a487a0eecf2fbd5ded48c025cf76b12c49bda1f929f895e21dfbf9d77cebfa6

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