NAV Navbar
python javascript shell

Introduction

Welcome to the FlowFlow.AI documentation! The documentation includes different sections.

What is FlowFlow.AI?

Link multiple (GPT) AI steps together with conditional logic. FlowFlow.AI is a no code tool to automate repetitive steps of human work like: decision making, question answering, analyzing images, producing content, using your own custom workflows.

AI Large Language Models (like ChatGPT) are impressive, but still requires you to be there at every step of the repetitive process.

Using FlowFlow.AI you can connect multiple steps together. Each node can be configured to handle a specific step. The nodes can be connected to each other with one or multiple 'node relations'.

During the execution of a node, a node relation can be triggered based on the result of the node. This way you can let the AI take care of handling the next useful step. Automate repetitive tasks while staying within the boundaries of your defined workflow.

Each AI node possesses its own distinct ability to handle various tasks, such as decision making, classification, content generation, analyzing images, executing commands and question answering.

For example: The AI Decision node can be set up in natural language to analyze if the input text is 'true' or 'false'. Based on the outcome it will send the result to the next node that meets the predefined conditions.

Improve the skills of your AI nodes by letting it train on your business documents, or search on Google. In FlowFlow the knowledge can be stored as data items in 'Data sources'.

Use cases

Coming soon

Credits

FlowFlow.AI is a pay per use service, but includes free credits for new users. The credits are used to pay for each nodes execution and the data sources. The credits are deducted from your account when you use the service. At the moment you need to supply your own OpenAI key, so AI LLM costs are not included in the credits and will be billed separately by OpenAI. In the future we will offer a complete package including the LLM costs.

Type Credits Notes
AI - Answer question 1 plus OpenAI gpt-3.5-turbo token cost
AI - Assistent 1 plus OpenAI gpt-3.5-turbo token cost
AI - Boolean 1 plus OpenAI text-davinci-003 token cost
AI - Classification 1 plus OpenAI text-davinci-003 token cost
AI - Generate 1 plus OpenAI text-davinci-003 token cost
AI - Vision 1 plus Replicate costs at $0.0023 / second (task takes ~1 sec average )
Data Item - Text embedding 1 per text chunk - plus text-embedding-ada-002 token cost
Data Item - Search 1 per search in data source plus text-embedding-ada-002 token cost to embed the search query
Other (helper) nodes 1

Workflows

Workflows can be customized to automate a wide variate of business processes.

A workflow consists of one or multiple nodes that are linked together using conditional relations. Each node has it's own specific capability (e.g. answering, classification, boolean decisions). The nodes can be pre-configured using a combination of natural language as instructions to the AI and options.

During node execution (node run) specific conditions could be triggered based on the result (e.g. "could answer" or "could not answer" during a Answer Node execution).
Based on the outcome of the conditions, the workflow will automatically execute the node(s) that are linked to the condition.

Each node type has it's own capabilities. This way, complex workflows can be created without the need for programming.

Workflow example

Node Relations

Relations between nodes can be established in a workflow, where the result from a particular node serves as input for the subsequent node in a one-way direction.

When adding a connection between nodes, a conditional rule needs to be chosen. This rule plays a key role in deciding which subsequent node will be activated.

This makes FlowFlow really powerful and makes it possible to let the AI decide which predefined node to execute next.

The nodes and relations are visualized in the workflow graph. The relation arrows indicate the direction of the flow. The graph image is currently generated automatically with random node positions. Soon we will add a nice visual graph editor.

For instance, we create a simple workflow with AI Boolean node that decides if the text input is related to 'money'.
If the input is money related we want to execute a 'Text - Feedback' node that replies "Sorry we do not answer money related questions". If the input is not money related we want to execute another a 'Text - Feedback' node that replies "I will forward your message to a customer service agent.".

We can accomplish this by adding a relation to the first Text - Feedback node with the conditional rule "true", and another relation to the second Text - Feedback node with the conditional rule "false".

By defining multiple relations with different conditional rules, a workflow can branch out in different routes. Each route can specialize in automating a specific task.

It can happen that a condition is triggered during node run, but no relation is pre-defined with that condition. Visa versa it can also happen that a relation is defined, but the condition is not triggered. If no relation with a matching condition is found, no further action is taken from that node.

A node that triggers a condition can also be connected to multiple next nodes with the same condition. In the above 'money' example we can add a relation to another node with the same true condition. This way a single node can initiate multiple next nodes.

Chat with a workflow

In order to use or test a workflow you could chat with it. First, a start node needs to be defined, so the workflow knows where to start. Currently, the best way to chat with a node is to add a 'Text - Input' node to your workflow and assign it as the start node.

Individual nodes in- and output behavior can be tested on the node detail page.

When starting a workflow a workflow run is created. This run is used to store the workflow state.

Public workflow library

Public workflows with example FlowFLow workflows are available. These public workflows can be used as inspiration, or as a starting point for your own workflow. Click on a public workflow to view the details and import it to your own workspace.

Soon: Abbility to share workflows with other users.

Nodes

Workflows can contain multiple nodes that can be connected to each other.

Each AI node type possesses its own distinct ability to handle various tasks, such as decision making, classification, content generation, analyzing images, executing commands and question answering. There are two main category of nodes in FlowFLow: AI nodes and Helper nodes.

Each node get the input from the previous node and returns the result to the next triggered node. The result of a node can be used as input for one or multiple nodes that meet the predefined conditions.

The in- and output behavior can be tested in the node detail page.

General node attributes

Most nodes share the following configuration attributes:

AI Nodes

Nodes that use AI to process the input. Each AI node type are pre-trained for specific tasks and have their own specific conditions that can be triggered during the node execution based on the node input.

Answer Node

The answer node tries to answer (usually) a question based on the input string.

The answer node can be configured in different ways to answer the input string. The default is to use the knowledge base of the selected LLM. Optionally a data source or using a specific agent to answer the question can be configured.

Agents use an LLM to determine which actions to take and in what order. An agent can either be using a tool and observing its output, or returning a response to the user.

Tools can be added to agents for more complex use-cases (Google Search, ChatGPT plugins, Wikipedia, API requests, calculator, Zapier NLA, etc.).

The answer node result is a string, and depending on the configuration, the output contains a data source + item or intermediate steps taken by the agent.

Example use-cases are:

Attributes

Attributes that can be pre-configured in the node:

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Node run output attributes

Assistant Node

The AI LLM assistant applies a predefined command (instructions) on the input string and returns an string as output. Example commands are:
- Summarize the input into three sentences
- Write a friendly response based on the input that I'm interested in the idea
- Extract all names and addresses and only return a valid JSON list

Node Run Attributes
Attributes that flow to the node during a node run:
- input required string
The input string that will be evaluated by the node.
 

Attributes that can be pre-configured in the node:

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Node run output attributes
- result string
Result string of the command that was applied on the input string.  

Boolean Node

Let an AI LLM decide if the string input is True or False based on predefined criteria in the node and returns a string as output. For example, if the criteria is set to is the input related to an startup idea? and input string is Money solves all your problems, the Boolean is false condition will be triggered.

Attributes
Attributes that flow to the node during a node run:
- input required string
The input string that will be evaluated by the node.  

Attributes that can be pre-configured in the node:

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Response attributes - result string
Result string will be the node input string (if pass_input_as_result is enabled), or true, false or undecided (if pass_input_as_result is disabled).  

Classification Node

The classification node labels the input string into one or multiple predefined labels using an AI LLM. For each label context can be added to the LLM better understands the label (which improves the classification capabilities). The node returns a list of labels as output.

Example use-cases are:
- Sentiment Analysis: Classifying text based on the sentiment expressed (e.g., positive, negative, neutral). This is often used in social media monitoring, customer feedback analysis, and market research.
- Email Filtering: Classifying emails into predefined categories such as spam, important, work, personal, etc.
- Topic Categorization: Classifying news articles, blog posts, or academic papers into predefined topics or subjects, such as politics, technology, sports, etc.
- Language Detection: Classifying text based on the language it is written in. This can be used in multilingual platforms to deliver language-specific services.
- Medical Coding: Classify patient notes into predefined medical codes for billing and data analysis purposes.
- Customer Intent Prediction: Classifying customer queries into predefined intents (e.g., complaint, inquiry, request for assistance). This can be used in customer service bots.
- Product Reviews Classification: Classifying product reviews into categories like 'quality', 'value for money', 'usability', etc. based on the content of the review. - Social Media Monitoring: Classifying social media posts into categories like 'promotion', 'complaint', 'inquiry', etc. to help businesses understand and respond to customer behavior.
- Resume Screening: Classifying resumes into predefined categories such as 'qualified', 'overqualified', 'underqualified', etc., based on job requirements.
- Legal Document Analysis: Classify legal documents into predefined categories, such as contracts, wills, deeds, etc., to assist in legal research and case preparation.

Attributes

Attributes that can be pre-configured in the node:

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Node run output attributes
- result list of labels
List of labels. Can be empty (if unclassified), contain one label, or multiple labels (if multiple_answers is enabled).  

Generate Node

Uses an AI LLM to generate a list of items based on the input string. The node returns a list of text as output.

Example use-cases are: - Podcast Topics: By entering "tech podcast topics", the LLM generates a list with examples like "The Future of Quantum Computing", "Cybersecurity in the Age of IoT", "Impact of AI on Job Market", and so on.
- Event Planning: An event organizer needs unique ideas for a corporate team-building event. Upon entering "corporate team-building activities", they could get a list like "Outdoor Survival Challenge", "Cooking Competition", "Virtual Reality Quest", etc.
- Idea Brainstorming: A marketer needs creative slogans for a new line of eco-friendly cleaning products. By inputting "eco-friendly cleaning product slogans", the node might return a list like "Green Clean for a Brighter Future", "Cleanliness with Consciousness", "Purity, not Pollution", and so forth.

Attributes

Attributes that can be pre-configured in the node:

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Node run output attributes
- result list of strings
List of text items. Can be empty (if no items are generated), or contain one or more text items.  

Vision Node

The AI vision node that takes an image URL string as input and, by default, gives an image caption text as output. So if you input an image URL of an cat with sunglasses, the node will return the caption a cat with sunglasses sitting on a table. Instead of captioning, the vision node can also be configured with a specific question. So if you input an image URL of an cat with sunglasses and the question do you see an animal?, the node will return the answer yes.

Example use-cases are: - Caption an image to text so next nodes can take decisions based on the image content. - Ask a question about an image and based on the text output an decision can be made later in the workflow. - Automated Image Sorting: Companies with large databases of images can use these AI nodes to sort images based on their content. For example, a node might be configured to answer "Is there a car in this image?"

Attributes

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Node run output attributes
- result string
Text with the image caption or answer to the question.  

Helper Nodes

Helper nodes are nodes that can be used to perform a specific task. They are not AI nodes, but can be used to prepare data from or to AI nodes. Think about formatting text between nodes, sending data to an external HTTP endpoint, etc.

Text - Input Node

Receives external text input. Can optionally be configured to display initial text and input placeholder text while it waits for an input.

Example use-cases are: - Display a message to a user and wait for their text input. - Ask a question and wait for the user to answer. Suggest an example in the input field placeholder.

Attributes

Attributes that can be pre-configured in the node:

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Node run output attributes
- result string
Text input from the user.  

Text - Output Node

Format text before displaying it (for example to a user). Text formatting can be done using the Jinja2 syntax. A template can contain variables, expressions, loops, filters, etc.

Example use-cases are: - Combine the results of the previous node with additional text and display it to the user. For example: The answer is {{result}} - Display a list of items to the user. For example: {% for item in result %} {{item}} {% endfor %} - Use jinja2 to capatalize the first letter of a sentence. For example: The answer is: {{result|capitalize}} - Use predefined workflow variables. For example: {{workflow.test_variable }}) (For more info see workflow variables) - Use the result of a previously node run. For example {{node.answer_question.run.result }}) (For more info see node run variables)

Attributes

Attributes that can be pre-configured in the node:

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Node run output attributes
- result string
Formatted text  

HTTP Output Node

Send JSON data to an external HTTP endpoint using a POST request

Example use-cases are:
- Connect FlowFlow workflows to external apps. For example: send a text message to a user when a workflow run is finished.
- Send the workflow result to Zapier or Integromat to connect to 1000+ apps.

Attributes

Attributes that can be pre-configured in the node:

Soon: More options will be available to send JSON. Later the Custom Code node can also be used to send custom data to an endpoint using Python or Javascript code.

Conditions
One of the following conditions (name & id) will be triggered during the node execution and can be used to trigger one or multiple next nodes that meet the conditions.

Node run output attributes
- result string
Returns the result of the HTTP request. Depending on the external response, the result can be for example a string or a (JSON) object.  

Custom code Node

Coming soon: Run custom Python/ Javascript code. The custom code can be used to transform data between nodes, add extra data from the internet using an external API request, or run a custom LLM code (e.g. a LangChain agent).

Tools

Dcoumentation coming soon

Variables

Variables can be used to format text inputs with text values set configured in the Workflow, Workflow run, Node, or Node run. By default the result from the previous node can inserted using the variable syntax {{result}} using the Jinja2 syntax.

In other words: variables can be used as a kind of memory to re-use specific information throughout the workflow run in different nodes. If a variable is empty or not existing the variable will be replaced automatically with *ERROR: Variable *<variable name>* is empty or not existing*.

Note: At the moment variables can only be used inside the node type Text - Output. Later we will add support for variables inside more text input/ configuration fields. Let us know what to prioritize.

Workflow variables

Workflow variables (not to be confused with workflow run variables) can be used to store data and reused in multiple nodes. For instance, a workflow variable can be used to add the same text to multiple nodes. A workflow variables can added on the Workflow Edit page ()

A workflow variable can be used in a node by using the {{workflow.<variable_name>}} syntax. For instance, if a workflow variable with the name test is defined, it can be used in a node by adding {{workflow.test}} to the text input field.

Workflow Run variables

Workflow Run variables (not to be confused with workflow run variables) can be set at at the start of a workflow and can be used by all nodes during that specific workflow run. The variable values can be adjusted for each workflow run using the key workflow_run_variables in the workflow start API endpoint.

A workflow run variable can be used in a node by using the {{workflow.run.<variable_name>}} syntax. For instance, if a workflow run variable with the name test is defined, it can be used in a node by adding {{workflow.run.test}} to the text input field.

Node variables

The node configuration like name, description, node type can be used as variables using the {{node.<node_name>.<variable>}}. Replace node_name with the lower case version of the node name and spaces are replaced with underscores. For example Answer node should be written as answer_node. Replace the <variable> with one of the following options:

Node Run variables

The node run variables can be used to get for example the results of previously executed notes in the workflow run. Use the following syntax to get the variables for the first node run: {{node.<node_name>.run.<variable>}}. Replace <variable> with one of the following options:

Please note that a node needs to have been executed before the node run variables can be used.

Sometimes a node is executed multiple times in a workflow run. In this case the following syntax is used: {{node.<node_name>.runs.<index>.<variable>}} Replace the <index> with a number of the node run (starting with 0).

Data sources

Data sources can be added to FlowFlow. Data sources can be used in for example the Answer Node to answer questions based on the information in the provided data source instead of using the knowledge base of the selected LLM. This is ideal for company specific information. A data source contains one or multiple data items.

At the moment only a 'managed vector database' type of data source is supported. Soon we will add support for other types of data sources and the possibility to connect to your own managed data sources.

Data items

In each data source one or multiple data items can be added. A data item can be for example a text document, website, or PDF document. Each data item has a unique id and a name (for example the filename). When answering a question, the Answer Node will try to find the best matching data item based on the question and the data items in the selected data source. If a data item is used to answer a question it will be listed as source in the answer.

API Reference

Interact with FlowFlow using the API or the Python and Javascript packages.

pip install flowflow

Install the FlowFlow Javascript client:

npm install flowflow

Workflow - Start

Executes a workflow in the background and will return the an URL for the workflow progress endpoint. The workflow progress endpoint can be used to check the status of the workflow run and to retrieve the results of the node runs.

Start a workflow and return the results.

from flowflow import FlowFlowClient
api_token = "REPLACE_API_TOKEN"

client = FlowFlowClient(api_token)

# Start a workflow
workflow_id = "67bd80ba-d392-4291-954c-587c161fabfb"

input_data = {
    "input": "Who is the president of the USA in 2023?", # Replace with your input
}

# The Python client will automatically poll the progress endpoint until the workflow is finished.
workflow = client.start_workflow(input_data, workflow_id)

if workflow.get('status') == 'OK':
    print(workflow['workflow']['run']['results'])
else:
    print(workflow['message'])

const FlowFlowClient = require('flowflow');

// Init FlowFlow client
const apiToken = "REPLACE_API_TOKEN"

const client = new FlowFlowClient(apiToken);

// Start a workflow
const workflowId = "67bd80ba-d392-4291-954c-587c161fabfb";

const inputData = {
    input: "Who is the president of the USA in 2023?" // Replace with your input
};

// The Javascript client will automatically poll the progress endpoint until the workflow is finished.
client.startWorkflow(inputData, workflowId)
    .then(workflow => {
        if(workflow.status === 'OK') {
            console.log(workflow.workflow.run.results);
        } else {
            console.log(workflow.message);
        }
    })
    .catch(err => {
        console.error(err);
    });

# cURL
curl http://localhost.localdomain:8000/api/v1/workflow/start/{{WORKFLOW_ID}} \
-H "Authorization: Bearer {{YOUR_API_TOKEN}}" \
-H "Content-Type: application/json" \
-d '{ 
  "input":"Who is the president of the USA in 2023?"
}'

Input attributes

The 'workflow start' endpoint expects a JSON body with the following attributes:

The above request returns a JSON response with a link to the progress api endpoint, in the following format:

{
    "progress_api_url": "https://flowflow.ai/api/v1/workflow/progress/2404bffc-9b61-448b-95bb-773f49d7a700",
    "status": "OK",
    "workflow": {
        "id": "67bd80ba-d392-4291-954c-587c161fabfb",
        "name": "AI Answer with dataset example",
        "run": {
            "created": "Thu, 27 Jul 2023 11:24:39 GMT",
            "id": "2404bffc-9b61-448b-95bb-773f49d7a700",
            "status": "PENDING"
        }
    },
    "chat_url": "https://flowflow.ai/api/v1/internal/workflow/chat/67bd80ba-d392-4291-954c-587c161fabfb?workflow_run_id=2404bffc-9b61-448b-95bb-773f49d7a700",
    "message": "Workflow execution started. Poll the 'progress_api_url' for updates or view the workflow run results in the app using the 'chat_url'",
}

The 'workflow progress' endpoint (GET request) will return a JSON response in the following format:

{
    "status": "OK",
    "workflow": {
        "id": "67bd80ba-d392-4291-954c-587c161fabfb",
        "name": "AI Answer with dataset example",
        "run": {
          "created": "2023-07-27T07:40:44.917Z",
          "id": "c1502175-310a-4337-884a-ca8252280b6c",
          "results": [
              "Joe Biden is the president of the USA in 2023 \n"
          ],
          "status": "FINISHED",
          "updated": "2023-07-27T07:40:53.260Z"
      },
      "nodes": [
            {
                "id": "b7552c20-026b-4955-a096-bfe599f01b20",
                "name": "Answer test",
                "runs": [
                    {
                        "conditions": {
                            "defined": [
                                {
                                    "display_name": "Answer is known",
                                    "id": "879d5711-bfa7-48f6-919e-a136ade97149",
                                    "node_targets": [
                                        {
                                            "id": "e7621a3d-6f5b-46ff-bfe5-54c2a823b73f",
                                            "name": "Answer",
                                            "relation": {
                                                "id": "b529a3ff-7639-46b1-b602-2066dd776853"
                                            },
                                            "type": {
                                                "display_name": "Text - Feedback",
                                                "id": "3"
                                            }
                                        }
                                    ],
                                    "system_name": "answer_known"
                                },
                                {
                                    "display_name": "Answer is unknown",
                                    "id": "7306720a-1d69-4a2b-8807-4ac8c661018d",
                                    "node_targets": [
                                        {
                                            "id": "0dd1277e-e57c-4012-9b52-0f642aec2ee9",
                                            "name": "No answer",
                                            "relation": {
                                                "id": "44c89875-893f-4e31-bedf-8e2d120ced76"
                                            },
                                            "type": {
                                                "display_name": "Text - Feedback",
                                                "id": "3"
                                            }
                                        }
                                    ],
                                    "system_name": "answer_unknown"
                                }
                            ],
                            "met": [
                                {
                                    "display_name": "Answer is known",
                                    "id": "879d5711-bfa7-48f6-919e-a136ade97149",
                                    "system_name": "answer_known"
                                }
                            ],
                            "met_and_defined": [
                                {
                                    "display_name": "Answer is known",
                                    "id": "879d5711-bfa7-48f6-919e-a136ade97149",
                                    "system_name": "answer_known"
                                }
                            ]
                        },
                        "config": {
                            "auto_continue": true,
                            "cannot_answer_allowed": true,
                            "display_result": false
                        },
                        "created": "2023-07-27T07:40:44.931Z",
                        "end_node": false,
                        "id": "0cfff40e-795f-4a1e-b784-68b871988cac",
                        "input": "Who is the president of the USA in 2023?",
                        "message": "OK",
                        "result": "Joe Biden is the president of the USA in 2023 \n",
                        "sources": [
                            {
                                "data_item": {
                                    "id": "f26a10ef-0f50-4c84-90cf-6434f245aeae",
                                    "name": "USA.txt"
                                },
                                "data_source": {
                                    "id": "a6d27e77-a7bc-44f5-993d-52c06178b6f7",
                                    "name": "Sample dataset"
                                }
                            }
                            }
                        ],
                        "start_node": true,
                        "status": "FINISHED",
                        "updated": "2023-07-27T07:40:53.076Z"
                    }
                ],
                "type": {
                    "display_name": "AI - Answer question",
                    "id": 9
                }
            },
            {
              "id": "e7621a3d-6f5b-46ff-bfe5-54c2a823b73f",
              "name": "Answer",
              "runs": [
                  {
                      "conditions": {
                          "defined": [],
                          "met": [
                              {
                                  "display_name": "Feedback text OK",
                                  "id": "db6a5159-2bea-4def-bda1-6f49b609de89",
                                  "system_name": "human_feedback_text_ok"
                              }
                          ],
                          "met_and_defined": []
                      },
                      "config": {
                          "auto_continue": true,
                          "display_result": true,
                          "text_display": "Formatted example answer: {{result}}"
                      },
                      "created": "2023-07-27T07:40:53.114Z",
                      "end_node": true,
                      "id": "eecd30c9-6c93-49d2-a109-cc420480ec6f",
                      "input": "Who is the president of the USA in 2023?",
                      "message": "OK",
                      "result": "Formatted example answer: Joe Biden is the president of the USA in 2023 \n",
                      "sources": [
                          {
                              "data_item": {
                                  "id": "f26a10ef-0f50-4c84-90cf-6434f245aeae",
                                  "name": "USA.txt"
                              },
                              "data_source": {
                                  "id": "a6d27e77-a7bc-44f5-993d-52c06178b6f7",
                                  "name": "Sample dataset"
                              }
                          }
                          }
                      ],
                      "start_node": false,
                      "status": "FINISHED",
                      "updated": "2023-07-27T07:40:53.242Z"
                  }
              ],
              "type": {
                  "display_name": "Text - Feedback",
                  "id": 3
              }
          }
        ]
    }
}

The workflow start endpoint will return a link to the workflow progress endpoint (progress_api_url). The progress endpoint will return the current status of the workflow and the results of the workflow & node runs.

Response attributes

The JSON response will contain detailed venue information.

Attribute details coming soon. See the /start and /progress endpoint JSON response examples on the right.

More API endpoints

Coming soon: More API endpoints to manage workflows, data sources, data items, etc. Let us know if you have any feedback, ideas, or questions.

Examples

Coming soon