Перевірити рівеньКурсиПрограмиДля командТарифи
RUУвійтиРеєстрація
Перевірити рівеньКурсиПрограмиДля командТарифиТест із ClaudeПромптиБлогПитання та відповідіПошукРеєстраціяRU
AcademlКурсиOpenAI Agents & OrchestrationAgent Orchestration: Routines and Handoffs
Звернення «Хочу повернути замовлення» потрапляє в лоток агента з поверненьЦикл агента: думка, дія, спостереженняОдин розʼєм MCP, до якого підключені файли, Git і памʼять
Курс

OpenAI Agents & Orchestration

Модуль 1 · Agent Orchestration: Routines and Handoffs
01Agent Orchestration: Routines and Handoffs
Модуль 2 · Coding Agent with GPT-4.1
02Coding Agent: GPT-6 Astra + Agents SDK
Модуль 3 · Reasoning Models + Function Calls
03Function Calls with Reasoning Models (Responses API)
Модуль 4 · Multi-Agent Systems with Structured Outputs
04Multi-Agent: Structured Outputs + Triage Pattern
Модуль 5 · Structured Outputs: Basics and Pydantic
05Structured Outputs: JSON Schema + Pydantic
OpenAI Agents & Orchestration · Урок 1

Agent Orchestration: Routines and Handoffs

Exploring orchestration patterns from the OpenAI cookbook: routines as instructions plus tools, handoffs for transferring control between agents, a hand-written loop on the Responses API and the production version in the OpenAI Agents SDK.

ENМатеріали курсів поки англійською. Інтерфейс, ШІ-наставник і перевірка завдань — українською.

35 хв читанняОновлено 02.12.20263 питання у квізіГотовий промпт включено

Routines and Agents

A routine is a set of steps: natural-language instructions plus the tools needed to execute them. LLMs handle conditional branches inside routines robustly without a rigid state machine.

OpenAI described routines and handoffs in the cookbook article "Orchestrating Agents: Routines and Handoffs". That article is now marked as archived. The ideas still hold, and the production implementation lives in the OpenAI Agents SDK (see the last section). The code below uses the Responses API, which OpenAI recommends for all new projects.

from openai import OpenAI
import json

client = OpenAI()

instructions = (
    "You are a customer support agent for ACME Inc. "
    "Follow the following routine with the user:\n"
    "1. Ask probing questions to understand the user's problem.\n"
    "2. Propose a fix (make one up).\n"
    "3. ONLY if not satisfied, offer a refund.\n"
    "4. If accepted, search for the ID and then execute refund."
)

def look_up_item(search_query):
    """Use to find item ID."""
    return "item_132612938"

def execute_refund(item_id, reason="not provided"):
    """Refund an item by its ID."""
    print(f"Refunding item {item_id}, reason: {reason}")
    return "success"

Далі урок відкривається після безкоштовної реєстрації

Реєстрація через email або Google відкриває перші два уроки кожного курсу назавжди і 7 днів повного доступу до всього каталогу. Картка не потрібна.

Зареєструватися безкоштовноАбо пробний урок без реєстрації →
У цьому уроці
Routines and AgentsAutomatic Function Schema GenerationExecuting Tool Calls and HandoffsWhen to Use HandoffsThe Production Version: OpenAI Agents SDKПрактикаГотовий промптКвіз
КурсиКурси з LLMДля командТарифиПитання та відповідіБлогПро насКонфіденційність
© 2026 AcademlРозробка та просування сайтів —MMIX — Marketing Mix
Почати безкоштовно