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.0.tar.gz (23.6 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.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vantageai-0.4.0.tar.gz
  • Upload date:
  • Size: 23.6 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.0.tar.gz
Algorithm Hash digest
SHA256 9c4a00c9958ba192bbb9411a6d5d4a03fc937e373f45ad71dea03391ac76d25c
MD5 0e20a40d304848d0169c3391c33e6fbb
BLAKE2b-256 a4bee25bebdb9e61fe175cbcb815c91d46143c0ff35bfabb92b458a6d5e0042f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vantageai-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8798a9918a8f5698130de49b5b04a86815ba745a28a31229a6d820a1f8672caa
MD5 a60d30dc582a0422e7d33e6f12115c07
BLAKE2b-256 44e823761960463638d21cc39e52fff7c1db29ad9b1006dc2f86cab22e7c83e3

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