π§ Build AI Agents with Think-Plan-Act Architecture Using Llama-4 Reasoning
Go to WorkflowDescription
π§ A plug-and-play n8n workflow that adds LLM-powered reasoning, planning, and action to your automations β with prompts, schemas, and full agent logic included.
Ever wish your n8n flows could think before they act?
Now they can. Say hello to the ultimate agent-based upgrade:
"Think β Plan β Act" β fully automated. Fully intelligent.β‘
π§© What Is This?
This product is a ready-to-use AI-powered workflow template for n8n, featuring a smart βThinking Agentβ that:
π§ Analyzes tasks
π Generates a step-by-step plan
π οΈ Executes actions intelligently
π§Ύ Returns structured JSON outputs for your next steps
Inspired by the Hugging Face agent architecture, this template gives your automations a brain before they press the red button. π΄β
A clean 2-step process:
THINK mode β Generates structured reasoning (goal, subgoals, tools, assumptions)
ACT mode β Executes subgoals step-by-step using tools and AI.
𧬠What's Inside?
This isnβt just a flow β itβs a framework. You get:
πΉ Modular Agent Loop
πΉ A demonstration workflow
π Requirements
πΉ OpenRouter API Key (or any other provider like OpenAI, groq...)
πΉ Built-in Parsers
π§Ύ Structured JSON parser for reliable outputs
πͺ Natural language and unstructured parsing fallback
π οΈ Plug in your own goals, tools, and OpenRouter keys
π¦ Includes a demo (e.g., βget the weatherβ) to get started fast
π‘ Why You'll Love It
β
Plug & Play β Drop into any existing n8n flow
β
Tool-Aware Reasoning β Plans include which tool to use and why
β
Composable β Build workflows like agents: Reason β Plan β Execute
β
Customizable by anyone β Even your intern can tweak the prompts
βοΈ Agent customization
πΉ Feel free to customize the agent settings by changing the Config node. Here's the default configuration:
const config = {
THINK: {
CONTEXT: ``, // Add the necessary context to the AI.
CONSTRAINTS: [Rule 1, Rule 2], // here are the rules that your AI should follow
TOOLS: [
{
tool: "",
description: "",
},
], // add here the list of the tools that the AI will call in your backend or workflow.
},
};
return {
json: {
config: config,
input: $input.last().json,
},
};
After updating the configuration file, you will see the AI reasoning for your input. Feel free to connect with any other node creating smart tasks!