Skip to content

Commit 80fee00

Browse files
authored
Merge branch 'main' into bug-468
2 parents eef0f05 + 2020757 commit 80fee00

File tree

134 files changed

+5548
-2383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+5548
-2383
lines changed

.github/workflows/issues.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
days-before-pr-stale: 10
2323
days-before-pr-close: 7
2424
stale-pr-label: "stale"
25+
exempt-pr-labels: "skip-stale"
2526
stale-pr-message: "This PR is stale because it has been open for 10 days with no activity."
2627
close-pr-message: "This PR was closed because it has been inactive for 7 days since being marked as stale."
27-
repo-token: ${{ secrets.GITHUB_TOKEN }}
28+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install pnpm
2222
uses: pnpm/action-setup@v4
2323
with:
24-
version: 10.16.0
24+
version: 10.17.1
2525
run_install: false
2626
- name: Setup Node.js
2727
uses: actions/setup-node@v4

.github/workflows/update-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install pnpm
2525
uses: pnpm/action-setup@v4
2626
with:
27-
version: 10.16.0
27+
version: 10.17.1
2828
run_install: false
2929
- name: Setup Node.js
3030
uses: actions/setup-node@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const getWeatherTool = tool({
162162

163163
const agent = new RealtimeAgent({
164164
name: 'Data agent',
165-
instructions: 'You are a data agent',
165+
instructions: 'You are a data agent. When you are asked to check weather, you must use the available tools.',
166166
tools: [getWeatherTool],
167167
});
168168

docs/astro.config.mjs

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const plugins = [
8787
paths: ['api/**'],
8888
},
8989
],
90-
exclude: ['ja/**'],
90+
exclude: ['ja/**', 'zh/**'],
9191
}),
9292
];
9393

@@ -97,131 +97,150 @@ const sidebar = [
9797
link: '/',
9898
translations: {
9999
ja: '概要',
100+
zh: '概述',
100101
},
101102
},
102103
{
103104
label: 'Quickstart',
104105
link: '/guides/quickstart',
105106
translations: {
106107
ja: 'クイックスタート',
108+
zh: '快速开始',
107109
},
108110
},
109111
{
110112
label: 'Guides',
111113
translations: {
112114
ja: 'ガイド',
115+
zh: '指南',
113116
},
114117
items: [
115118
{
116119
label: 'Agents',
117120
link: '/guides/agents',
118121
translations: {
119122
ja: 'エージェント',
123+
zh: '智能体',
120124
},
121125
},
122126
{
123127
label: 'Running Agents',
124128
link: '/guides/running-agents',
125129
translations: {
126130
ja: 'エージェントの実行',
131+
zh: '运行智能体',
127132
},
128133
},
129134
{
130135
label: 'Results',
131136
link: '/guides/results',
132137
translations: {
133138
ja: 'エージェントの実行結果',
139+
zh: '执行结果',
134140
},
135141
},
136142
{
137143
label: 'Tools',
138144
link: '/guides/tools',
139145
translations: {
140146
ja: 'ツール',
147+
zh: '工具',
141148
},
142149
},
143150
{
144151
label: 'Orchestrating multiple agents',
145152
link: '/guides/multi-agent',
146153
translations: {
147154
ja: 'マルチエージェント',
155+
zh: '多智能体编排',
148156
},
149157
},
150158
{
151159
label: 'Handoffs',
152160
link: '/guides/handoffs',
153161
translations: {
154162
ja: 'ハンドオフ',
163+
zh: '交接',
155164
},
156165
},
157166
{
158167
label: 'Context management',
159168
link: '/guides/context',
160169
translations: {
161170
ja: 'コンテキスト管理',
171+
zh: '上下文管理',
162172
},
163173
},
164174
{
165175
label: 'Models',
166176
link: '/guides/models',
167177
translations: {
168178
ja: 'モデル',
179+
zh: '模型',
169180
},
170181
},
171182
{
172183
label: 'Guardrails',
173184
link: '/guides/guardrails',
174185
translations: {
175186
ja: 'ガードレール',
187+
zh: '护栏',
176188
},
177189
},
178190
{
179191
label: 'Streaming',
180192
link: '/guides/streaming',
181193
translations: {
182194
ja: 'ストリーミング',
195+
zh: '流式传输',
183196
},
184197
},
185198
{
186199
label: 'Human-in-the-loop',
187200
link: '/guides/human-in-the-loop',
188201
translations: {
189202
ja: '人間の介入(HITL)',
203+
zh: '人机协作',
190204
},
191205
},
192206
{
193207
label: 'Model Context Protocol (MCP)',
194208
link: '/guides/mcp',
195209
translations: {
196210
ja: 'MCP 連携',
211+
zh: 'MCP 集成',
197212
},
198213
},
199214
{
200215
label: 'Tracing',
201216
link: '/guides/tracing',
202217
translations: {
203218
ja: 'トレーシング',
219+
zh: '追踪',
204220
},
205221
},
206222
{
207223
label: 'Configuring the SDK',
208224
link: '/guides/config',
209225
translations: {
210226
ja: 'SDK の設定',
227+
zh: 'SDK 配置',
211228
},
212229
},
213230
{
214231
label: 'Troubleshooting',
215232
link: '/guides/troubleshooting',
216233
translations: {
217234
ja: 'トラブルシューティング',
235+
zh: '故障排除',
218236
},
219237
},
220238
{
221239
label: 'Release process',
222240
link: '/guides/release',
223241
translations: {
224242
ja: 'リリースプロセス',
243+
zh: '发布流程',
225244
},
226245
},
227246
],
@@ -230,34 +249,39 @@ const sidebar = [
230249
label: 'Voice Agents',
231250
translations: {
232251
ja: '音声エージェント',
252+
zh: '语音智能体',
233253
},
234254
items: [
235255
{
236256
label: 'Overview',
237257
link: '/guides/voice-agents',
238258
translations: {
239259
ja: '音声エージェントの概要',
260+
zh: '语音智能体概述',
240261
},
241262
},
242263
{
243264
label: 'Quickstart',
244265
link: '/guides/voice-agents/quickstart',
245266
translations: {
246267
ja: 'クイックスタート',
268+
zh: '快速开始',
247269
},
248270
},
249271
{
250272
label: 'Building Voice Agents',
251273
link: '/guides/voice-agents/build',
252274
translations: {
253275
ja: '音声エージェントの構築',
276+
zh: '构建语音智能体',
254277
},
255278
},
256279
{
257280
label: 'Transport Mechanisms',
258281
link: '/guides/voice-agents/transport',
259282
translations: {
260283
ja: 'リアルタイムトランスポート',
284+
zh: '传输机制',
261285
},
262286
},
263287
],
@@ -266,20 +290,31 @@ const sidebar = [
266290
label: 'Extensions',
267291
translations: {
268292
ja: '拡張機能',
293+
zh: '扩展',
269294
},
270295
items: [
271296
{
272297
label: 'Use any model with the AI SDK',
273298
link: '/extensions/ai-sdk',
274299
translations: {
275300
ja: 'AI SDK で任意モデルを指定',
301+
zh: '使用 AI SDK 指定任意模型',
276302
},
277303
},
278304
{
279305
label: 'Connect Realtime Agents to Twilio',
280306
link: '/extensions/twilio',
281307
translations: {
282308
ja: 'Realtime Agent を Twilio に接続',
309+
zh: '将实时智能体连接到 Twilio',
310+
},
311+
},
312+
{
313+
label: 'Cloudflare Workers Transport',
314+
link: '/extensions/cloudflare',
315+
translations: {
316+
ja: 'Cloudflare Workers 用トランスポート',
317+
zh: 'Cloudflare Workers 传输',
283318
},
284319
},
285320
],
@@ -288,6 +323,7 @@ const sidebar = [
288323
label: 'API Reference',
289324
translations: {
290325
ja: 'APIリファレンス',
326+
zh: 'API 参考',
291327
},
292328
collapsed: false,
293329
items: [
@@ -350,6 +386,10 @@ export default defineConfig({
350386
label: '日本語',
351387
lang: 'ja',
352388
},
389+
zh: {
390+
label: '中文',
391+
lang: 'zh',
392+
},
353393
},
354394
social: [
355395
{

docs/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
"translate": "tsx src/scripts/translate.ts"
1212
},
1313
"dependencies": {
14-
"@astrojs/starlight": "^0.35.2",
14+
"@astrojs/starlight": "^0.35.3",
1515
"@astrojs/starlight-tailwind": "^4.0.1",
1616
"@openai/agents": "workspace:*",
17-
"@tailwindcss/vite": "^4.0.17",
18-
"astro": "^5.13.7",
19-
"sharp": "^0.34.2",
17+
"@tailwindcss/vite": "^4.1.13",
18+
"astro": "^5.13.11",
19+
"sharp": "^0.34.4",
2020
"starlight-llms-txt": "^0.6.0",
2121
"starlight-typedoc": "^0.21.3",
22-
"typedoc": "^0.28.1",
23-
"typedoc-plugin-markdown": "^4.8.1"
22+
"typedoc": "^0.28.13",
23+
"typedoc-plugin-markdown": "^4.9.0"
2424
},
2525
"devDependencies": {
26-
"tailwindcss": "^3.3.3",
27-
"tsx": "^4.19.4",
26+
"tailwindcss": "^3.4.17",
27+
"tsx": "^4.20.5",
2828
"typedoc-plugin-frontmatter": "^1.3.0",
29-
"typedoc-plugin-zod": "^1.4.1"
29+
"typedoc-plugin-zod": "^1.4.2"
3030
}
3131
}

docs/src/content/docs/extensions/ai-sdk.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Out of the box the Agents SDK works with OpenAI models through the Responses API
4141
4. Initialize an instance of the model to be used by the agent:
4242

4343
```typescript
44-
const model = aisdk(openai('o4-mini'));
44+
const model = aisdk(openai('gpt-5-mini'));
4545
```
4646

4747
</Steps>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Realtime Agents on Cloudflare
3+
description: Connect your Agents SDK agents from Cloudflare Workers/workerd using a dedicated transport.
4+
---
5+
6+
import { Aside, Steps, Code } from '@astrojs/starlight/components';
7+
import cloudflareBasicExample from '../../../../../examples/docs/extensions/cloudflare-basic.ts?raw';
8+
9+
Cloudflare Workers and other workerd runtimes cannot open outbound WebSockets using the global
10+
`WebSocket` constructor. To simplify connecting Realtime Agents from these environments, the
11+
extensions package provides a dedicated transport that performs the `fetch()`-based upgrade
12+
internally.
13+
14+
<Aside type="caution">
15+
This adapter is still in beta. You may run into edge case issues or bugs.
16+
Please report any issues via [GitHub
17+
issues](https://github.com/openai/openai-agents-js/issues) and we'll fix
18+
quickly. For Node.js-style APIs in Workers, consider enabling `nodejs_compat`.
19+
</Aside>
20+
21+
## Setup
22+
23+
<Steps>
24+
25+
1. **Install the extensions package.**
26+
27+
```bash
28+
npm install @openai/agents-extensions
29+
```
30+
31+
2. **Create a transport and attach it to your session.**
32+
33+
<Code lang="typescript" code={cloudflareBasicExample} />
34+
35+
3. **Connect your `RealtimeSession`.**
36+
37+
```typescript
38+
await session.connect({ apiKey: 'your-openai-ephemeral-or-server-key' });
39+
```
40+
41+
</Steps>
42+
43+
## Notes
44+
45+
- The Cloudflare transport uses `fetch()` with `Upgrade: websocket` under the hood and skips
46+
waiting for a socket `open` event, matching the workerd APIs.
47+
- All `RealtimeSession` features (tools, guardrails, etc.) work as usual when using this transport.
48+
- Use `DEBUG=openai-agents*` to inspect detailed logs during development.

docs/src/content/docs/extensions/twilio.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Using Realtime Agents with Twilio
2+
title: Connect Realtime Agents to Twilio
33
description: Connect your Agents SDK agents to Twilio to use voice agents
44
---
55

0 commit comments

Comments
 (0)