{
  "name": "M19, the same agent, no code (n8n)",
  "_comment": "Import via n8n: Workflows -> Import from File. This builds the SAME multiply agent with NO Python: a Manual Trigger -> AI Agent node, wired to an Anthropic chat model and a Code Tool 'multiply'. Set your Anthropic credential on the chat-model node, then click 'Execute Workflow'. Node type names target n8n's LangChain nodes; if your n8n version differs slightly, add the equivalent 'AI Agent', 'Anthropic Chat Model', and 'Code Tool' nodes from the node panel and connect them the same way.",
  "nodes": [
    {
      "parameters": {},
      "id": "trigger-1",
      "name": "When clicking Execute",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "What is 23 times 17? Use the multiply tool."
      },
      "id": "agent-1",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1,
      "position": [480, 300]
    },
    {
      "parameters": {
        "model": "claude-opus-4-8",
        "options": {}
      },
      "id": "model-1",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1,
      "position": [400, 500],
      "_comment": "Set an Anthropic API credential on this node (n8n Credentials -> Anthropic). Never paste the key into the JSON."
    },
    {
      "parameters": {
        "name": "multiply",
        "description": "Multiply two integers. Input: an object with numbers a and b.",
        "jsCode": "const {a, b} = $input.item.json;\nreturn a * b;"
      },
      "id": "tool-1",
      "name": "multiply (Code Tool)",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "typeVersion": 1,
      "position": [560, 500]
    }
  ],
  "connections": {
    "When clicking Execute": {
      "main": [[{ "node": "AI Agent", "type": "main", "index": 0 }]]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [[{ "node": "AI Agent", "type": "ai_languageModel", "index": 0 }]]
    },
    "multiply (Code Tool)": {
      "ai_tool": [[{ "node": "AI Agent", "type": "ai_tool", "index": 0 }]]
    }
  }
}
