OpenAI Agents SDK - Handoffs (Multi Agent System)
Автор: Mustafa Tawab
Загружено: 2025-11-13
Просмотров: 14
Описание:
Fitness Coach
fitness_coach = Agent(
name="Fitness Coach",
instructions=(
"You're a running coach. Ask 1-2 quick questions, then give a week plan. "
"Keep it simple and encouraging. No medical advice."
),
)
Study Coach
study_coach = Agent(
name="Study Coach",
instructions=(
"You're a study planner. Ask for current routine, then give a 1-week schedule. "
"Keep steps small and doable."
),
)
Router that decides who should OWN the conversation
router = Agent(
name="Coach Router",
instructions=(
"Route the user:\n"
"- If message is about running, workout, stamina → handoff to Fitness Coach.\n"
"- If it's about exams, study plan, focus, notes → handoff to Study Coach.\n"
"After handoff, the specialist should continue the conversation."
),
handoffs=[study_coach, handoff(fitness_coach)],
)
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: