{
  "name": "Demo: My first AI Agent in n8n",
  "nodes": [
    {
      "parameters": {
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "mode": "list"
        },
        "returnAll": true,
        "options": {
          "timeMin": "={{ $fromAI('after', 'The earliest datetime we want to look for events for') }}",
          "timeMax": "={{ $fromAI('before', 'The latest datetime we want to look for events for') }}",
          "singleEvents": true,
          "query": "={{ $fromAI('query', 'The search query to look for in the calendar. Leave empty if no search query is needed') }}"
        }
      },
      "id": "0d7e4666-bc0e-489a-9e8f-a5ef191f4954",
      "name": "Google Calendar",
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.2,
      "position": [
        880,
        220
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "5b410409-5b0b-47bd-b413-5b9b1000a063",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        360,
        20
      ]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=You're a helpful assistant that helps the user answer questions about their calendar.\n\nToday is {{ $now.format('cccc') }} the {{ $now.format('yyyy-MM-dd HH:mm') }}."
        }
      },
      "id": "29963449-1dc1-487d-96f2-7ff0a5c3cd97",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        560,
        20
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "cbaedf86-9153-4778-b893-a7e50d3e04ba",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        520,
        220
      ]
    },
    {
      "parameters": {},
      "id": "75481370-bade-4d90-a878-3a3b0201edcc",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        680,
        220
      ]
    }
  ],
  "connections": {
    "Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "meta": {
    "templateId": "PT1i+zU92Ii5O2XCObkhfHJR5h9rNJTpiCIkYJk9jHU="
  },
  "tags": []
}