{
  "schemaVersion": "1.0.0",
  "workflowVersion": 1,
  "workflow": {
    "id": "wf-agent-mcp-webhook",
    "name": "Agentic MCP + Memory Webhook Flow",
    "description": "Webhook Input -> Agent Orchestrator -> Output, with attached Chat Model, Memory, and MCP Tools.",
    "schemaVersion": "1.0.0",
    "workflowVersion": 1,
    "nodes": [
      {
        "id": "webhook_1",
        "type": "webhook_input",
        "name": "Webhook Input",
        "position": { "x": 100, "y": 180 },
        "config": {
          "path": "agent-demo",
          "method": "POST",
          "passThroughFields": ["system_prompt", "user_prompt", "session_id", "variables"]
        }
      },
      {
        "id": "agent_1",
        "type": "agent_orchestrator",
        "name": "Agent Orchestrator",
        "position": { "x": 460, "y": 180 },
        "config": {
          "systemPromptTemplate": "{{system_prompt}}",
          "userPromptTemplate": "{{user_prompt}}",
          "sessionIdTemplate": "{{session_id}}",
          "maxIterations": 6,
          "toolCallingEnabled": true
        }
      },
      {
        "id": "llm_1",
        "type": "llm_call",
        "name": "OpenAI Chat Model",
        "position": { "x": 520, "y": 340 },
        "config": {
          "provider": {
            "providerId": "ollama",
            "baseUrl": "http://localhost:11434/v1",
            "model": "qwen2.5:7b",
            "temperature": 0.2
          },
          "promptKey": "prompt",
          "systemPromptKey": "system_prompt"
        }
      },
      {
        "id": "memory_1",
        "type": "local_memory",
        "name": "Simple Memory",
        "position": { "x": 700, "y": 340 },
        "config": {
          "namespace": "default",
          "sessionIdTemplate": "{{session_id}}",
          "maxMessages": 20,
          "persistToolMessages": false
        }
      },
      {
        "id": "tool_time_1",
        "type": "mcp_tool",
        "name": "MCP Time Tool",
        "position": { "x": 870, "y": 320 },
        "config": {
          "serverId": "mock-mcp",
          "toolName": "get_current_time",
          "argsTemplate": "{\"tz\":\"America/Toronto\"}",
          "connection": {
            "transport": "http_streamable",
            "endpoint": "http://127.0.0.1:7001/mcp"
          }
        }
      },
      {
        "id": "tool_calc_1",
        "type": "mcp_tool",
        "name": "MCP Calculator Tool",
        "position": { "x": 1010, "y": 320 },
        "config": {
          "serverId": "mock-mcp",
          "toolName": "calculator",
          "argsTemplate": "{\"expression\":\"12*7\"}",
          "connection": {
            "transport": "http_streamable",
            "endpoint": "http://127.0.0.1:7001/mcp"
          }
        }
      },
      {
        "id": "output_1",
        "type": "output",
        "name": "Output",
        "position": { "x": 860, "y": 180 },
        "config": {
          "responseTemplate": "{{answer}}",
          "outputKey": "result"
        }
      }
    ],
    "edges": [
      {
        "id": "edge_1",
        "source": "webhook_1",
        "target": "agent_1"
      },
      {
        "id": "edge_2",
        "source": "agent_1",
        "target": "output_1"
      },
      {
        "id": "edge_aux_chat_model",
        "source": "agent_1",
        "sourceHandle": "chat_model",
        "target": "llm_1"
      },
      {
        "id": "edge_aux_memory",
        "source": "agent_1",
        "sourceHandle": "memory",
        "target": "memory_1"
      },
      {
        "id": "edge_aux_tool_time",
        "source": "agent_1",
        "sourceHandle": "tool",
        "target": "tool_time_1"
      },
      {
        "id": "edge_aux_tool_calc",
        "source": "agent_1",
        "sourceHandle": "tool",
        "target": "tool_calc_1"
      }
    ]
  },
  "exportedAt": "2026-03-30T00:00:00.000Z"
}
