Orchestrate Agent Collaboration

implementationChallenge

Prompt Content

Using the OpenAI Agents SDK (specifically `client.beta.threads.runs.create`), orchestrate a multi-turn conversation where your primary 'Code Lead Agent' calls the `analyze_python_code` tool. Based on the tool's output, design the agent's response to either suggest fixes directly or delegate further analysis to a specialized 'Security Reviewer Agent' or 'Performance Optimizer Agent'. Demonstrate how agents share context and refine their findings based on subsequent tool calls or internal reasoning. Ensure proper `tool_output` handling.

Try this prompt

Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.

Usage Tips

Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)

Customize placeholder values with your specific requirements and context

For best results, provide clear examples and test different variations