langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
28.91k stars 3.7k forks source link

Feature to export flows as vector images #3746

Open keelezibel opened 1 week ago

keelezibel commented 1 week ago

Feature Request

Right now, the canvas allows users to export flows as json. But it is hard to visualize the flows unless we import them into Langflow. It will be good to allow exports of various types possibly support for svg so that it can be included for reference outside of Langflow.

Motivation

Visualization of flows outside of Langflow. Current JSON format is not possible to visualize.

Your Contribution

No response

dosubot[bot] commented 1 week ago

Hey @keelezibel! I'm here to help you with bugs, questions, and becoming a contributor. Let me know how I can assist you while you wait for a human maintainer.

Currently, Langflow does not have built-in components or utilities specifically for exporting flows as SVG or other vector graphic formats. The existing export functionality primarily supports JSON format for flow data [1][2].

To implement this feature, you would need to extend the current export functionality to include SVG generation. This could involve:

  1. Creating a new utility function to convert the flow data into an SVG format.
  2. Integrating this function into the existing export modal or creating a new export option for SVG.

You might consider using libraries like d3.js or svg.js for generating SVGs from the flow data. This would allow users to visualize the flows outside of Langflow more easily.

To continue talking to Dosu, mention @dosu.