OpenAI Agents SDK Integration

Pass SigmodxRunHooks to Runner.run. Tool inputs are hashed on start; decisions are logged on tool completion.

← All integrations

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_start stores tool inputs for client-side hashing.
  • on_tool_end extracts the decision type and rationale, then submits to Sigmodx.
  • Preset filter_tools limits 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 →