Skip to content

Show agent.asTool() instead of agentAsTool on the TypeScript OpenAI Agents page - #5597

Draft
campoy wants to merge 2 commits into
mainfrom
openai-agents-typescript-native-as-tool
Draft

campoy wants to merge 2 commits into
mainfrom
openai-agents-typescript-native-as-tool

Conversation

@campoy

@campoy campoy commented Oct 29, 2026 •

Copy link
Copy Markdown

What does this PR do?

Updates the TypeScript OpenAI Agents SDK integration page for temporalio/ai-integrations#270, which removes the integration's agentAsTool and makes the OpenAI Agents SDK's own agent.asTool() work in Workflows.

  • Agents as tools now use agent.asTool(). The page drops agentAsTool, its options table and the NestedAgentInterruption error.
  • The notes on nested runs now say what they get from the parent run: its context, runConfig.model for agents that set no model, runConfig.modelSettings, and the runner's model Activity options. They also say that a nested approval pauses the parent run and that a nested run's failure goes back to the model as the tool's output.
  • Breaking: run TypeScript OpenAI Agents as written: agent.asTool() works, runConfig.model no longer overrides an agent's own model, agentAsTool is deprecated ai-integrations#270 also stops cloning agents, so the page now says:
    • runConfig.model applies to agents that set no model of their own, as in the SDK;
    • agent.on(...) lifecycle hooks are supported;
    • asTool() tools must be created in Workflow code, and the nested setups the runner rejects are listed, with the matching error types.

Notes to reviewers

Draft until temporalio/ai-integrations#270 is merged and released. When it is, this page can name the release.

Checked on a build of temporalio/ai-integrations#270, on a local dev server with a scripted model:

That runConfig.sandbox is passed on to nested runs comes from the OpenAI Agents SDK's code. It wasn't run here.

The agent patterns sample moves to agent.asTool() in temporalio/samples-typescript#534.

Vale didn't run locally. The page isn't Prettier-clean on main, so only the changed paragraphs are rewrapped.

@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
temporal-documentation Ready Ready Preview Oct 29, 2026 7:35am UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

This branch was successfully deployed

1 active deployment
Preview — 01881421 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant