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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/running-agents-openai-api-workflow-guide.md | A 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.text | A 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.text | A 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.text | A 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.text | A 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.text | A 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.text | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
