Import and export flows
You can export flows to transfer them between SkillFlaw instances, share them with others, or create backups.
Export a flow
There are three ways to export flows:
-
Export from projects: On the Projects page, find the flow you want to export, click More, and then select Export. To export all flows in a project, click Options on the Projects list, and then select Download.
-
Export by sharing: When editing a flow, click Share, and then click Export.
-
Export with the SkillFlaw API: To export one flow, use the
/flows/downloadendpoint. To export all flows in a project, use the/projects/downloadendpoint.
Exported flows are downloaded to your local machine as JSON files named FLOW_NAME.json.
If you export an entire project, the JSON files are packaged in a zip archive.
For more information, see SkillFlaw JSON file contents.
Save with my API keys
When exporting from the Projects page or Share menu, you can select Save with my API keys to export the flow and any defined API key variables. Non-API key variables are included in the export regardless of the Save with my API keys setting.
If you enter the literal key into a component's API key field, then Save with my API keys exports the literal key value.
If your key is stored in a SkillFlaw global variable, Save with my API keys exports only the variable name.
When you or another user import the flow to another SkillFlaw instance, that instance must have SkillFlaw global variables with the same names and valid values in order to run the flow successfully. If any variables are missing or invalid, those variables must be created or edited after importing the flow.
Import a flow
You can import SkillFlaw JSON files from your local machine in the following ways:
- Import to projects: On the Projects page, click Upload a flow, and then select the SkillFlaw JSON file to import.
- Import anywhere: Drag and drop SkillFlaw JSON files from your file explorer into your SkillFlaw window to import a flow from any SkillFlaw page.
- Import with the SkillFlaw API: To import one SkillFlaw JSON file, use the
/flows/upload/endpoint. To import a zip archive of SkillFlaw JSON files, use the/projects/uploadendpoint.
Run an imported flow
Once imported, your flow is ready to use. If the flow contains any global variables, make sure your SkillFlaw instance has global variables with the same names and valid values. For more information, see Save with my API keys.
SkillFlaw JSON file contents
An exported flow is downloaded to your local machine as a JSON file named FLOW_NAME.json.
SkillFlaw JSON files contain the following:
- Nodes and edges that describe components and connections in the flow.
- Additional metadata that describes the flow and the project it belongs to.
For example SkillFlaw JSON files, you can examine the flow assets in the SkillFlaw repository, or you can create a flow from a template in SkillFlaw, export it, and then open the exported JSON file in a text editor.
Nodes
Nodes represent the components that make up the flow. For example, this object represents a Chat Input component:
_35{_35 "data": {_35 "description": "Get chat inputs from the Playground.",_35 "display_name": "Chat Input",_35 "id": "ChatInput-jFwUm",_35 "node": {_35 "base_classes": ["Message"],_35 "description": "Get chat inputs from the Playground.",_35 "display_name": "Chat Input",_35 "icon": "MessagesSquare",_35 "template": {_35 "input_value": {_35 "display_name": "Text",_35 "info": "Message to be passed as input.",_35 "value": "Hello"_35 },_35 "sender": {_35 "value": "User",_35 "options": ["Machine", "User"]_35 },_35 "sender_name": {_35 "value": "User"_35 },_35 "should_store_message": {_35 "value": true_35 }_35 }_35 },_35 "type": "ChatInput"_35 },_35 "position": {_35 "x": 689.5720422421635,_35 "y": 765.155834131403_35 }_35}
Each node has a unique identifier in the format of NODE_NAME-UUID, such as ChatInput-jFwUm.
Entrypoint nodes, such as the ChatInput node, are the first node executed when running a flow.
Edges
Edges represent the connections between nodes.
The following example represents the edge (or connection) between the ChatInput node and the OpenAIModel node:
_22{_22 "className": "",_22 "data": {_22 "sourceHandle": {_22 "dataType": "ChatInput",_22 "id": "ChatInput-jFwUm",_22 "name": "message",_22 "output_types": ["Message"]_22 },_22 "targetHandle": {_22 "fieldName": "input_value",_22 "id": "OpenAIModel-OcXkl",_22 "inputTypes": ["Message"],_22 "type": "str"_22 }_22 },_22 "id": "reactflow__edge-ChatInput-jFwUm{œdataTypeœ:œChatInputœ,œidœ:œChatInput-jFwUmœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-OcXkl{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-OcXklœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",_22 "source": "ChatInput-jFwUm",_22 "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-jFwUmœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}",_22 "target": "OpenAIModel-OcXkl",_22 "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-OcXklœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"_22}
This edge shows that the ChatInput component outputs a Message type to the target node, which is the OpenAIModel node.
The OpenAIModel component accepts the Message type at the input_value field.
Additional metadata and project information
Additional information about the flow is stored in the root data object:
-
Metadata and project information including the name, description, and
last_tested_versionof the flow. For example:_10{_10"name": "Basic Prompting",_10"description": "Perform basic prompting with an OpenAI model.",_10"tags": ["chatbots"],_10"id": "1511c230-d446-43a7-bfc3-539e69ce05b8",_10"last_tested_version": "1.0.19.post2",_10"gradient": "2",_10"icon": "Braces"_10} -
Visual information about the flow defining the position of the viewport when you open the flow in the workspace:
_10"viewport": {_10"x": -37.61270157375441,_10"y": -155.91266341888854,_10"zoom": 0.7575251406952855_10} -
Notes are comments that help explain the flow's purpose, configuration details, and any other information relevant to users who might be editing the flow. They can contain text, links, code snippets, and other information. They are encoded in Markdown format and stored as
nodeobjects._10{_10"id": "undefined-kVLkG",_10"node": {_10"description": "## 📖 README\nPerform basic prompting with an OpenAI model.\n\n#### Quick Start\n- Add your **OpenAI API key** to the **OpenAI Model**\n- Open the **Playground** to chat with your bot.\n..."_10}_10}