vouch-openai
Sign the tool (function) calls an OpenAI agent makes with Vouch Protocol Credentials, so every action an OpenAI-driven agent takes carries a verifiable identity and a non-repudiable record.
It works with the OpenAI Python SDK function calling (Chat Completions and the Responses API) and with the OpenAI Agents SDK, because all of them dispatch to Python tool callables and expose a tool call as a name plus JSON arguments.
Install
pip install vouch-openai
Configure an identity
export VOUCH_DID='did:web:your-agent.example.com'
export VOUCH_PRIVATE_KEY='{"kty":"OKP","crv":"Ed25519",...}'
Generate one with vouch init --domain your-agent.example.com --env, or pass a Signer explicitly.
Sign the model's requested tool call
from openai import OpenAI
from vouch.integrations.openai import sign_tool_call
client = OpenAI()
response = client.chat.completions.create(model="gpt-4o", messages=messages, tools=tools)
for call in response.choices[0].message.tool_calls:
credential = sign_tool_call(call) # binds the action and its arguments
result = dispatch(call) # run your tool
Sign the tool callables
from vouch.integrations.openai import signed_tool, protect
@signed_tool
def get_weather(city: str) -> str:
...
tools = protect([get_weather, send_email]) # every invocation is signed
Verify
from vouch.integrations.openai import verify_tool_call
ok, passport = verify_tool_call(credential)
A tool runs whether or not an identity is resolved; when none is configured, signing is skipped and the call proceeds unsigned.
License
Apache-2.0. Part of Vouch Protocol.
Metadata
Release files for vouch-openai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vouch_openai-0.1.0.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vouch_openai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.6 kB
Release files / vouch_openai-0.1.0.tar.gz
| Download URL | vouch_openai-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ff3289e541c8dabc6516d9d9e7179e04fe11e86bcfdbd760fb71bf4fd095d64
|
|
BLAKE2b-256 checksum How to use checksums |
a14df0baace04280e2010ebb593ad2520992f7146c03108e3acd8cfbef62460e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / vouch_openai-0.1.0-py3-none-any.whl
| Download URL | vouch_openai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78ba526249c4ff8493ee8ee3e6558fdf67a95e7a1b38699f2319ad040d3b91c4
|
|
BLAKE2b-256 checksum How to use checksums |
90c527dc31722fd8d89dc3ad71ab260be0da4c25d961422da4f3037b158ac319
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|