Skip to main content
Loading navigation
Back to prompt library

Agent Orchestration for Fan-out Search and Data Processing

Linked challenge: Perplexity-Powered Growth Intelligence Agent with OpenAI Agents SDK

Prompt source

implementation6 lines1 sectionsNo variables5 checklist items
Design your OpenAI Agent's core logic to perform multi-step reasoning. Given an initial high-level business goal (e.g., 'Identify growth opportunities for a B2B SaaS in the HR tech space'), the agent should:
1.  **Break down the goal** into several sub-queries (e.g., 'top HR tech competitors', 'HR tech market trends 2024', 'pain points for HR managers in SMEs').
2.  **Execute fan-out `perplexity_search` calls** concurrently or sequentially.
3.  **Process raw search results**: Implement Python code (either as an internal agent function or another tool) to filter irrelevant information, deduplicate similar findings, and extract key insights. The agent must synthesize information from multiple search results.
4.  **Identify and score potential growth opportunities**: Define a scoring mechanism based on relevance, feasibility, and potential impact. This logic should be implemented and managed by the agent itself.
5.  **Maintain state**: Ensure the agent effectively aggregates information across multiple turns and tool calls.