Skip to content

Commit b378040

Browse files
committed
initial version
1 parent b11406f commit b378040

File tree

11 files changed

+76
-0
lines changed

11 files changed

+76
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: Langflow integration
3+
sidebar_label: Langflow
4+
description: Learn how to integrate Apify with Langflow low-code tool to build powerful AI agents and workflows that can use any API, model, or database.
5+
sidebar_position: 1
6+
slug: /integrations/langflow
7+
---
8+
9+
**Learn how to integrate Apify with Langflow, in order to run complex AI agent workflows.**
10+
11+
---
12+
13+
## What is Langflow?
14+
15+
[Langflow](https://langflow.org/) is a visual low-code tool for developers that makes it easier to build powerful AI agents and workflows that can use any API, model, or database.
16+
17+
> For more information on Langflow, visit its [documentation](https://docs.langflow.org/).
18+
19+
## How to use Apify with Langflow
20+
21+
To show how to use the platform, we are going to create an example AI agent workflow that will search the web for social media profiles of a given company and then extract data from the profiles. We will use the [Google Search Results Scraper](https://apify.com/apify/google-search-scraper) Actor to search the web for social media profiles of a given company. Then we will use the [TikTok Data Extractor](https://apify.com/clockworks/free-tiktok-scraper) Actor to extract data from the TikTok profiles.
22+
23+
> Langflow can either be installed locally or used in the cloud. The cloud version is available on the [Langflow](http://langflow.org/) website. If you are using the cloud version, you can skip the installation step.
24+
25+
### Installation
26+
27+
First, we need to install the Langflow platform using [uv](https://docs.astral.sh/uv/):
28+
```bash
29+
uv pip install langflow
30+
```
31+
32+
After the successful installation of Langflow, we can start the platform:
33+
```bash
34+
uv run langflow run
35+
```
36+
Other installation methods can be found in the [Langflow documentation](https://docs.langflow.org/get-started-installation).
37+
38+
When the platform is started, open the [Langflow UI](http://127.0.0.1:7860) in your browser.
39+
40+
### Building your flow
41+
42+
In the Langflow welcome screen, click the **New Flow** button:
43+
![Langflow welcome screen - New Flow](../images/langflow/new_flow.png)
44+
45+
In the **New Flow** screen, click **Blank Flow**:
46+
![New Flow screen - Blank Flow](../images/langflow/new_blank_flow.png)
47+
48+
From the bundle menu on the left side, add two **Apify Actors** components:
49+
![Flow - Add Apify Actors](../images/langflow/bundles_apify.png)
50+
51+
Input your API token (learn how to get it [here](https://docs.apify.com/platform/integrations/api))
52+
and set the Actor ID of the first component to `apify/google-search-scraper` and the second one to `clockworks/free-tiktok-scraper`:
53+
![Flow - Actors configuration](../images/langflow/apify_actors_configuration.png)
54+
55+
Now add the *Agent* component from the menu and set your OpenAI API key (get it [here](https://platform.openai.com/account/api-keys)):
56+
> For better results, switch the model to `gpt-4o` instead of `gpt-4o-mini` in the Agent configuration
57+
58+
![Flow - Add Agent](../images/langflow/add_agent.png)
59+
60+
Then connect the Apify Actor components **Tool** output to the Agent component **Tools** input:
61+
![Flow - Agent configure](../images/langflow/agent_configure.png)
62+
63+
Now add **Chat Input** and **Chat Output** components from the menu and connect them to the Agent component **Input** and **Response**:
64+
![Flow - Add Chat components](../images/langflow/add_chat.png)
65+
66+
The flow should look like this:
67+
![Flow - Final](../images/langflow/flow.png)
68+
69+
Click the **Playground** button in the top right corner and chat with the Agent to test the flow:
70+
![Flow - Playground](../images/langflow/playground.png)
71+
72+
Here is an example Agent output for the following query:
73+
```
74+
find tiktok profile of company alza.cz using google search and then show me the profile bio and their latest video
75+
```
76+
![Flow - Agent output](../images/langflow/agent_output.png)
23.6 KB
Loading
22.7 KB
Loading
134 KB
Loading
57 KB
Loading
59.5 KB
Loading
35.1 KB
Loading
152 KB
Loading
418 KB
Loading
23.7 KB
Loading

0 commit comments

Comments
 (0)