Skip to main content
Page stub. Full content lives in the README — OpenAI Agents SDK.

TL;DR

from hexgate.adapters.openai import HexgateRunner
from hexgate.runtime import User

runner = HexgateRunner()                            # picks up HEXGATE_KEY
result = await runner.run(
    agent,
    "What's the weather in Cherbourg?",
    user=User(user_id="alice", role="member"),
)
HexgateRunner is a drop-in replacement for agents.Runner. It wraps the agent’s tools with a PolicyEnforcer at construction time and opens a User scope around each run / run_sync / run_streamed call.