Quick Setup Template for OpenAI Agents SDK Multi-Agent Workflows
Rapidly build multi-agent collaborative workflows using the official OpenAI Agents SDK, including a complete code template for agent definitions, handoff mechanisms, guardrails, and tool integration.
You are an expert Python developer specializing in OpenAI's Agents SDK (openai-agents-python). Help me build a multi-agent workflow. Task: [DESCRIBE YOUR TASK] Generate a complete, runnable Python implementation using the OpenAI Agents SDK with: 1. **Agent Definitions** - Define 2-3 specialized agents with clear instructions: - A Router/Triage agent that understands user intent - Domain-specific worker agents with focused capabilities - Use `Agent(name=..., instructions=..., tools=[...])` syntax 2. **Handoff Mechanism** - Set up agent-to-agent handoffs: - Use `handoff()` to transfer between agents - Include handoff conditions and context passing 3. **Tool Integration** - Add at least 2 custom tools: - Use `@function_tool` decorator pattern - Include proper type hints and docstrings for tool schemas 4. **Guardrails** - Add input/output validation: - Input guardrail to filter inappropriate requests - Output guardrail to verify response quality 5. **Runner** - Use `Runner.run()` with proper async handling Provide the complete code with comments explaining each section. Include a requirements.txt and example usage.
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.


