openai · OpenAI Platform Docs
Define Agents Agent definitions
Teaches how to architect and configure autonomous agents by defining their core properties, including instructions, model settings, tool integration, handoffs, and structured outputs.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Define Agents Agent definitions
Teaches how to architect and configure autonomous agents by defining their core properties, including instructions, model settings, tool integration, handoffs, and structured outputs.
When To Use
Use when designing an agentic workflow to determine how to package models, tools, and instructions into a single unit or when deciding whether to split a single agent into multiple specialized agents.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/agents-define-agent-definitions-workflow-guide.md | A guide explaining how to configure agent components including models, instructions, tools, and runtime behaviors within an SDK-based workflow. | Questions about a guide explaining how to configure agent components including models, instructions, tools, and runtime behaviors wit... |
examples/agents-define-agent-definitions-openai-agents-typescript-define-agent-wi.typescript | A TypeScript example demonstrating how to define an OpenAI Agent with custom tools using the @openai/agents library. | Exact payloads, commands, or snippets shown in A TypeScript example demonstrating how to define an OpenAI Agent with custom tools using the @openai/agents library. |
examples/agents-define-agent-definitions-openai-agents-define-agent.python | A Python code example demonstrating how to define an Agent with a function tool using the openai-agents library. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to define an Agent with a function tool using the openai-agents library. |
examples/agents-define-agent-definitions-openai-agents-define-agent.typescript | A TypeScript example demonstrating how to instantiate an Agent with a Zod schema for structured output extraction. | Exact payloads, commands, or snippets shown in A TypeScript example demonstrating how to instantiate an Agent with a Zod schema for structured output extraction. |
examples/agents-define-agent-definitions-openai-agents-define-agent-2.python | A Python script demonstrating how to define an Agent with a Pydantic output type and run it using the Runner class. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to define an Agent with a Pydantic output type and run it using the Runner class. |
examples/agents-define-agent-definitions-openai-agents-define-agent-definitions.typescript | A TypeScript code example demonstrating how to define an Agent with custom tools using the @openai/agents library. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to define an Agent with custom tools using the @openai/agents library. |
examples/agents-define-agent-definitions-openai-agents-define-agent-definitions.python | 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.md
