Build sophisticated AI agents in n8n using a Think-Act architecture. This n8n workflow leverages OpenRouter language models and robust n8n node configurations for complex, multi-step reasoning tasks.
Download this n8n workflow template and start using it instantly.
This n8n workflow demonstrates how to construct highly reliable and multi-step AI agents using the Think-Act architectural pattern. This pattern separates the planning (Thinking) phase from the execution (Acting) phase, leading to more accurate, auditable, and structured outputs. The entire system is built upon various OpenRouter models, offering flexible access to leading LLMs. The structure utilizes multiple interconnected n8n node setups to manage different tasks, triggered by dedicated webhooks, showcasing a scalable approach to deploying sophisticated AI services using n8n templates. This workflow is ideal for scenarios requiring intricate logical steps, like sophisticated data extraction, complex query resolution, or multi-tool execution.
This n8n workflow is initiated by one of two distinct webhooks, allowing for two parallel agent pipelines. We will trace the first pipeline triggered by the start-thinking n8n trigger:
start-thinking webhook. The request payload is passed immediately to the Config Code n8n node, which typically sets up initial context, prompts, and tools for the agent.Think LangChain Agent n8n node. This agent, configured with the OpenRouter Chat Model4 and supported by the Thinking output parser, determines the required steps, tools, and overall strategy to solve the initial problem.Think agent—the plan—is passed to the Act LangChain Agent n8n node. The Act agent uses the OpenRouter Chat Model and Task Output Parser to execute the steps defined in the plan, generating the final result.No Operation, do nothing), which serves as the integration point for subsequent actions in your extended n8n templates.To deploy this comprehensive n8n workflow, follow these steps:
start-thinking and get-weather). Activate the workflow and test the URLs associated with these triggers to ensure they are correctly receiving input data.Config and Config1 Code n8n nodes. These nodes define the system prompts, tool schemas, and initial context passed to the AI agents. You must customize the JavaScript within these nodes to define the specific capabilities and goals of your agents. Webhook (start-thinking / get-weather): Serves as the initial n8n trigger for the agent pipelines. It accepts incoming HTTP requests to start the reasoning process.
Code (Config / Config1): Critical n8n node for setting up the agent context. Used to inject dynamic variables, tools definitions (not explicitly shown but implied for Agent nodes), and specific system instructions before invoking the LLM.
LangChain Agent (Think / Act): The core intelligence of this n8n workflow. The 'Think' agent creates the plan, and the 'Act' agent executes the planned steps. Both are essential n8n node types for complex AI orchestration.
OpenRouter Chat Model (Multiple Instances): Functions as the Large Language Model provider. Used extensively throughout the workflow—in the Think Agent, the Act Agent, and within the Output Parsers—to handle reasoning, planning, and auto-correction.
Output Parser Autofixing (Task Output Parser / Thinking output parser): These specialized n8n node components ensure that the potentially messy text output from the LLM is corrected and formatted into a structured, usable format (often JSON), greatly improving the reliability of the n8n workflow.
Structured Output Parser: Used in conjunction with the autofixing parsers to define the strict JSON schema required for the AI's output, maintaining consistency across the entire n8n template.
Generate fresh, SEO-optimized blog posts automatically using this powerful n8n workflow. This n8n templates combines Perplexity AI research with Anthropic Claude writing for daily content automation.

Deploy a custom Claude 3.7 AI agent interface using this specialized n8n workflow. Integrate advanced AI logic directly through a simple n8n form trigger and HTTP n8n node.

Automate website accessibility audits using this powerful n8n workflow. Extract images, filter poor alt texts, and generate improved captions using GPT-4o, saving all data in Google Sheets.

Use this powerful n8n workflow to build an AI chatbot with persistent long-term memory (via Google Docs) and a dynamic tools router for saving, retrieving, and sharing context via Gmail or Telegram.

Instantly diagnose failed n8n workflows using AI. This n8n workflow template leverages OpenAI (GPT-4o) to analyze errors, providing immediate cause and resolution reports via Gmail.








































