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]})
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.0.tar.gz
(10.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vantageai-0.2.0.tar.gz.
File metadata
- Download URL: vantageai-0.2.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ef2d3cd1b2b9dcc181dd9353077ecbd5bf282d427f557e5d09a16cd1b6fc20b
|
|
| MD5 |
724a6fbe3678484786dc3cd2fb46b356
|
|
| BLAKE2b-256 |
450ffbd6b0ea9d1a9fad4d288d6a3773c2a017e7332bcb955621ce2b99fdcdc8
|
File details
Details for the file vantageai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: vantageai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f2873928afbc317f2dce191633bc27a6d786337901b7a6bd750b40331b23c3e
|
|
| MD5 |
3be7e4cdb487185217307f2d24ec7495
|
|
| BLAKE2b-256 |
7510e0241349e57fcf60feff72096f199f02cb2d170d301582d739be78636f4a
|