Skip to main content

Vendor-neutral governance SDK for enterprise AI agents

Project description

vantageai — Python SDK

Vendor-neutral governance SDK for enterprise AI agents.

Install

pip install vantageai

Quick Start

import asyncio
from vantageai import VantageClient

async def main():
    client = VantageClient(api_key="your-api-key", agent_id="your-agent-id")

    # Log an event
    await client.log_event(type="llm_call", input={"model": "gpt-4o"})

    # Execution trace
    trace = await client.start_execution(session_id="session-123")
    await client.log_step(trace.id, step={
        "stepNumber": 1, "type": "tool_call", "toolName": "search"
    })
    await client.complete_execution(trace.id, status="complete")

    # Policy evaluation
    result = await client.evaluate(
        action_type="send_email",
        action_payload={"to": "user@example.com"},
    )
    if result.decision == "block":
        print("Action blocked:", result.reason)
    elif result.decision == "pending_approval":
        approval = await client.wait_for_approval(result.approval_request_id)
        print("Approved by:", approval.resolved_by)

    # Intent shift enforcement
    intent = await client.start_intent(declared_intent="Reconcile Q1 invoices")
    shift = await client.log_shift(
        intent.id,
        observed_intent="Approve duplicate payment of $28,000",
        severity="critical",
    )
    if shift.decision == "block":
        print("Blocked by policy")
    elif shift.decision == "pending_approval":
        approval = await client.wait_for_approval(shift.approval_request_id)
        print("Approved by:", approval.resolved_by)

asyncio.run(main())

Sync Usage

from vantageai import VantageClientSync

client = VantageClientSync(api_key="your-api-key", agent_id="your-agent-id")
client.log_event(type="llm_call")

LangChain Integration

from vantageai import VantageClient
from vantageai.integrations.langchain import VantageCallbackHandler

client = VantageClient(api_key="your-api-key", agent_id="your-agent-id")
handler = VantageCallbackHandler(client)

# Pass handler to any LangChain chain/agent
chain.invoke({"input": "..."}, config={"callbacks": [handler]})

Admin & Settings APIs

from vantageai import VantageClientSync

client = VantageClientSync(api_key="your-api-key", agent_id="your-agent-id")

# Webhooks
webhook = client.create_webhook(
    url="https://httpbin.org/post",
    events=["policy_blocked", "intent_shift"],
)
client.list_webhooks()
client.delete_webhook(webhook.id)

# Members + audit log
client.list_members()
client.get_audit_log()

# Retention
client.get_retention_policy()
client.update_retention_policy(events_retention_days=90, traces_retention_days=90)

# Billing
client.get_billing_subscription()
client.get_billing_usage()
client.create_billing_upgrade("pro")
client.create_billing_portal()

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.2.1.tar.gz (13.0 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.2.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vantageai-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7bda7e4cca5a8554479d6286b59bb35e1bdba5a2fe483e0533028fa662671a64
MD5 c6dcb622fbed7fc1b83f9b1b216c3a8d
BLAKE2b-256 8632c5ed6be7522d0ea63c6cca049caa6df3992bbbe1c1763664435e4eddd4d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vantageai-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52fd1941312c642b60bb3cf8e0282835bbdbce6fdd7522192d367b6e89055d3e
MD5 0b5bfc8ad83a02ae7b6b33490d33de58
BLAKE2b-256 31070de3790c4638e7ed0bf07da40e4d4d484435b21cbe35c6ad6d4f4f3139a0

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