OpenAI Agents SDK Integration
Pass SigmodxRunHooks to Runner.run. Tool inputs are hashed on start; decisions are logged on tool completion.
Install
pip install "sigmodx-integrations[openai-agents]"Requires sigmodx ≥ 0.5.0 for trade and forecast scenario helpers.
Quickstart
pip install sigmodx sigmodx-integrations[openai-agents]
from agents import Agent, Runner
from sigmodx import SigmodxClient
from sigmodx_integrations.openai_agents import (
SigmodxRunHooks,
OPENAI_ANOMALY_CONFIG,
)
client = SigmodxClient(
api_key="your-api-key",
agent_id="your-agent-uuid",
)
hooks = SigmodxRunHooks(
client=client,
config=OPENAI_ANOMALY_CONFIG,
)
agent = Agent(
name="AnomalyDetector",
instructions="Analyze financial transactions for anomalies.",
tools=[check_transaction, flag_anomaly, clear_transaction],
)
result = await Runner.run(
agent,
"Check transaction TXN-2026-4421",
hooks=hooks,
)Preset configs: OPENAI_INVOICE_CONFIG, OPENAI_GL_CONFIG, OPENAI_ANOMALY_CONFIG, OPENAI_TRADE_CONFIG, OPENAI_FORECAST_CONFIG.
How it works
on_tool_startstores tool inputs for client-side hashing.on_tool_endextracts the decision type and rationale, then submits to Sigmodx.- Preset
filter_toolslimits logging to decision tools only. - Errors never block agent execution unless you set
raise_on_error=True.
Full documentation
CrewAI callbacks, LangChain handler, LangGraph stream events, and the universal adapter are documented in the repository README.
github.com/Sigmodx/integrations-python →