Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Running agents | OpenAI API

Teaches the implementation and execution patterns for running autonomous or semi-autonomous agents using the OpenAI API.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Running agents | OpenAI API

Teaches the implementation and execution patterns for running autonomous or semi-autonomous agents using the OpenAI API.

When To Use

Use when implementing the execution loop, tool-calling logic, or orchestration patterns required to operate an AI agent via the OpenAI API.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/running-agents-openai-api-workflow-guide.mdA guide explaining agent runtime loops, conversation strategies, incremental streaming, and error handling for the OpenAI API.Questions about a guide explaining agent runtime loops, conversation strategies, incremental streaming, and error handling for the Op...
examples/running-agents-openai-api-openai-agents-nodejs-run-session.textA Node.js code example demonstrating how to initialize an agent, create a memory session, and execute conversational turns using the OpenAI Agents API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to initialize an agent, create a memory session, and execute conversational...
examples/running-agents-openai-api-openai-agents-python-runner-sqlite-session.textA Python code example demonstrating how to initialize an Agent and use the Runner with a SQLiteSession to manage conversation state.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to initialize an Agent and use the Runner with a SQLiteSession to manage conv...
examples/running-agents-openai-api-openai-api-javascript-agent-run.textA JavaScript code example demonstrating how to initialize an agent and execute a run using the OpenAI API.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to initialize an agent and execute a run using the OpenAI API.
examples/running-agents-openai-api-openai-agents-python-runner.textA Python code example demonstrating how to initialize an Agent and use the Runner to execute conversational turns.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to initialize an Agent and use the Runner to execute conversational turns.
examples/running-agents-openai-api-openai-agents-nodejs-run-stream.textA Node.js code example demonstrating how to initialize an agent and run a streaming execution loop using the OpenAI API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to initialize an agent and run a streaming execution loop using the OpenAI API.
examples/running-agents-openai-api-openai-agents-python-runner-streamed.textA Python code example demonstrating how to use the Agent and Runner classes to execute a streamed interaction with an agent.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the Agent and Runner classes to execute a streamed interaction with an...

What This Skill Covers

  • Defining an agent is only the setup step. The runtime questions are what a single run does, how the next turn continues, and how the workflow behaves when it...
  • Main sections: The agent loop, Choose one conversation strategy, Stream runs incrementally, Handle pauses and failures deliberately, Next steps.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.openai.com/api/docs/guides/agents/running-agents