HELM governance adapter for openai agents — fail-closed tool calling for AI agents
Project description
HELM × OpenAI Agents SDK (Python)
Route tool execution through HELM governance in under 5 minutes.
Install
pip install helm # or: pip install -e sdk/python/
Quick Integration
from helm_openai_agents import HelmToolExecutor, wrap_openai_tool
# 1. Create executor pointing to your HELM instance
executor = HelmToolExecutor(helm_url="http://localhost:8080")
# 2. Execute tools through governance
result = executor.execute("search_web", {"query": "HELM governance"})
print(f"Verdict: {result.receipt.verdict}")
print(f"Receipt: {result.receipt.receipt_id}")
# 3. Export EvidencePack
pack_hash = executor.export_evidence_pack("evidence.tar")
print(f"Pack SHA-256: {pack_hash}")
# 4. Verify offline
# helm verify --bundle evidence.tar
With OpenAI Agents SDK
from agents import Agent, Runner
from helm_openai_agents import HelmToolExecutor
executor = HelmToolExecutor(
helm_url="http://localhost:8080",
fail_closed=True, # Deny on HELM unreachable
metadata={"org": "acme", "env": "production"},
)
# Wrap your tool functions
@executor.wrap_openai_tool
def search_web(query: str) -> str:
return f"Results for: {query}"
agent = Agent(name="researcher", tools=[search_web])
result = Runner.run_sync(agent, "Search for HELM governance")
Proxy Mode (Zero Code Changes)
# Start HELM proxy
helm proxy --upstream https://api.openai.com/v1
# Point your app at the proxy
export OPENAI_BASE_URL=http://localhost:9090/v1
python your_app.py # Every tool call is now governed
Tests
cd sdk/python && pytest openai_agents/ -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 helm_openai_agents-0.4.0.tar.gz.
File metadata
- Download URL: helm_openai_agents-0.4.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9cdb92c04c1407dd4b8fdd00f3340b0989bc9ee21609b0b895fa245daafe54d
|
|
| MD5 |
a3137d68b83c55e32cea0cda5a7e41da
|
|
| BLAKE2b-256 |
89333546c6d5be97271a527723b11d5cce90f57448ba106f8d1f7deeca74cc0c
|
File details
Details for the file helm_openai_agents-0.4.0-py3-none-any.whl.
File metadata
- Download URL: helm_openai_agents-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b235410284cc607e5c4c51c84024ad74440e39c76ffc8f048c695d98f42c65f9
|
|
| MD5 |
ac25e1be223be433ad0fbdc46f90b2e2
|
|
| BLAKE2b-256 |
029ffbe7b0559afe856152e2f7a2822ce72c5b9c42ae40fd59b1297a7a934cc0
|