Skip to content

Empty input when using RunFlow component #11153

@bobbydantel

Description

@bobbydantel

Bug Description

Problem

I am using a Parent Flow with an Agent that calls a Subflow via the "Run Flow" component.

The issue is that the Subflow receives empty input. The input is successfully sent in the Parent Flow (visible in logs), but for some reason, it fails to reach the Subflow.

Interestingly, this workflow was originally functioning correctly. The problem appeared after I updated the system prompt in the Subflow and changed the LLMs. Reverting the prompt and model changes did not resolve the issue.

Screenshots

Parent Flow

Image

Subflow

Image

Traces from LangWatch

Input

{
  "Chat Input (ChatInput-4MTd2)": {
    "input_value": "тест",
    "sender_name": "User",
    "session_id": "4a64bca0-2862-495b-86f7-a709ea870f28",
    "context_id": "",
    "should_store_message": true,
    "sender": "User",
    "files": []
  },
  "Run Flow (RunFlow-wTMmI)": {
    "session_id": "4a64bca0-2862-495b-86f7-a709ea870f28",
    "flow_name_selected": "test flow",
    "flow_id_selected": "e0c6db4b-f6dd-4649-b477-d14c9f738d39",
    "cache_flow": false
  },
  "OpenRouter (OpenRouterComponent-pqMrf)": {
    "input_value": {
      "metadata": {
        "files": [],
        "sender": null,
        "sender_name": null,
        "session_id": "",
        "context_id": "",
        "timestamp": "2025-12-27 08:16:52 UTC",
        "flow_id": null,
        "error": false,
        "edit": false,
        "properties": {},
        "category": "message",
        "content_blocks": [],
        "duration": null
      },
      "page_content": ""
    },
    "system_message": "",
    "stream": false,
    "api_key": "*****",
    "model_name": "google/gemini-2.5-flash",
    "temperature": 0.7,
    "max_tokens": "",
    "site_url": "",
    "app_name": ""
  },
  "Agent (Agent-6XVcP)": {
    "model_kwargs": {},
    "system_prompt": "Твоя задача передать запрос пользователя в инструмент test_runflow_tool и вернуть пользователю слово, которое вернет инструмент. И ты вернешь новое слово пользователю.",
    "context_id": "",
    "format_instructions": "You are an AI that extracts structured JSON objects from unstructured text. Use a predefined schema with expected types (str, int, float, bool, dict). Extract ALL relevant instances that match the schema - if multiple patterns exist, capture them all. Fill missing or ambiguous values with defaults: null for missing values. Remove exact duplicates but keep variations that have different field values. Always return valid JSON in the expected format, never throw errors. If multiple objects can be extracted, return them all in the structured format.",
    "input_value": {
      "role": "user",
      "content": "тест"
    },
    "agent_description": "A helpful assistant with access to the following tools:",
    "agent_llm": {
      "model_name": "google/gemini-2.5-flash",
      "temperature": 0.7,
      "model_kwargs": {},
      "openai_api_key": "**********",
      "openai_api_base": "https://openrouter.ai/api/v1",
      "openai_organization": null
    },
    "api_key": "*****",
    "base_url": "",
    "project_id": "",
    "max_output_tokens": "",
    "max_tokens": "",
    "model_name": "gpt-4o-mini",
    "openai_api_base": "",
    "temperature": 0.1,
    "seed": 1,
    "max_retries": 5,
    "timeout": 700,
    "n_messages": 100,
    "output_schema": [],
    "tools": [
      {
        "name": "test-flow_tool",
        "description": "Tool designed to execute the flow 'test flow'. Flow details: Create Powerful Connections, Boost Business Value..",
        "args_schema": "<class 'lfx.io.schema.InputSchema'>",
        "tags": [
          "test-flow_tool"
        ],
        "metadata": {
          "display_name": "_resolve_flow_output__ChatOutput_MiwQh__message",
          "display_description": "Executes another flow from within the same project. Can also be used as a tool for agents. \n **Select a Flow to use the tool mode**"
        },
        "handle_tool_error": true,
        "coroutine": "<function _patch_send_message_decorator.<locals>.async_wrapper at 0x131614cc0>"
      }
    ],
    "handle_parsing_errors": true,
    "verbose": true,
    "max_iterations": 15,
    "add_current_date_tool": true
  },
  "Chat Output (ChatOutput-qvR6S)": {
    "sender_name": "AI",
    "session_id": "4a64bca0-2862-495b-86f7-a709ea870f28",
    "context_id": "",
    "data_template": "{text}",
    "input_value": {
      "role": "assistant",
      "content": "Отлично, я готов!\n\n**Пример:**\n\n* **Слово пользователя:** Банан\n* **Последние две буквы:** Ан\n* **Сгенерированное слово:** Ананас\n\nЖду вашего слова! 😊"
    },
    "should_store_message": true,
    "sender": "Machine",
    "clean_data": true
  }
}

Output

{
  "Run Flow (RunFlow-wTMmI)": {
    "component_as_tool": [
      {
        "name": "test-flow_tool",
        "description": "Tool designed to execute the flow 'test flow'. Flow details: Create Powerful Connections, Boost Business Value..",
        "args_schema": "<class 'lfx.io.schema.InputSchema'>",
        "tags": [
          "test-flow_tool"
        ],
        "metadata": {
          "display_name": "_resolve_flow_output__ChatOutput_MiwQh__message",
          "display_description": "Executes another flow from within the same project. Can also be used as a tool for agents. \n **Select a Flow to use the tool mode**"
        },
        "handle_tool_error": true,
        "coroutine": "<function _patch_send_message_decorator.<locals>.async_wrapper at 0x131614cc0>"
      }
    ]
  },
  "Chat Input (ChatInput-4MTd2)": {
    "message": {
      "role": "user",
      "content": "тест"
    }
  },
  "OpenRouter (OpenRouterComponent-pqMrf)": {
    "model_output": {
      "model_name": "google/gemini-2.5-flash",
      "temperature": 0.7,
      "model_kwargs": {},
      "openai_api_key": "**********",
      "openai_api_base": "https://openrouter.ai/api/v1",
      "openai_organization": null
    }
  },
  "Agent (Agent-6XVcP)": {
    "response": {
      "role": "assistant",
      "content": "Отлично, я готов!\n\n**Пример:**\n\n* **Слово пользователя:** Банан\n* **Последние две буквы:** Ан\n* **Сгенерированное слово:** Ананас\n\nЖду вашего слова! 😊"
    },
    "component_as_tool": [
      {
        "name": "Call_Agent",
        "description": "A helpful assistant with access to the following tools:test-flow_tool, get_current_date",
        "args_schema": "<class 'lfx.io.schema.InputSchema'>",
        "tags": [
          "Call_Agent"
        ],
        "metadata": {
          "display_name": "message_response",
          "display_description": "Define the agent's instructions, then enter a task to complete using tools."
        },
        "handle_tool_error": true,
        "coroutine": "<function _patch_send_message_decorator.<locals>.async_wrapper at 0x13181f9c0>"
      }
    ]
  },
  "Chat Output (ChatOutput-qvR6S)": {
    "message": {
      "role": "assistant",
      "content": "Отлично, я готов!\n\n**Пример:**\n\n* **Слово пользователя:** Банан\n* **Последние две буквы:** Ан\n* **Сгенерированное слово:** Ананас\n\nЖду вашего слова! 😊"
    }
  }
}

Reproduction

Steps to reproduce the behavior:

  1. Create Subflow
    a. Add Chat Input, Agent, LLM and Chat Output
    b. Connect all components with Agent
  2. Create Parent flow
    a. Add Chat Input, Agent, LLM, RunFlow and Chat Output
    b. Choose Subflow in RunFlow
    c. Turn on Tool Mode in RunFlow
    d. Connect all components with Agent
  3. Send input to agent in Parent flow in Playground

Expected behavior

The parent flow sends input to the subflow, the subflow receives the input, processes it, and returns it to the parent flow agent, which displays it to the user.

Who can help?

Operating System

MacOS 26.1

Langflow Version

1.7.1

Python Version

3.13

Who can help

@jmelm93

Screenshot

Parent Flow

Flow
Image
Playground Input
Image
Message Logs (You can see session_id here)
Image

Subflow

Flow
Image
Playground Input (It's empty)
Image

Flow File

ParentFlow.json

Subflow.json

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingjiraThis issue has been logged in Jira for fix by the engineering team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions