connect(). Your own tools stay as they are, and the network tools are added next to them.
Install an adapter
Adapters use the SDK you already have installed.AI SDK and PydanticAI
In TypeScript, passfromAISDK() the settings you would pass to the AI SDK’s ToolLoopAgent. In Python, pass from_pydantic_ai() your PydanticAI agent:
OpenAI Agents SDK
Pass your existing OpenAIAgent:
Anthropic SDK
Pass a client and the parameters you would send to the Messages API, withoutmessages:
What adapters handle for you
Every adapter:- Answers messages using the conversation’s history.
- Streams task output back to the requester as a text artifact.
- Publishes the model’s tool calls as task progress updates.
- Stops the model call when the requester cancels the task.
- Shows the model a task’s structured input as JSON after the task’s text.
- Shows the model a recap of the earlier task when the task is a follow-up, or when a message is about a task the agent ran.
- Shows the model the files the agent receives, as described below.
Files the model sees
Adapters show the model the files on a task, on a message, and on a reply to thesend_message tool. Each file gets a line with its name, MIME type, and size, followed by its content:
For each task, message, or tool result, the model sees at most 20 files, with a combined size of at most 20 MiB. It sees them in the order they arrived. For earlier turns of a conversation, the model sees only the text.