Skip to main content

Vendor-neutral governance SDK for enterprise AI agents

Project description

vantageai

Python SDK for Vantage governance, execution-boundary enforcement, and brokered model execution.

Install

pip install vantageai

Core Client

from vantageai import VantageClient

client = VantageClient(
    api_key="vt-...",
    agent_id="mortgage-underwriter",
    base_url="https://api.vantage.ai",
)

Evaluate, Authorize, Commit

decision = await client.evaluate(
    action_type="approve_large_loan",
    action_payload={"amount": 850000, "applicantId": "app-123"},
)

authorization = await client.authorize(
    action_type="openai.chat.completions.create",
    action_payload={
        "model": "gpt-4.1-mini",
        "messages": [{"role": "user", "content": "Review this file"}],
    },
    execution_trace_id="trace-123",
    ttl_seconds=120,
)

if authorization.decision == "allow" and authorization.authorization:
    await client.commit_authorization(
        authorization.authorization.id,
        action_payload={
            "model": "gpt-4.1-mini",
            "messages": [{"role": "user", "content": "Review this file"}],
        },
        execution_trace_id="trace-123",
    )

Brokered Provider Execution

result = await client.broker_openai_chat_completion(
    request={
        "model": "gpt-4.1-mini",
        "messages": [{"role": "user", "content": "Review this mortgage application"}],
        "stream": False,
    },
    execution_trace_id="trace-123",
    ttl_seconds=180,
)

if result.decision == "allow":
    print(result.authorizationId, result.commitAttemptId, result.completion)

Anthropic and OpenAI-compatible broker client helpers are available too:

from vantageai import create_brokered_anthropic_client, create_brokered_openai_client

openai = create_brokered_openai_client(client, execution_trace_id="trace-123", ttl_seconds=180)
anthropic = create_brokered_anthropic_client(client, execution_trace_id="trace-123", ttl_seconds=180)

Observed Wrappers

from openai import OpenAI
from vantageai import VantageClient, wrap_openai_client

vantage = VantageClient(api_key="vt-...", agent_id="mortgage-underwriter")
openai = wrap_openai_client(OpenAI(api_key="..."), vantage)

await openai.chat.completions.create(
    model="gpt-4.1-mini",
    messages=[{"role": "user", "content": "Summarize this file"}],
)

Observed wrappers keep post-execution logging behavior. If the org is in broker-required mode, strict logging surfaces that violation instead of silently claiming execution was governed.

Operator Visibility

boundary = await client.get_execution_boundary_settings()
authorizations = await client.list_execution_authorizations(limit=20)
attempts = await client.list_execution_commit_attempts(limit=20)
performance = await client.get_performance_snapshot()

Sync Usage

from vantageai import VantageClientSync

client = VantageClientSync(api_key="vt-...", agent_id="mortgage-underwriter")
snapshot = client.get_execution_boundary_settings()

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

vantageai-0.4.2.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

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

vantageai-0.4.2-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file vantageai-0.4.2.tar.gz.

File metadata

  • Download URL: vantageai-0.4.2.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for vantageai-0.4.2.tar.gz
Algorithm Hash digest
SHA256 1234300edffb25534358ad0ea8d858951633a75aa19c1aaef6d2715b4c0a78d4
MD5 5d1be82b5482109fb90866bfd8de1ebd
BLAKE2b-256 825d8e59ea4bd519806c5da2c10e2602ee75f7efde6cf23ac7e38fae185ec5cc

See more details on using hashes here.

File details

Details for the file vantageai-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: vantageai-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for vantageai-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e786b8597037668eb654a7f1c25b976dc8d772b2128eb29ecbfcb56705fed0be
MD5 e2335ca7429a9eaa5aaba071c002e88f
BLAKE2b-256 92381c6aa6fbd611ac8bc56b636bb05b7207c55cfd36b9543a431060e2d8d779

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