OpenAIResponsesToolResponseAdapter is the default ToolResponseAdapter used whenever you pair an agent with the OpenAI Responses adapter. It converts tool outputs into the payloads the OpenAI Responses API expects and exposes a plain-text summary that hosts can display or log.
Behavior summary
- Plain-text rendering: 
to_plain_textgenerates concise strings for each response type (LinkResponse,JsonResponse,TextResponse,FileResponse,EmptyResponse). Hosts decide whether to show or log that text. - Chat context updates: 
create_messagesreturns OpenAI Responsesfunction_call_outputobjects so the model receives the tool result on the next turn. - Developer logging: Emits events via 
room.developer.log_nowaitto aid debugging when tools are called. 
Response handling
| Response type | Plain text example | Notes | 
|---|---|---|
TextResponse | The returned text | Injected as-is into the chat transcript. | 
JsonResponse | JSON string dump | Useful when the LLM expects structured output. | 
FileResponse | filename.ext | The chat message embeds the file bytes as a base64 input_file blob. | 
LinkResponse | { "name": ..., "url": ... } | Links become JSON strings so the user can follow the URL. | 
EmptyResponse | "ok" | Signals successful execution without additional data. | 
Extending or replacing
You can subclassOpenAIResponsesToolResponseAdapter to tweak the plain-text summary or adjust logging, provided the emitted messages continue to match the OpenAI Responses schema. Alternatively, supply your own adapter instance when constructing the agent (for example, ChatBot(..., tool_adapter=...)).
Where it is used
- Automatically when you construct 
OpenAIResponsesAdapterwithout specifying a customtool_adapter. - In the CLI chatbot and MeshAgent Studio when interacting with OpenAI models.
 - Any agent that wants to reuse the same formatting logic can import and instantiate it directly.
 
Related references
- OpenAI Responses Adapter – provides the LLM integration that uses this adapter.
 - Tool Response Adapters – explains the base interface and customization options.