Skip to main content
There are two ways to give an OpenAI model Corsair’s tools. Use the Agents SDK if you’re building with @openai/agents; use the Responses API if you’re calling the model directly over HTTP.
Use OpenAIAgentsProvider to connect Corsair to the OpenAI Agents SDK.

Install

Usage

agent.ts
OpenAIAgentsProvider.build() is async. It dynamically imports @openai/agents as an optional peer dependency. Pass the tool function from @openai/agents so the provider can wrap each Corsair tool in the correct format.