Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/agents-define-agent-definitions-openai-api-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  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/define-agents