Build AI agents with Think Plan Act architecture using Llama
π§ A plug-and-play n8n workflow that adds LLM-powered reasoning, planning, and action to your automations β with prompts, schemas, and full agent logic inclu...
π Nodes & Integrations Used (4)
π Implementation & Setup Guide
π§ 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:
```ts 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!
β‘ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
_Build_AI_agents_with_Think_Plan_Act_architecture_using_Llama_.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related AI Agents Workflows
View All in AI Agents β5 ways to process images PDFs with Gemini AI in n8n
How it works Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workfl...
7 AI Sales Assistant
Production-ready n8n automation template for 7 AI Sales Assistant built by AhiXLight. Seamlessly connects Airtop Tool, Slack, Airtop with 24 configured nodes.
AAVE portfolio professional AI agent Telegram Email GPT 4o
A next-generation AI-powered DeFi health monitor that tracks wallet positions across Aave V3 using GPT-4o and LangChain. It delivers human-readable reports v...
Access control for AI agents RBAC using Airtable and Telegram
Purpose This workflow allows granular control over the access to tools connected to AI Agents (including Multi-Agent setups) using Role Based Access Control....