Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

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