Run Flow component returns empty content when invoked as an Agent tool
Bug Description
When a Run Flow component is invoked by an Agent as a tool, the tool receives the correct input argument but returns empty content.
The same Run Flow component works correctly when executed directly without tool mode.
A similar problem was reported in #14791. I added my reproduction details there, but because that issue is already closed and the problem remains reproducible on Langflow 1.12.1, I am opening this issue to document the current behaviour.
This may also be related to the tool-invocation problem addressed by #14793.
Reproduction
Minimal setup Subflow
Chat Input → Chat Output
I also tested:
Text Input → Chat Output
The subflow only passes the received input directly to the output. It does not contain an Agent or language model.
Parent flow
Chat Input → Agent → Chat Output
The Run Flow component is connected to the Agent as a tool.
The Agent is instructed to call the Run Flow tool and pass its received input unchanged.
Steps to reproduce
- Create a subflow containing only Chat Input → Chat Output.
- Create a parent flow with an Agent.
- Select the subflow in a Run Flow component.
- Connect the Run Flow component to the Agent as a tool.
- Send Test123 to the parent flow.
- Inspect the Agent trace and Run Flow tool result.
Expected behavior
The Run Flow tool should pass Test123 to the subflow and return:
Test123
When I execute the Run Flow component directly and provide Test123 as its input, the subflow correctly returns Test123.
When the Agent invokes the same component as a tool, the tool-call arguments contain the correct value:
{
"flow_tweak_data": {
"TextInput-XXXX~input_value": "Test123"
}
}
However, the tool returns empty content:
{
"type": "tool_end",
"output": {
"content": ""
}
}
Who can help?
@italojohnny @ogabrielluiz
Operating System
Linux Docker container on Windows 11
Langflow Version
1.12.1
Python Version
None
Screenshot
No response
Flow File
No response
Source: langflow-ai/langflow