You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`helpers`: Shared utilities for testing and other internal use.
32
33
33
34
## Repo Structure & Important Files
34
35
35
36
-`packages/agents-core/`, `packages/agents-openai/`, `packages/agents-realtime/`, `packages/agents-extensions/`: Each has its own `package.json`, `src/`, `test/`, and build scripts.
36
-
-`docs/`: Documentation source; run with `pnpm docs:dev` or build with `pnpm -F docsbuild`.
37
+
-`docs/`: Documentation source; develop with `pnpm docs:dev` or build with `pnpm docs:build`.
37
38
-`examples/`: Subdirectories (e.g. `basic`, `agent-patterns`) with their own `package.json` and start scripts.
38
-
-`scripts/dev.ts`: Runs concurrent build-watchers and the docs dev server (`pnpm dev`).
39
+
-`scripts/dev.mts`: Runs concurrent build-watchers and the docs dev server (`pnpm dev`).
39
40
-`scripts/embedMeta.ts`: Generates `src/metadata.ts` for each package before build.
40
41
-`helpers/tests/`: Shared test utilities.
41
42
-`README.md`: High-level overview and installation instructions.
@@ -50,7 +51,7 @@ The OpenAI Agents JS repository is a pnpm-managed monorepo that provides:
50
51
51
52
Before submitting changes, ensure all checks pass:
52
53
53
-
### Unit Tests and Type Checking Examples
54
+
### Unit Tests and Type Checking
54
55
55
56
- Check the compilation across all packages and examples:
56
57
```bash
@@ -61,11 +62,19 @@ Before submitting changes, ensure all checks pass:
61
62
CI=1 pnpm test
62
63
```
63
64
- Tests are located under each package in `packages/<pkg>/test/`.
64
-
-Using `CI=1`makes sure that the tests don't automatically run in watch mode
65
+
-The test script already sets `CI=1`to avoid watch mode.
65
66
66
67
### Integration Tests
67
68
68
-
- Do NOT try to run them. Integration tests currently require a valid OpenAI Account.
69
+
- Not required for typical contributions. These tests rely on a local npm registry (Verdaccio) and other environment setup.
70
+
- To run locally only if needed:
71
+
```bash
72
+
pnpm local-npm:start # starts Verdaccio on :4873
73
+
pnpm local-npm:publish # public pacakges to the local repo
74
+
pnpm test:integration # runs integration tests
75
+
```
76
+
77
+
See [this README](integration-tests/README.md) for details.
69
78
70
79
### Code Coverage
71
80
@@ -106,7 +115,7 @@ Before submitting changes, ensure all checks pass:
106
115
- Documentation site:
107
116
```bash
108
117
pnpm docs:dev
109
-
pnpm -F docsbuild
118
+
pnpm docs:build
110
119
```
111
120
- Examples:
112
121
```bash
@@ -132,6 +141,11 @@ Before submitting changes, ensure all checks pass:
132
141
- Run `pnpm lint` and fix all errors locally.
133
142
- Use `pnpm build` to catch type errors.
134
143
144
+
## Prerequisites
145
+
146
+
- Node.js 22+ recommended.
147
+
- pnpm 10+ (`corepack enable` is recommended to manage versions).
148
+
135
149
## Development Workflow
136
150
137
151
1. Sync with `main` (or default branch).
@@ -160,7 +174,8 @@ Before submitting changes, ensure all checks pass:
Copy file name to clipboardExpand all lines: docs/src/content/docs/guides/voice-agents/quickstart.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ import thinClientExample from '../../../../../../examples/docs/voice-agents/thin
44
44
45
45
2.**Generate a client ephemeral token**
46
46
47
-
As this application will run in the users browser, we need a secure way to connect to the model through the Realtime API. For this we can use a[ephemeral client key](https://platform.openai.com/docs/guides/realtime#creating-an-ephemeral-token) that should get generated on your backend server. For testing purposes you can also generate a key using `curl` and your regular OpenAI API key.
47
+
As this application will run in the user's browser, we need a secure way to connect to the model through the Realtime API. For this we can use an[ephemeral client key](https://platform.openai.com/docs/guides/realtime#creating-an-ephemeral-token) that should be generated on your backend server. For testing purposes you can also generate a key using `curl` and your regular OpenAI API key.
48
48
49
49
```bash
50
50
curl -X POST https://api.openai.com/v1/realtime/sessions \
0 commit comments