Back to Catalog

Simulate debates between AI agents using Mistral to optimize answers

HybrohtHybroht
1690 views
2/3/2026
Official Page

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

AI Arena - Debate of AI Agents to Optimize Answers and Simulate Diverse Scenarios

Overview

Version: 1.0

The AI Arena Workflow is designed to facilitate a refined answer generation process by enabling a structured debate among multiple AI agents. This workflow allows for diverse perspectives to be considered before arriving at a final output, enhancing the quality and depth of the generated responses.

✨ Features

  • Multi-Agent Debate Simulation: Engage multiple AI agents in a debate to generate nuanced responses.
  • Configurable Rounds and Agents: Easily adjust the number of debate rounds and participating agents to fit your needs.
  • Contextualized AI Responses: Each agent operates based on predefined roles and characteristics, ensuring relevant and focused discussions.
  • JSON Output: The final output is structured in JSON format, making it easy to integrate with other systems or workflows.

👤 Who is this for?

This workflow is ideal for developers, data scientists, content creators, and businesses looking to leverage AI for decision-making, content generation, or any scenario requiring diverse viewpoints. It is particularly useful for those who need to synthesize information from multiple personalities or perspectives.

💡 What problem does this solve?

The workflow addresses the challenge of generating nuanced responses by simulating a debate among AI agents. This approach ensures that multiple perspectives are considered, reducing bias and enhancing the overall quality of the output. Use-Case examples:

  • 🗓️ Meeting/Interview Simulation
  • ✔️ Quality Assurance
  • 📖 Storywriter Test Environment
  • 🏛️ Forum/Conference/Symposium Simulation

🔍 What this workflow does

The workflow orchestrates a debate among AI agents, allowing them to discuss, critique, and suggest rewrites for a given input based on their roles and predefined characteristics. This collaborative process leads to a more refined and comprehensive final output.

🔄 Workflow Steps

  1. Input & Setup: The initial input is provided, and the AI environment is configured with necessary parameters.
  2. Round Execution: AI agents execute their roles, providing replies and actions based on the input and their individual characteristics.
  3. Round Results: The results of each round are aggregated, and a summary is created to capture the key points discussed by the agents.
  4. Continue to Next Round: If more rounds are defined, the process repeats until the specified number of rounds is completed.
  5. Final Output: The final output is generated based on the agents' discussions and suggestions, providing a cohesive response.

⚡ How to Use/Setup

🔐 Credentials

  • Obtain an API key for the Mistral API or another LLM API. This key is necessary for the AI agents to function properly.

🔧 Configuration

  • Set up the workflow in n8n, ensuring all nodes are correctly configured according to the workflow requirements. This includes setting the appropriate input parameters and defining the roles of each AI agent.
  • This workflow uses a custom node for Global Variables called 'n8n-nodes-globals.' Alternatively, you can use the 'Edit Field (Set)' node to achieve the same functionality.

✏️ Customizing this workflow

  • To customize the workflow, adjust the AI agent parameters in the JSON configuration. This includes defining their roles, personalities, and preferences, which will influence how they interact during the debate. One of the notes includes a ready-to-use example of how to customize the agents and the environment. You can simply edit it and insert it as your credential in the Global Variables node.

📌 Example

printscreen1.png

printscreen2.png

printscreen3.png

An example with both input and final output is provided in a note within the workflow.

🛠️ Tools Used

  • n8n: A workflow automation tool that allows users to connect various applications and services.
  • Mistral API: A powerful language model API used for generating AI responses. (You can replace it with any LLM API of your choice)
  • Podman: A container management tool that allows users to create, manage, and run containers without requiring a daemon. (It serves as an alternative to Docker for container orchestration.)

⚙️ n8n Setup Used

  • n8n Version: 1.100.1
  • n8n-nodes-globals: 1.1.0
  • Running n8n via: Podman 4.3.1
  • Operating System: Linux

⚠️ Notes, Assumptions & Warnings

  • Ensure that the AI agents are configured with clear roles to maximize the effectiveness of the debate. Each agent's characteristics should align with the overall goals of the workflow.
  • The workflow can be adapted for various use cases, including meeting simulations, content generation, and brainstorming sessions.
  • This workflow assumes that users have a basic understanding of n8n and JSON configuration.
  • This workflow assumes that users have access to the necessary API keys and permissions to utilize the Mistral API or other LLM APIs.
  • Ensure that the input provided to the AI agents is clear and concise to avoid confusion in the debate process. Ambiguous inputs may lead to unclear or irrelevant outputs.
  • Monitor the output for relevance and accuracy, as AI-generated content may require human oversight to ensure it meets standards and expectations before being used in production.

ℹ️ About Us

This workflow was developed by the Hybroht team of AI enthusiasts and developers dedicated to enhancing the capabilities of AI through collaborative processes. Our goal is to create tools that harness the possibilities of AI technology and more.

n8n Email Triggered AI Agent Workflow

This n8n workflow demonstrates a basic setup for triggering an AI agent based on incoming emails, processing the email content, and then performing an action. It includes conditional logic and a loop for handling multiple items.

What it does

This workflow automates the following steps:

  1. Triggers on Email: Listens for incoming emails via IMAP.
  2. Conditional Logic: Evaluates the incoming email based on a defined condition.
  3. No Operation (Placeholder): If the condition is false, it proceeds to a "No Operation" node, effectively doing nothing for those items.
  4. Edit Fields: If the condition is true, it modifies or sets fields on the incoming data.
  5. Loop Over Items: Iterates over the processed items, potentially handling multiple emails or data entries.
  6. AI Agent Processing: For each item in the loop, it uses an AI Agent (powered by a Mistral Cloud Chat Model) to process the information.
  7. Simple Memory: The AI Agent utilizes a simple memory buffer for conversational context.
  8. Structured Output Parser: The AI Agent's output is then parsed into a structured format.
  9. Wait: Introduces a pause in the workflow, likely to manage API rate limits or allow for asynchronous operations.
  10. Aggregate: Combines the results from the looped AI agent processing.
  11. Split Out: Separates aggregated data into individual items for further processing.
  12. Manual & Schedule Trigger (Alternative Triggers): Includes additional trigger nodes (Manual and Schedule) which are not connected in the current flow but could be used to initiate the workflow on demand or at set intervals.
  13. Sticky Note: Provides a note for documentation within the workflow canvas.

Prerequisites/Requirements

  • n8n Instance: A running instance of n8n.
  • IMAP Email Account: Access to an email account configured for IMAP to serve as the trigger.
  • Mistral Cloud API Key: An API key for the Mistral Cloud Chat Model to power the AI Agent.

Setup/Usage

  1. Import the Workflow: Import the provided JSON into your n8n instance.
  2. Configure IMAP Credentials:
    • Click on the "Email Trigger (IMAP)" node.
    • Configure your IMAP credentials (host, port, username, password) to connect to your email account.
  3. Configure Mistral Cloud Chat Model Credentials:
    • Click on the "Mistral Cloud Chat Model" node.
    • Provide your Mistral Cloud API Key in the credentials section.
  4. Define Conditional Logic:
    • Click on the "If" node.
    • Set up the condition(s) that will determine whether the email content proceeds to the AI Agent or the "No Operation" path. For example, you might check for specific keywords in the email subject or body.
  5. Customize AI Agent:
    • Click on the "AI Agent" node.
    • Adjust the agent's prompt, tools, and other configurations according to your specific use case for simulating debates or optimizing answers.
  6. Adjust Loop and Wait Times:
    • Modify the "Loop Over Items (Split in Batches)" node to control how many items are processed in each batch.
    • Adjust the "Wait" node's duration if necessary.
  7. Activate the Workflow: Once configured, activate the workflow to start listening for incoming emails.

This workflow provides a flexible foundation for building sophisticated AI-driven email automation.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

Synchronizing WooCommerce inventory and creating products with Google Gemini AI and BrowserAct

Synchronize WooCommerce Inventory & Create Products with Gemini AI & BrowserAct This sophisticated n8n template automates WooCommerce inventory management by scraping supplier data, updating existing products, and intelligently creating new ones with AI-formatted descriptions. This workflow is essential for e-commerce operators, dropshippers, and inventory managers who need to ensure their product pricing and stock levels are synchronized with multiple third-party suppliers, minimizing overselling and maximizing profit. --- Self-Hosted Only This Workflow uses a community contribution and is designed and tested for self-hosted n8n instances only. --- How it works The workflow is typically run by a Schedule Trigger (though a Manual Trigger is also shown) to check stock automatically. It reads a list of suppliers and their inventory page URLs from a central Google Sheet. The workflow loops through each supplier: A BrowserAct node scrapes the current stock and price data from the supplier's inventory page. A Code node parses this bulk data into individual product items. It then loops through each individual product found. The workflow checks WooCommerce to see if the product already exists based on its name. If the product exists: It proceeds to update the existing product's price and stock quantity. If the product DOES NOT exist: An If node checks if the missing product's category matches a predefined type (optional filtering). If it passes the filter, a second BrowserAct workflow scrapes detailed product attributes from a dedicated product page (e.g., DigiKey). An AI Agent (Gemini) transforms these attributes into a specific, styled HTML table for the product description. Finally, the product is created in WooCommerce with all scraped details and the AI-generated description. Error Handling: Multiple Slack nodes are configured to alert your team immediately if any scraping task fails or if the product update/creation process encounters an issue. Note: This workflow does not support image uploads for new products. To enable this functionality, you must modify both the n8n and BrowserAct workflows. --- Requirements BrowserAct API account for web scraping BrowserAct n8n Community Node -> (n8n Nodes BrowserAct) BrowserAct templates named “WooCommerce Inventory & Stock Synchronization” and “WooCommerce Product Data Reconciliation” Google Sheets credentials for the supplier list WooCommerce credentials for product management Google Gemini account for the AI Agent Slack credentials for error alerts --- Need Help? How to Find Your BrowseAct API Key & Workflow ID How to Connect n8n to Browseract How to Use & Customize BrowserAct Templates How to Use the BrowserAct N8N Community Node --- Workflow Guidance and Showcase STOP Overselling! Auto-Sync WooCommerce Inventory from ANY Supplier

Madame AI Team | KaiBy Madame AI Team | Kai
600