Skip to main content

Orchestrate multi-agent energy optimization with OpenAI GPT and Claude

Workflow preview

Workflow preview
100%
Orchestrate multi-agent energy optimization with OpenAI GPT and Claude preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow runs manually to orchestrate multi agent analysis for a thermodynamic system, using OpenAI and Anthropic models to interpret sensor inputs, optimize energy usage, plan ...

Best for

  • Engineering automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.toolcalculator, @n8n/n8n-nodes-langchain.toolcode, @n8n/n8n-nodes-langchain.lmchatanthropic, n8n-nodes-base.switch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Cheng Siong Chin.

Original n8n.io source

1.1 Workflow description

Title
Orchestrate multi-agent energy optimization with OpenAI GPT and Claude
Workflow name
Orchestrate multi-agent energy optimization with OpenAI GPT and Claude

Quick Overview

This workflow runs manually to orchestrate multi-agent analysis for a thermodynamic system, using OpenAI and Anthropic models to interpret sensor inputs, optimize energy usage, plan and execute tasks, validate results, and send an HTTP alert if validation fails.

How it works

  1. Starts when you manually trigger the workflow with initial system state, temperature, energy budget, and a task queue.
  2. Uses OpenAI (GPT-5-mini) to analyze the provided sensor context, detect anomalies, and output structured sensor readings with confidence scores.
  3. Uses OpenAI (GPT-5-mini) plus a calculator and custom energy-analysis code tool to compute efficiency/entropy metrics and propose an optimized energy allocation.
  4. Uses OpenAI (GPT-5-mini) to build an execution plan and energy estimate for the queued tasks based on the optimized budget and sensor state.
  5. Uses Anthropic (Claude Sonnet) to execute the planned task sequence within the estimated energy limit and return structured outcomes and actual energy usage.
  6. Uses Anthropic (Claude Sonnet) to validate thermodynamic compliance by comparing planned vs. actual energy and generating recommendations.
  7. If validation passes, compiles a final system report and returns the final system state; if validation fails, generates recalibration parameters and posts a JSON alert to an external webhook endpoint.

Setup

  1. Add credentials for OpenAI (Chat) and Anthropic (Chat) so the Perception, Energy Optimization, Planning, Execution, Validation, and Recalibration agents can run.
  2. Replace the placeholder alert webhook URL in the HTTP Request step and configure HTTP Header Auth credentials for the target alerting endpoint.
  3. Provide the required input fields on trigger (systemState, temperature, energyBudget, and taskQueue) or adjust the prompts to match your data structure.
  4. If your execution step needs real environment context, add or connect a node that supplies the referenced environment data (the workflow currently references “Fetch Environment Data” but does not include it).

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Initialize System

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Perception Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 3 - GPT Model - Perception

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 4 - Perception Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 5 - Energy Optimization Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 6 - GPT Model - Energy

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 7 - Thermodynamic Calculator

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 8 - Energy Analysis Tool

Type / Role
@n8n/n8n-nodes-langchain.toolCode - toolCode
Config choices
Version 1.3

Block 9 - Energy Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 10 - Planning Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 11 - GPT Model - Planning

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 12 - Planning Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 13 - Execution Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 14 - Claude Model - Execution

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.5

Block 15 - Execution Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 16 - Validation Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 17 - Claude Model - Validation

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.5

Block 18 - Validation Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 19 - Route by Validation

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 20 - Generate System Report

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 21 - Merge Final Results

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 22 - Recalibration Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 23 - Send Alert

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 24 - Final System State

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Showing the first 24 of 33 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Orchestrate multi-agent energy optimization with OpenAI GPT and Claude
Complexity advanced
Nodes 33
Categories Engineering, AI Chatbot
Author Cheng Siong Chin
Published 14 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16343/16343.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Orchestrate multi-agent energy optimization with OpenAI GPT and Claude do?

Quick Overview This workflow runs manually to orchestrate multi agent analysis for a thermodynamic system, using OpenAI and Anthropic models to interpret sensor inputs, optimize energy usage, plan ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, AI Chatbot use case.