Anthropic AI Agent: Claude Sonnet 4 and Opus 4 with Think and Web Search tool
n8n template #4399Summary
Use templateThis workflow dynamically chooses between two new powerful Anthropic models — Claude Opus 4 and Claude Sonnet 4 — to handle user queries, based on their complexity and nature, maintaining scalability and context awareness with Anthropic web search function and Think tool. Key Advantages 🔁 Dynamic Model Selection Automatically routes each user query to either Claude Sonnet 4 (for routine tasks) or Claude Opus 4 (for complex reasoning), ensuring optimal performance and cost-efficiency. 🧠 AI Agent with Tool Use The AI agent can utilize a web search tool to retrieve up-to-date information and a Think tool for complex reasoning processes — improving response quality. 📎 Memory Integration Uses
How to set it up
- Open template #4399 on n8n.io and click Use for free, or copy the template JSON and paste it onto an empty canvas in n8n.
- Create a credential under Credentials → Add credential: Anthropic Chat Model. Then open each of those nodes and pick the credential.
- Check the model in the AI Agent node. The template may point at a model your account can't use; swap it for one you have access to.
- Click Execute workflow and step through each node's output to confirm the data looks right.
- Toggle the workflow to Active so its trigger runs on its own.
Hand off to your agent
Prompt
Help me set up the n8n workflow "Anthropic AI Agent: Claude Sonnet 4 and Opus 4 with Think and Web Search tool" (https://n8n.io/workflows/4399). It uses: AI Agent, Anthropic Chat Model, Simple Memory, Structured Output Parser, Calculator, Think Tool. Import the template JSON into my n8n instance, list every credential I need to create, and walk me through testing it.
Paste into Claude Code and it will do the rest.
Apps and nodes
Questions
Yes. Davide Boizza published it free on n8n.io as a verified creator, and it has 6,524 views. It runs on n8n Cloud or a self-hosted n8n instance.
Anthropic Chat Model. The other 5 nodes are built into n8n.
Similar workflows
NameViews
- Explore n8n Nodes in a Visual Reference Library5,197
- Automated Stock Analysis Reports with Technical & News Sentiment using GPT-4o37K
- Build Your First AI Agent – Powered by Google Gemini with Memory16K
- Slack AI Chatbot for business team with RAG, Claude 3.7 Sonnet and Google Drive7,366
- AI Orchestrator: dynamically Selects Models Based on Input Type5,438
- Generate AI Viral Videos with Seedance and Upload to TikTok, YouTube & Instagram215K
- Build Your First AI Data Analyst Chatbot134K
- Generate & Auto-post AI Videos to Social Media with Veo3 and Blotato71K