AutomationFlowsAI & RAG › AI Agent (agent)

AI Agent (agent)

04-ai-agent. Uses agent, lmChatAnthropic, memoryBufferWindow, mcpClientTool. Event-driven trigger; 7 nodes.

Event trigger★★☆☆☆ complexityAI-powered7 nodesAgentAnthropic ChatMemory Buffer WindowMcp Client Tool
AI & RAG Trigger: Event Nodes: 7 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → Anthropic Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "04-ai-agent",
  "nodes": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "Manual trigger to start the agent",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ],
      "parameters": {}
    },
    {
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "Run an AI agent to answer the question",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        300,
        300
      ],
      "parameters": {
        "promptType": "auto",
        "options": {}
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000002",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.5,
      "position": [
        150,
        500
      ],
      "parameters": {
        "model": "claude-opus-4-8",
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000003",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.4,
      "position": [
        300,
        500
      ],
      "parameters": {}
    },
    {
      "id": "00000000-0000-4000-8000-000000000004",
      "name": "Web Search",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.4,
      "position": [
        450,
        500
      ],
      "parameters": {
        "endpointUrl": "TODO: set MCP endpoint for tool \"Web Search\" (from Relay prompt)",
        "options": {}
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000005",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "typeVersion": 1.4,
      "position": [
        600,
        500
      ],
      "parameters": {
        "endpointUrl": "TODO: set MCP endpoint for tool \"Calculator\" (from Relay prompt)",
        "options": {}
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000006",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -160
      ],
      "parameters": {
        "content": "## \u26a0 Secrets and credentials\n\nEvery credential must be re-entered by hand in n8n. No automation possible.",
        "height": 160,
        "width": 280,
        "color": 1
      }
    }
  ],
  "connections": {
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Run an AI agent to answer the question",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Run an AI agent to answer the question",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Web Search": {
      "ai_tool": [
        [
          {
            "node": "Run an AI agent to answer the question",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "Run an AI agent to answer the question",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Manual trigger to start the agent": {
      "main": [
        [
          {
            "node": "Run an AI agent to answer the question",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

04-ai-agent. Uses agent, lmChatAnthropic, memoryBufferWindow, mcpClientTool. Event-driven trigger; 7 nodes.

Source: https://github.com/syedahmad0786/relay2n8n/blob/main/fixtures/04-ai-agent/expected.n8n.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Reads Network report queries and agent prompts from GitHub, uses AI Agents with a read-only Cisco pyATS MCP tool to generate infrastructure audit reports, automatically opens GitHub issues for detecte

GitHub, Agent, Memory Buffer Window +3
AI & RAG

Ask your PostgreSQL database complex questions and receive clear summaries, charts, and even update or insert data — all through one smart agent powered by n8n’s Model Context Protocol (MCP).

Postgres Tool, Execute Workflow Trigger, Tool Workflow +8
AI & RAG

Enable AI-driven conversations with your PostgreSQL database using a secure and visual-free agent powered by n8n’s Model Context Protocol (MCP). This template allows users to ask multiple KPIs in a si

Postgres Tool, Execute Workflow Trigger, Tool Workflow +8
AI & RAG

Slack workspace with admin access Anthropic API key (You can replace with other LLM Chat) Explorium API Key Go to api.slack.com/apps Click Create New App → From scratch Give it name (e.g., "Explorium

Slack Trigger, HTTP Request, Agent +4
AI & RAG

This assistant is designed for people who don't have time to write and send emails to suppliers. With just one request, it drafts and sends clear, professional messages automatically.

Mcp Trigger, Gmail Tool, Chat Trigger +6