Building Multi-Agent Workflows with OpenAI Agent Builder | Alpha | PandaiTech

Building Multi-Agent Workflows with OpenAI Agent Builder

Learn how to use OpenAI’s visual interface to create complex AI workflows. This tutorial covers setting up a 'Classifier Agent' to filter users (leads vs. customers), using logic nodes for routing, and connecting a 'Support Agent' to your business data vector store.

Learning Timeline
Key Insights

Choosing the Reasoning Level

The reasoning level depends entirely on the task at hand. Technical support tasks require high or medium reasoning because they involve problem-solving, whereas Sales Lead tasks only need minimal reasoning as they focus on gathering basic data.

Pro-Tip: Agent Prompts Meta-Strategy

If you're stuck writing agent prompts, use ChatGPT and instruct it to act as a 'Prompt Generator' to create precise instructions for your agents within the builder.
Prompts

Classifier Agent Prompt

Target: OpenAI Agent Builder
Look at the inquiry and tell us if this is an existing customer with a support ticket or a new user. Classify that inquiry as an existing customer with the support question or a new user based on that data.

Sales Lead Agent Prompt

Target: OpenAI Agent Builder
Act as a helpful and knowledgeable sales assistant. Capture data about this lead by asking: what's your website URL, what's your company name, what's your email, how many visits do you get per month, and what are you currently using? Gather that and structure the data.
Step by Step

Building a Multi-Agent Workflow in OpenAI Builder

  1. Start by adding an 'Input as text' node as the primary source for messages received from users.
  2. Add a 'Classifier Agent' immediately after the input to filter the type of inquiry.
  3. Assign a name and Prompt to the Classifier Agent (e.g., to detect if the user is an existing customer or a new prospect).
  4. Insert a 'Logic' node to handle routing based on the classification results.
  5. Set logic conditions: If the input is classified as 'Existing Customer', route it to the 'Support Agent'. If it's a 'New Lead', route it to the 'Sales Agent'.
  6. Connect the outputs from the Logic node to the specific agents built for those categories.
  7. Use the 'Enhance' button in the prompt section to automatically optimize agent instructions using AI.

Agent Configuration and Data Integration

  1. Select the 'Reasoning' level for each agent: Use 'High Reasoning' for complex tasks (like Support) and 'Minimal' for simple tasks (like data collection).
  2. Click on 'Vector Store' to connect company documents or databases as context references for the agent.
  3. Add 'Tools' or 'MCPS' (such as Slack or a Database) if you want the agent to send data directly to external platforms.
  4. Go to the 'Output Format' section and change the format to 'JSON' if you need structured data for CRM systems.
  5. Enter a specific 'Schema' in the settings if you want the JSON output to follow a particular data format.

More from Build & Deploy Autonomous AI Agents

View All