@@ -41,6 +41,7 @@ def auto_instrument(
4141 google_genai : bool = True ,
4242 agno : bool = True ,
4343 claude_agent_sdk : bool = True ,
44+ openai_agent_sdk : bool = True ,
4445 dspy : bool = True ,
4546 adk : bool = True ,
4647) -> dict [str , bool ]:
@@ -61,6 +62,7 @@ def auto_instrument(
6162 google_genai: Enable Google GenAI instrumentation (default: True)
6263 agno: Enable Agno instrumentation (default: True)
6364 claude_agent_sdk: Enable Claude Agent SDK instrumentation (default: True)
65+ openai_agent_sdk: Enable OpenAI Agent SDK instrumentation (default: True)
6466 dspy: Enable DSPy instrumentation (default: True)
6567 adk: Enable Google ADK instrumentation (default: True)
6668
@@ -124,6 +126,8 @@ def auto_instrument(
124126 results ["agno" ] = _instrument_integration (AgnoIntegration )
125127 if claude_agent_sdk :
126128 results ["claude_agent_sdk" ] = _instrument_integration (ClaudeAgentSDKIntegration )
129+ if openai_agent_sdk :
130+ results ["openai_agent_sdk" ] = _instrument_openai_agent_sdk ()
127131 if dspy :
128132 results ["dspy" ] = _instrument_dspy ()
129133 if adk :
@@ -140,6 +144,16 @@ def _instrument_openai() -> bool:
140144 return False
141145
142146
147+ def _instrument_openai_agent_sdk () -> bool :
148+ with _try_patch ():
149+ from agents import set_trace_processors
150+ from braintrust .wrappers .openai import BraintrustTracingProcessor
151+
152+ set_trace_processors ([BraintrustTracingProcessor ()])
153+ return True
154+ return False
155+
156+
143157def _instrument_integration (integration ) -> bool :
144158 with _try_patch ():
145159 return integration .setup ()
0 commit comments