Multi-Agent Architecture for PR Outreach

This approach uses the OpenAI Agents SDK to decompose the complex task of PR outreach into three specialized, modular agents. By separating concerns, you can create a more robust system than a single monolithic prompt.

  • Orchestration Agent: Acts as the central controller. It manages the high-level strategy and coordinates the workflow between the research and copywriter agents.
  • Research Agent: Tasked with gathering data on the product, identifying industry trends, and curating a list of relevant journalists and media outlets.
  • Copywriter Agent: Uses the data provided by the research agent to draft personalized, compelling pitches tailored to specific media outlets and journalists.

Implementation Strategy

The system is built using the Runner.run_streamed() method, which allows for asynchronous execution and real-time output. To maximize the utility of these agents, they are converted into tools using the .as_tool() method. This allows the main 'Outreach Agent' to dynamically invoke the research and writing capabilities as needed, effectively creating a hierarchical agentic workflow.

Key Workflow Steps:

  1. Define Instructions: Create specific, persona-based instructions for each agent (e.g., "You are a researcher tasked with finding journalists in the plant-based industry").
  2. Tool Integration: Wrap the specialized agents into tools that the primary orchestrator can call.
  3. Execution: Use the trace context to monitor the agent's decision-making process and generate the final output.

This modular design allows developers to swap out models (e.g., using gpt-4o-mini for cost efficiency) or add new agents (such as a sentiment analysis agent or a contact-finding agent) without refactoring the entire pipeline.