openai · OpenAI Platform Docs
Define Agents Agent definitions | OpenAI API
Teaches how to structure and define agent personas, instructions, and capabilities within the OpenAI API framework.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Define Agents Agent definitions | OpenAI API
Teaches how to structure and define agent personas, instructions, and capabilities within the OpenAI API framework.
When To Use
Use when you need to configure the identity, system instructions, and operational boundaries of an AI agent to ensure it performs specific tasks correctly.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/agents-define-agent-definitions-openai-api-workflow-guide.md | A guide explaining the components of an agent including instructions, tools, handoffs, and structured outputs within the OpenAI SDK. | Questions about a guide explaining the components of an agent including instructions, tools, handoffs, and structured outputs within... |
examples/agents-define-agent-definitions-openai-api-openai-agents-define-agent-ja.text | A JavaScript code example demonstrating how to define an agent with a tool using the OpenAI Agents API. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to define an agent with a tool using the OpenAI Agents API. |
examples/agents-define-agent-definitions-openai-api-openai-agents-define-agent-py.text | A Python code example demonstrating how to define an Agent using the Agent class and a function tool. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define an Agent using the Agent class and a function tool. |
examples/agents-define-agent-definitions-openai-api-openai-agents-define-agent-ty.text | A TypeScript code example demonstrating how to define an agent with a Zod schema for structured output. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to define an agent with a Zod schema for structured output. |
examples/agents-define-agent-definitions-openai-api-openai-agents-define-agent-py-2.text | A Python code example demonstrating how to define an OpenAI Agent using Pydantic models for structured output. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define an OpenAI Agent using Pydantic models for structured output. |
examples/agents-define-agent-definitions-openai-api-openai-agents-define-agent-de.text | A TypeScript code example demonstrating how to define an agent and its associated tools using the OpenAI API. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to define an agent and its associated tools using the OpenAI API. |
examples/agents-define-agent-definitions-openai-api-openai-agents-define-agent-py-3.text | A Python code example demonstrating how to define an agent using dataclasses and function tools within the OpenAI Agents framework. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define an agent using dataclasses and function tools within the OpenAI Age... |
What This Skill Covers
- An agent is the core unit of an SDK-based workflow. It packages a model, instructions, and optional runtime behavior such as tools, guardrails, MCP servers,...
- Main sections:
What belongs on an agent,Start with one focused agent,Shape instructions, handoffs, and outputs,Keep local context separate from model context,When to split one agent into several.
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/define-agents
