Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

helm_openai_agents-0.4.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

helm_openai_agents-0.4.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

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

Hashes for helm_openai_agents-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e9cdb92c04c1407dd4b8fdd00f3340b0989bc9ee21609b0b895fa245daafe54d
MD5 a3137d68b83c55e32cea0cda5a7e41da
BLAKE2b-256 89333546c6d5be97271a527723b11d5cce90f57448ba106f8d1f7deeca74cc0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for helm_openai_agents-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b235410284cc607e5c4c51c84024ad74440e39c76ffc8f048c695d98f42c65f9
MD5 ac25e1be223be433ad0fbdc46f90b2e2
BLAKE2b-256 029ffbe7b0559afe856152e2f7a2822ce72c5b9c42ae40fd59b1297a7a934cc0

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