Skip to content

Commit 8140ac4

Browse files
docs: fixed links
1 parent 9bec11e commit 8140ac4

27 files changed

+189
-193
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import twilioServerExample from '../../../../../examples/realtime-twilio/index.t
99

1010
Twilio offers a [Media Streams API](https://www.twilio.com/docs/voice/media-streams) that sends the
1111
raw audio from a phone call to a WebSocket server. This set up can be used to connect your
12-
[voice agents](../guides/voice-agents) to Twilio. You can use the default Realtime Session transport
12+
[voice agents](/openai-agents-js/guides/voice-agents) to Twilio. You can use the default Realtime Session transport
1313
in `websocket` mode to connect the events coming from Twilio to your Realtime Session. However,
1414
this requires you to set the right audio format and adjust your own interruption timing as phone
1515
calls will naturally introduce more latency than a web-based converstaion.
@@ -63,7 +63,7 @@ connection to Twilio for you, including handling interruptions and audio forward
6363
</Steps>
6464

6565
Any event and behavior that you would expect from a `RealtimeSession` will work as expected
66-
including tool calls, guardrails, and more. Read the [voice agents guide](/guides/voice-agents)
66+
including tool calls, guardrails, and more. Read the [voice agents guide](/openai-agents-js/guides/voice-agents)
6767
for more information on how to use the `RealtimeSession` with voice agents.
6868

6969
## Tips and Considerations

docs/src/content/docs/guides/agents.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ The rest of this page walks through every Agent feature in more detail.
3333
The `Agent` constructor takes a single configuration object. The most commonly‑used
3434
properties are shown below.
3535

36-
| Property | Required | Description |
37-
| --------------- | -------- | ------------------------------------------------------------------------------------------- |
38-
| `name` | yes | A short human‑readable identifier. |
39-
| `instructions` | yes | System prompt (string **or** function – see [Dynamic instructions](#dynamic-instructions)). |
40-
| `model` | no | Model name **or** a custom [`Model`](/openai/agents/interfaces/model/) implementation. |
41-
| `modelSettings` | no | Tuning parameters (temperature, top_p, etc.). |
42-
| `tools` | no | Array of [`Tool`](/openai/agents/type-aliases/tool/) instances the model can call. |
36+
| Property | Required | Description |
37+
| --------------- | -------- | ------------------------------------------------------------------------------------------------------- |
38+
| `name` | yes | A short human‑readable identifier. |
39+
| `instructions` | yes | System prompt (string **or** function – see [Dynamic instructions](#dynamic-instructions)). |
40+
| `model` | no | Model name **or** a custom [`Model`](/openai-agents-js/openai/agents/interfaces/model/) implementation. |
41+
| `modelSettings` | no | Tuning parameters (temperature, top_p, etc.). |
42+
| `tools` | no | Array of [`Tool`](/openai-agents-js/openai/agents/type-aliases/tool/) instances the model can call. |
4343

4444
<Code lang="typescript" code={agentWithTools} title="Agent with tools" />
4545

@@ -83,7 +83,7 @@ use a _triage agent_ that routes the conversation to a more specialised sub‑ag
8383

8484
<Code lang="typescript" code={agentWithHandoffs} title="Agent with handoffs" />
8585

86-
You can read more about this pattern in the [handoffs guide](/guides/handoffs).
86+
You can read more about this pattern in the [handoffs guide](/openai-agents-js/guides/handoffs).
8787

8888
---
8989

@@ -118,7 +118,7 @@ For advanced use‑cases you can observe the Agent lifecycle by listening on eve
118118

119119
Guardrails allow you to validate or transform user input and agent output. They are configured
120120
via the `inputGuardrails` and `outputGuardrails` arrays. See the
121-
[guardrails guide](/guides/guardrails) for details.
121+
[guardrails guide](/openai-agents-js/guides/guardrails) for details.
122122

123123
---
124124

@@ -166,6 +166,6 @@ const agent = new Agent({
166166

167167
## Next steps
168168

169-
- Learn how to [run agents](/guides/running-agents).
170-
- Dive into [tools](/guides/tools), [guardrails](/guides/guardrails), and [models](/guides/models).
169+
- Learn how to [run agents](/openai-agents-js/guides/running-agents).
170+
- Dive into [tools](/openai-agents-js/guides/tools), [guardrails](/openai-agents-js/guides/guardrails), and [models](/openai-agents-js/guides/models).
171171
- Explore the full TypeDoc reference under **@openai/agents** in the sidebar.

docs/src/content/docs/guides/guardrails.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ There are two kinds of guardrails:
1919
Input guardrails run in three steps:
2020

2121
1. The guardrail receives the same input passed to the agent.
22-
2. The guardrail function executes and returns a [`GuardrailFunctionOutput`](/openai/agents/interfaces/guardrailfunctionoutput) wrapped inside an [`InputGuardrailResult`](/openai/agents/interfaces/inputguardrailresult).
23-
3. If `tripwireTriggered` is `true`, an [`InputGuardrailTripwireTriggered`](/openai/agents/classes/inputguardrailtripwiretriggered) error is thrown.
22+
2. The guardrail function executes and returns a [`GuardrailFunctionOutput`](/openai-agents-js/openai/agents/interfaces/guardrailfunctionoutput) wrapped inside an [`InputGuardrailResult`](/openai-agents-js/openai/agents/interfaces/inputguardrailresult).
23+
3. If `tripwireTriggered` is `true`, an [`InputGuardrailTripwireTriggered`](/openai-agents-js/openai/agents/classes/inputguardrailtripwiretriggered) error is thrown.
2424

2525
> **Note**
2626
> Input guardrails are intended for user input, so they only run if the agent is the _first_ agent in the workflow. Guardrails are configured on the agent itself because different agents often require different guardrails.
@@ -30,11 +30,11 @@ Input guardrails run in three steps:
3030
Output guardrails follow the same pattern:
3131

3232
1. The guardrail receives the same input passed to the agent.
33-
2. The guardrail function executes and returns a [`GuardrailFunctionOutput`](/openai/agents/interfaces/guardrailfunctionoutput) wrapped inside an [`OutputGuardrailResult`](/openai/agents/interfaces/outputguardrailresult).
34-
3. If `tripwireTriggered` is `true`, an [`OutputGuardrailTripwireTriggered`](/openai/agents/classes/outputguardrailtripwiretriggered) error is thrown.
33+
2. The guardrail function executes and returns a [`GuardrailFunctionOutput`](/openai-agents-js/openai/agents/interfaces/guardrailfunctionoutput) wrapped inside an [`OutputGuardrailResult`](/openai-agents-js/openai/agents/interfaces/outputguardrailresult).
34+
3. If `tripwireTriggered` is `true`, an [`OutputGuardrailTripwireTriggered`](/openai-agents-js/openai/agents/classes/outputguardrailtripwiretriggered) error is thrown.
3535

3636
> **Note**
37-
> Output guardrails only run if the agent is the _last_ agent in the workflow. For realtime voice interactions see [the voice agents guide](./voice-agents#guardrails).
37+
> Output guardrails only run if the agent is the _last_ agent in the workflow. For realtime voice interactions see [the voice agents guide](/openai-agents-js/guides/voice-agents/build#guardrails).
3838
3939
## Tripwires
4040

docs/src/content/docs/guides/human-in-the-loop.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You can define a tool that requires approval by setting the `needsApproval` opti
2929
- If approval has not been granted or rejected, the tool will return a static message to the agent that the tool call cannot be executed.
3030
- If approval / rejection is missing it will trigger a tool approval request.
3131
3. The agent will gather all tool approval requests and interrupt the execution.
32-
4. If there are any interruptions, the [result](/guides/result) will contain an `interruptions` array describing pending steps. A `ToolApprovalItem` with `type: "tool_approval_item"` appears when a tool call requires confirmation.
32+
4. If there are any interruptions, the [result](/openai-agents-js/guides/result) will contain an `interruptions` array describing pending steps. A `ToolApprovalItem` with `type: "tool_approval_item"` appears when a tool call requires confirmation.
3333
5. You can call `result.state.approve(interruption)` or `result.state.reject(interruption)` to approve or reject the tool call.
3434
6. After handling all interruptions, you can resume execution by passing the `result.state` back into `runner.run(agent, state)` where `agent` is the original agent that triggered the overall run.
3535
7. The flow starts again from step 1.

docs/src/content/docs/guides/models.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import setTracingExportApiKeyExample from '../../../../../examples/docs/config/s
1414
Every Agent ultimately calls an LLM. The SDK abstracts models behind two lightweight
1515
interfaces:
1616

17-
- [`Model`](/openai/agents/interfaces/model) – knows how to make _one_ request against a
17+
- [`Model`](/openai-agents-js/openai/agents/interfaces/model) – knows how to make _one_ request against a
1818
specific API.
19-
- [`ModelProvider`](/openai/agents/interfaces/modelprovider) – resolves human‑readable
19+
- [`ModelProvider`](/openai-agents-js/openai/agents/interfaces/modelprovider) – resolves human‑readable
2020
model **names** (e.g. `'gpt‑4o'`) to `Model` instances.
2121

2222
In day‑to‑day work you normally only interact with model **names** and occasionally
@@ -67,17 +67,17 @@ The OpenAI provider defaults to `gpt‑4o`. Override per agent or globally:
6767

6868
`ModelSettings` mirrors the OpenAI parameters but is provider‑agnostic.
6969

70-
| Field | Type | Notes |
71-
| ------------------- | ------------------------------------------ | ----------------------------------------------------------- |
72-
| `temperature` | `number` | Creativity vs. determinism. |
73-
| `topP` | `number` | Nucleus sampling. |
74-
| `frequencyPenalty` | `number` | Penalise repeated tokens. |
75-
| `presencePenalty` | `number` | Encourage new tokens. |
76-
| `toolChoice` | `'auto' \| 'required' \| 'none' \| string` | See [forcing tool use](/guides/agents.md#forcing-tool-use). |
77-
| `parallelToolCalls` | `boolean` | Allow parallel function calls where supported. |
78-
| `truncation` | `'auto' \| 'disabled'` | Token truncation strategy. |
79-
| `maxTokens` | `number` | Maximum tokens in the response. |
80-
| `store` | `boolean` | Persist the response for retrieval / RAG workflows. |
70+
| Field | Type | Notes |
71+
| ------------------- | ------------------------------------------ | ------------------------------------------------------------------------- |
72+
| `temperature` | `number` | Creativity vs. determinism. |
73+
| `topP` | `number` | Nucleus sampling. |
74+
| `frequencyPenalty` | `number` | Penalise repeated tokens. |
75+
| `presencePenalty` | `number` | Encourage new tokens. |
76+
| `toolChoice` | `'auto' \| 'required' \| 'none' \| string` | See [forcing tool use](/openai-agents-js/guides/agents#forcing-tool-use). |
77+
| `parallelToolCalls` | `boolean` | Allow parallel function calls where supported. |
78+
| `truncation` | `'auto' \| 'disabled'` | Token truncation strategy. |
79+
| `maxTokens` | `number` | Maximum tokens in the response. |
80+
| `store` | `boolean` | Persist the response for retrieval / RAG workflows. |
8181

8282
Attach settings at either level:
8383

@@ -118,6 +118,6 @@ inspect the complete execution graph of your workflow.
118118

119119
## Next steps
120120

121-
- Explore [running agents](/guides/running-agents).
122-
- Give your models super‑powers with [tools](/guides/tools).
123-
- Add [guardrails](/guides/guardrails) or [tracing](/guides/tracing) as needed.
121+
- Explore [running agents](/openai-agents-js/guides/running-agents).
122+
- Give your models super‑powers with [tools](/openai-agents-js/guides/tools).
123+
- Add [guardrails](/openai-agents-js/guides/guardrails) or [tracing](/openai-agents-js/guides/tracing) as needed.

docs/src/content/docs/guides/quickstart.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,6 @@ To review what happened during your agent run, navigate to the
169169

170170
Learn how to build more complex agentic flows:
171171

172-
- Learn about configuring [Agents](/guides/agents).
173-
- Learn about [running agents](/guides/running-agents).
174-
- Learn about [tools](/guides/tools), [guardrails](/guides/guardrails), and [models](/guides/models).
172+
- Learn about configuring [Agents](/openai-agents-js/guides/agents).
173+
- Learn about [running agents](/openai-agents-js/guides/running-agents).
174+
- Learn about [tools](/openai-agents-js/guides/tools), [guardrails](/openai-agents-js/guides/guardrails), and [models](/openai-agents-js/guides/models).

docs/src/content/docs/guides/results.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { Code } from '@astrojs/starlight/components';
77
import handoffFinalOutputTypes from '../../../../../examples/docs/results/handoffFinalOutputTypes.ts?raw';
88
import historyLoop from '../../../../../examples/docs/results/historyLoop.ts?raw';
99

10-
When you [run your agent](/guides/running-agents), you will either receive a:
10+
When you [run your agent](/openai-agents-js/guides/running-agents), you will either receive a:
1111

12-
- [`RunResult`](/openai/agents/classes/runresult) if you call `run` without `stream: true`
13-
- [`StreamedRunResult`](/openai/agents/classes/streamedrunresult) if you call `run` with `stream: true`. For details on streaming, also check the [streaming guide](/guides/streaming).
12+
- [`RunResult`](/openai-agents-js/openai/agents/classes/runresult) if you call `run` without `stream: true`
13+
- [`StreamedRunResult`](/openai-agents-js/openai/agents/classes/streamedrunresult) if you call `run` with `stream: true`. For details on streaming, also check the [streaming guide](/openai-agents-js/guides/streaming).
1414

1515
## Final output
1616

@@ -52,23 +52,23 @@ In streaming mode it can also be useful to access the `currentAgent` property th
5252

5353
## New items
5454

55-
The `newItems` property contains the new items generated during the run. The items are [`RunItem`](/openai/agents/type-aliases/runitem)s. A run item wraps the raw item generated by the LLM. These can be used to access additionally to the output of the LLM which agent these events were associated with.
55+
The `newItems` property contains the new items generated during the run. The items are [`RunItem`](/openai-agents-js/openai/agents/type-aliases/runitem)s. A run item wraps the raw item generated by the LLM. These can be used to access additionally to the output of the LLM which agent these events were associated with.
5656

57-
- [`RunMessageOutputItem`](/openai/agents/classes/runmessageoutputitem) indicates a message from the LLM. The raw item is the message generated.
58-
- [`RunHandoffCallItem`](/openai/agents/classes/runhandoffcallitem) indicates that the LLM called the handoff tool. The raw item is the tool call item from the LLM.
59-
- [`RunHandoffOutputItem`](/openai/agents/classes/runhandoffoutputitem) indicates that a handoff occurred. The raw item is the tool response to the handoff tool call. You can also access the source/target agents from the item.
60-
- [`RunToolCallItem`](/openai/agents/classes/runtoolcallitem) indicates that the LLM invoked a tool.
61-
- [`RunToolCallOutputItem`](/openai/agents/classes/runtoolcalloutputitem) indicates that a tool was called. The raw item is the tool response. You can also access the tool output from the item.
62-
- [`RunReasoningItem`](/openai/agents/classes/runreasoningitem) indicates a reasoning item from the LLM. The raw item is the reasoning generated.
63-
- [`RunToolApprovalItem`](/openai/agents/classes/runtoolapprovalitem) indicates that the LLM requested approval for a tool call. The raw item is the tool call item from the LLM.
57+
- [`RunMessageOutputItem`](/openai-agents-js/openai/agents/classes/runmessageoutputitem) indicates a message from the LLM. The raw item is the message generated.
58+
- [`RunHandoffCallItem`](/openai-agents-js/openai/agents/classes/runhandoffcallitem) indicates that the LLM called the handoff tool. The raw item is the tool call item from the LLM.
59+
- [`RunHandoffOutputItem`](/openai-agents-js/openai/agents/classes/runhandoffoutputitem) indicates that a handoff occurred. The raw item is the tool response to the handoff tool call. You can also access the source/target agents from the item.
60+
- [`RunToolCallItem`](/openai-agents-js/openai/agents/classes/runtoolcallitem) indicates that the LLM invoked a tool.
61+
- [`RunToolCallOutputItem`](/openai-agents-js/openai/agents/classes/runtoolcalloutputitem) indicates that a tool was called. The raw item is the tool response. You can also access the tool output from the item.
62+
- [`RunReasoningItem`](/openai-agents-js/openai/agents/classes/runreasoningitem) indicates a reasoning item from the LLM. The raw item is the reasoning generated.
63+
- [`RunToolApprovalItem`](/openai-agents-js/openai/agents/classes/runtoolapprovalitem) indicates that the LLM requested approval for a tool call. The raw item is the tool call item from the LLM.
6464

6565
## State
6666

67-
The `state` property contains the state of the run. Most of what is attached to the `result` is derived from the `state` but the `state` is serializable/deserializable and can also be used as input for a subsequent call to `run` in case you need to [recover from an error](/guides/running-agents#exceptions) or deal with an [`interruption`](#interruptions).
67+
The `state` property contains the state of the run. Most of what is attached to the `result` is derived from the `state` but the `state` is serializable/deserializable and can also be used as input for a subsequent call to `run` in case you need to [recover from an error](/openai-agents-js/guides/running-agents#exceptions) or deal with an [`interruption`](#interruptions).
6868

6969
## Interruptions
7070

71-
If you are using `needsApproval` in your agent, your `run` might trigger some `interruptions` that you need to handle before continuing. In that case `interruptions` will be an array of `ToolApprovalItem`s that caused the interruption. Check out the [human-in-the-loop guide](/guides/human-in-the-loop) for more information on how to work with interruptions.
71+
If you are using `needsApproval` in your agent, your `run` might trigger some `interruptions` that you need to handle before continuing. In that case `interruptions` will be an array of `ToolApprovalItem`s that caused the interruption. Check out the [human-in-the-loop guide](/openai-agents-js/guides/human-in-the-loop) for more information on how to work with interruptions.
7272

7373
## Other information
7474

0 commit comments

Comments
 (0)