OpenAI Agents

Local AgentInspect processor for OpenAI Agents JS. Prefer setTraceProcessors for local-only traces.

How to use @agent-inspect/openai-agents without sending traces to OpenAI's default export pipeline.

Two processor modes

ModeAPIOpenAI default exportAgentInspect traces
Additional processoraddTraceProcessor(agentInspect(...))May still runLocal JSONL via AgentInspect
Replacement listsetTraceProcessors([agentInspect(...)])Disabled when list is only AgentInspectLocal only

For local-only debugging, prefer setTraceProcessors with only the AgentInspect processor unless you explicitly need OpenAI's export.

ts
import { setTraceProcessors } from "@openai/agents";
import { agentInspect } from "@agent-inspect/openai-agents";

setTraceProcessors([
  agentInspect({
    traceDir: ".agent-inspect",
    capture: "metadata-only",
  }),
]);

What maps to AgentInspect steps

  • Agent runs → run / step spans
  • Tool calls → TOOL steps with metadata
  • Handoffs → correlated steps when metadata is present
  • Guardrails → bounded metadata (no certification claims)
  • MCP tool calls → tool steps when the Agents SDK exposes MCP spans

Privacy

  • Default metadata-only capture
  • No automatic upload from AgentInspect
  • Replacing processors does not by itself redact OpenAI SDK network traffic — review OpenAI SDK settings separately

Recipes

Troubleshooting

SymptomCheck
Traces also appear in OpenAI dashboardYou may be using addTraceProcessor alongside default export — switch to setTraceProcessors for local-only
No local filesConfirm processor is registered before agent runs; check traceDir
Missing tool spansEnsure tools run inside a traced agent session

See ADAPTERS.md.

Full reference remains in GitHub docs during the docs migration.