Skip to content

Commit 8008e61

Browse files
authored
Merge branch 'main' into feat/sprites-sandbox
2 parents 7f460d1 + 92e014a commit 8008e61

223 files changed

Lines changed: 12930 additions & 2858 deletions

File tree

Some content is hidden

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

.agents/skills/examples-auto-run/SKILL.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ description: Run python examples in auto mode with logging, rerun helpers, and b
88
## What it does
99

1010
- Runs `uv run examples/run_examples.py` with:
11+
- Optional dependency extras enabled by default:
12+
`litellm`, `any-llm`, `sqlalchemy`, `redis`, `blaxel`, `modal`, `runloop`, and `temporal`.
1113
- `EXAMPLES_INTERACTIVE_MODE=auto` (auto-input/auto-approve).
1214
- Per-example logs under `.tmp/examples-start-logs/`.
1315
- Main summary log path passed via `--main-log` (also under `.tmp/examples-start-logs/`).
@@ -44,13 +46,24 @@ description: Run python examples in auto mode with logging, rerun helpers, and b
4446
.agents/skills/examples-auto-run/scripts/run.sh rerun
4547
```
4648

49+
## Codex execution environment
50+
51+
- When Codex invokes `start` or `rerun`, run the command outside the Codex sandbox by default
52+
(`sandbox_permissions=require_escalated`). Many examples start nested sandboxes, browsers, npm
53+
helpers, or cloud/local service processes; running from inside the Codex sandbox can produce
54+
environment-only failures such as `sandbox-exec: sandbox_apply: Operation not permitted`,
55+
Playwright cache permission errors, or npm cache permission errors.
56+
- Use sandboxed execution only when the user explicitly asks for it or when running a narrow dry-run
57+
/ log inspection command that does not execute examples.
58+
4759
## Defaults (overridable via env)
4860

4961
- `EXAMPLES_INTERACTIVE_MODE=auto`
5062
- `EXAMPLES_INCLUDE_INTERACTIVE=1`
5163
- `EXAMPLES_INCLUDE_SERVER=0`
5264
- `EXAMPLES_INCLUDE_AUDIO=0`
5365
- `EXAMPLES_INCLUDE_EXTERNAL=0`
66+
- `EXAMPLES_UV_EXTRAS="litellm any-llm sqlalchemy redis blaxel modal runloop temporal"` (set to an empty string to disable extras)
5467
- Auto-approvals in auto mode: `APPLY_PATCH_AUTO_APPROVE=1`, `SHELL_AUTO_APPROVE=1`, `AUTO_APPROVE_MCP=1`
5568

5669
## Log locations
@@ -62,7 +75,7 @@ description: Run python examples in auto mode with logging, rerun helpers, and b
6275

6376
## Notes
6477

65-
- The runner delegates to `uv run examples/run_examples.py`, which already writes per-example logs and supports `--collect`, `--rerun-file`, and `--print-auto-skip`.
78+
- The runner delegates to `uv run --extra ... examples/run_examples.py`, which already writes per-example logs and supports `--collect`, `--rerun-file`, and `--print-auto-skip`.
6679
- `start` uses `--write-rerun` so failures are captured automatically.
6780
- If `.tmp/examples-rerun.txt` exists and is non-empty, invoking the skill with no args runs `rerun` by default.
6881

.agents/skills/examples-auto-run/scripts/run.sh

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)"
55
PID_FILE="$ROOT/.tmp/examples-auto-run.pid"
66
LOG_DIR="$ROOT/.tmp/examples-start-logs"
77
RERUN_FILE="$ROOT/.tmp/examples-rerun.txt"
8+
DEFAULT_UV_EXTRAS="litellm any-llm sqlalchemy redis blaxel modal runloop temporal"
9+
10+
build_uv_prefix() {
11+
UV_RUN=(uv run)
12+
local extras_value
13+
if [[ -n "${EXAMPLES_UV_EXTRAS+x}" ]]; then
14+
extras_value="$EXAMPLES_UV_EXTRAS"
15+
else
16+
extras_value="$DEFAULT_UV_EXTRAS"
17+
fi
18+
19+
local extra
20+
for extra in $extras_value; do
21+
UV_RUN+=(--extra "$extra")
22+
done
23+
export EXAMPLES_UV_EXTRAS="$extras_value"
24+
}
825

926
ensure_dirs() {
1027
mkdir -p "$LOG_DIR" "$ROOT/.tmp"
@@ -28,8 +45,9 @@ cmd_start() {
2845
main_log="$LOG_DIR/main_${ts}.log"
2946
stdout_log="$LOG_DIR/stdout_${ts}.log"
3047

48+
build_uv_prefix
3149
local run_cmd=(
32-
uv run examples/run_examples.py
50+
"${UV_RUN[@]}" examples/run_examples.py
3351
--auto-mode
3452
--write-rerun
3553
--main-log "$main_log"
@@ -152,7 +170,8 @@ collect_rerun() {
152170
exit 1
153171
fi
154172
cd "$ROOT"
155-
uv run examples/run_examples.py --collect "$log_file" --output "$RERUN_FILE"
173+
build_uv_prefix
174+
"${UV_RUN[@]}" examples/run_examples.py --collect "$log_file" --output "$RERUN_FILE"
156175
}
157176

158177
cmd_rerun() {
@@ -171,8 +190,9 @@ cmd_rerun() {
171190
export APPLY_PATCH_AUTO_APPROVE="${APPLY_PATCH_AUTO_APPROVE:-1}"
172191
export SHELL_AUTO_APPROVE="${SHELL_AUTO_APPROVE:-1}"
173192
export AUTO_APPROVE_MCP="${AUTO_APPROVE_MCP:-1}"
193+
build_uv_prefix
174194
set +e
175-
uv run examples/run_examples.py --auto-mode --rerun-file "$file" --write-rerun --main-log "$main_log" --logs-dir "$LOG_DIR" 2>&1 | tee "$stdout_log"
195+
"${UV_RUN[@]}" examples/run_examples.py --auto-mode --rerun-file "$file" --write-rerun --main-log "$main_log" --logs-dir "$LOG_DIR" 2>&1 | tee "$stdout_log"
176196
local run_status=${PIPESTATUS[0]}
177197
set -e
178198
return "$run_status"
@@ -194,6 +214,7 @@ Commands:
194214
Environment overrides:
195215
EXAMPLES_INTERACTIVE_MODE (default auto)
196216
EXAMPLES_INCLUDE_SERVER/INTERACTIVE/AUDIO/EXTERNAL (defaults: 0/1/0/0)
217+
EXAMPLES_UV_EXTRAS (default: litellm any-llm sqlalchemy redis blaxel modal runloop; set empty to disable)
197218
APPLY_PATCH_AUTO_APPROVE, SHELL_AUTO_APPROVE, AUTO_APPROVE_MCP (default 1 in auto mode)
198219
EOF
199220
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ cython_debug/
143143
# Ruff stuff:
144144
.ruff_cache/
145145

146+
# Example runtime state
147+
examples/sandbox/extensions/daytona/usaspending_text2sql/.audit_log.jsonl
148+
examples/sandbox/extensions/daytona/usaspending_text2sql/.session_state.json
149+
146150
# PyPI configuration file
147151
.pypirc
148152
.aider*
@@ -154,3 +158,4 @@ tmp/
154158

155159
# execplans
156160
plans/
161+
.vercel

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The OpenAI Agents SDK is a lightweight yet powerful framework for building multi
1717
1. [**Human in the loop**](https://openai.github.io/openai-agents-python/human_in_the_loop/): Built-in mechanisms for involving humans across agent runs
1818
1. [**Sessions**](https://openai.github.io/openai-agents-python/sessions/): Automatic conversation history management across agent runs
1919
1. [**Tracing**](https://openai.github.io/openai-agents-python/tracing/): Built-in tracking of agent runs, allowing you to view, debug and optimize your workflows
20-
1. [**Realtime Agents**](https://openai.github.io/openai-agents-python/realtime/quickstart/): Build powerful voice agents with `gpt-realtime-1.5` and full agent features
20+
1. [**Realtime Agents**](https://openai.github.io/openai-agents-python/realtime/quickstart/): Build powerful voice agents with `gpt-realtime-2` and full agent features
2121

2222
Explore the [examples](https://github.com/openai/openai-agents-python/tree/main/examples) directory to see the SDK in action, and read our [documentation](https://openai.github.io/openai-agents-python/) for more details.
2323

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Here are the main features of the SDK:
2727
- **Sessions**: A persistent memory layer for maintaining working context within an agent loop.
2828
- **Human in the loop**: Built-in mechanisms for involving humans across agent runs.
2929
- **Tracing**: Built-in tracing for visualizing, debugging, and monitoring workflows, with support for the OpenAI suite of evaluation, fine-tuning, and distillation tools.
30-
- **Realtime Agents**: Build powerful voice agents with `gpt-realtime-1.5`, automatic interruption detection, context management, guardrails, and more.
30+
- **Realtime Agents**: Build powerful voice agents with `gpt-realtime-2`, automatic interruption detection, context management, guardrails, and more.
3131

3232
## Agents SDK or Responses API?
3333

@@ -93,5 +93,5 @@ Use this table when you know the job you want to do, but not which page explains
9393
| Keep memory across turns | [Running agents](running_agents.md#choose-a-memory-strategy) and [Sessions](sessions/index.md) |
9494
| Use OpenAI models, websocket transport, or non-OpenAI providers | [Models](models/index.md) |
9595
| Review outputs, run items, interruptions, and resume state | [Results](results.md) |
96-
| Build a low-latency voice agent with `gpt-realtime-1.5` | [Realtime agents quickstart](realtime/quickstart.md) and [Realtime transport](realtime/transport.md) |
96+
| Build a low-latency voice agent with `gpt-realtime-2` | [Realtime agents quickstart](realtime/quickstart.md) and [Realtime transport](realtime/transport.md) |
9797
| Build a speech-to-text / agent / text-to-speech pipeline | [Voice pipeline quickstart](voice/quickstart.md) |

0 commit comments

Comments
 (0)