Skip to content

058: OpenAI Agents API demos - #22

Open
tylerprogramming wants to merge 2 commits into
mainfrom
058-openai-agents
Open

tylerprogramming wants to merge 2 commits into
mainfrom
058-openai-agents

Conversation

@tylerprogramming

Copy link
Copy Markdown
Owner

Demo code for video 058 on the OpenAI Agents API (public beta, 2026-09-10). New folder openai_agents_058/, one folder per video as usual.

What is in it

  • 01_hosted_sandbox.py: one sessions.create(stream=True) call. Agent writes primes.py in an OpenAI-hosted sandbox, runs it, reports the output.
  • 02_function_tools.py: a lookup_member function tool. Turn 1 handles requires_action by hand, turn 2 uses sessions.stream(..., tool_handlers=...) on the same session to show memory across turns. environment: none, so no container cost.
  • 03_subagents.py: multi_agent: {enabled: true, max_concurrent_subagents: 3}. Three jobs, three subagents, one answer.
  • common.py: client setup from .env and a Printer that turns the ~30 event types into a readable transcript.
  • README.md: what each demo shows, install (uv and pip), run commands, env vars, expected output per script, notes for camera.
  • pyproject.toml, uv.lock, .env.example.

Verified

  • All three scripts ran end to end against the live API on 2026-09-15 with openai 3.14.0 and gpt-6-astra. Demo 1 about 60s, demo 2 about 40s for two turns, demo 3 about 65s.
  • No script changed after its successful run. No key or .env is in the diff; only .env.example with a placeholder.

Not done

  • CLAUDE.md in the folder. Writes to that file are blocked for headless workers. Tyler said to skip it.
  • No self-hosted codex exec-server demo. It needs a separate environment key from the dashboard Agents tab.

Do not merge without Tyler's word.

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