From 27f5416ec0bf45787fa1bd74bbe0d723da0c53c2 Mon Sep 17 00:00:00 2001 From: "April I. Murphy" <36110273+aimurphy@users.noreply.github.com> Date: Thu, 10 Jul 2025 18:15:42 -0700 Subject: [PATCH] docs: Repurpose Concepts section to focus on the visual editor and flows (#8845) * initial alignment with 1.5 pr * finish 1st rewrite of visual editor overview page * working on flows and welcome * more visual editor work * about langflow * next steps * lfoss-1395 more focus on agents mcp * align with PRs * working on publish flows page * finish embedded chat section * finish publish page * peer review pt 1 * coderabbit nitpicks * coderabbit nitpicks pt 2 * some updates * almost done * move all upgrade stuff to release notes page. * fix link * fix anchors * fix details * uncomment * add import * hide again --- docs/docs/API-Reference/api-build.md | 6 +- docs/docs/API-Reference/api-files.md | 84 +-- docs/docs/API-Reference/api-flows-run.md | 5 + docs/docs/API-Reference/api-flows.md | 4 +- docs/docs/API-Reference/api-projects.md | 2 +- .../api-reference-api-examples.md | 17 +- docs/docs/Agents/agents-tools.md | 2 +- docs/docs/Agents/agents.md | 6 +- docs/docs/Components/components-agents.md | 2 +- docs/docs/Components/components-io.md | 40 +- docs/docs/Components/mcp-client.md | 10 +- docs/docs/Concepts/concepts-components.md | 4 +- .../docs/Concepts/concepts-file-management.md | 4 + docs/docs/Concepts/concepts-flows-import.md | 189 +++++++ docs/docs/Concepts/concepts-flows.md | 197 +++---- docs/docs/Concepts/concepts-overview.md | 143 ++--- docs/docs/Concepts/concepts-playground.md | 49 +- docs/docs/Concepts/concepts-publish.md | 525 ++++++++++++++++-- docs/docs/Concepts/concepts-voice-mode.md | 4 +- docs/docs/Concepts/embedded-chat-widget.md | 266 --------- docs/docs/Concepts/mcp-server.md | 102 ++-- .../Configuration/configuration-api-keys.md | 49 +- .../configuration-authentication.md | 30 +- .../configuration-custom-database.md | 65 ++- .../configuration-global-variables.md | 15 +- .../Configuration/environment-variables.md | 42 +- .../docs/Contributing/contributing-bundles.md | 6 +- .../Contributing/contributing-community.md | 2 +- .../contributing-github-issues.md | 2 +- .../Contributing/contributing-telemetry.md | 6 +- docs/docs/Deployment/deployment-docker.md | 41 +- .../Deployment/deployment-public-server.md | 27 +- .../docs/Develop/Clients/typescript-client.md | 8 +- docs/docs/Develop/develop-application.md | 2 +- docs/docs/Develop/develop-overview.md | 2 +- .../Develop/install-custom-dependencies.md | 4 +- docs/docs/Develop/memory.md | 8 +- docs/docs/Get-Started/about-langflow.md | 82 +++ .../Get-Started/get-started-installation.md | 120 ++-- .../Get-Started/get-started-quickstart.md | 53 +- docs/docs/Get-Started/welcome-to-langflow.md | 37 +- docs/docs/Support/release-notes.md | 35 +- docs/docs/Support/troubleshooting.md | 36 ++ docs/docs/Tutorials/chat-with-files.md | 4 +- docs/docs/Tutorials/chat-with-rag.md | 4 +- docs/docusaurus.config.js | 23 +- docs/sidebars.js | 67 ++- 47 files changed, 1414 insertions(+), 1017 deletions(-) create mode 100644 docs/docs/Concepts/concepts-flows-import.md delete mode 100644 docs/docs/Concepts/embedded-chat-widget.md create mode 100644 docs/docs/Get-Started/about-langflow.md diff --git a/docs/docs/API-Reference/api-build.md b/docs/docs/API-Reference/api-build.md index 85eb942e6..ada316aa1 100644 --- a/docs/docs/API-Reference/api-build.md +++ b/docs/docs/API-Reference/api-build.md @@ -16,7 +16,7 @@ To run flows in your apps, see [Flow trigger endpoints](/api-flows-run). The `/build` endpoints support Langflow's frontend code for building flows in the Langflow Workspace. You can use these endpoints to build vertices and flows, as well as execute flows with streaming event responses. -You might need to use or understand these endpoints when contributing to the Langflow project's core codebase. +You might need to use or understand these endpoints when contributing to the Langflow codebase. ## Build flow and stream events @@ -105,8 +105,8 @@ curl -X GET \ | inputs | object | Optional. Input values for flow components. | | data | object | Optional. Flow data to override stored configuration. | | files | array[string] | Optional. List of file paths to use. | -| start_component_id | string | Optional. ID of the component where the execution should start. Component `id` values can be found in [Langflow JSON files](/concepts-flows#langflow-json-file-contents) | -| stop_component_id | string | Optional. ID of the component where the execution should stop. Component `id` values can be found in [Langflow JSON files](/concepts-flows#langflow-json-file-contents).| +| start_component_id | string | Optional. ID of the component where the execution should start. Component `id` values can be found in [Langflow JSON files](/concepts-flows-import#langflow-json-file-contents) | +| stop_component_id | string | Optional. ID of the component where the execution should stop. Component `id` values can be found in [Langflow JSON files](/concepts-flows-import#langflow-json-file-contents).| | log_builds | boolean | Optional. Control build logging. Default: `true`. | ### Set start and stop points diff --git a/docs/docs/API-Reference/api-files.md b/docs/docs/API-Reference/api-files.md index 5a3dc6b0d..a01bf4a64 100644 --- a/docs/docs/API-Reference/api-files.md +++ b/docs/docs/API-Reference/api-files.md @@ -20,7 +20,6 @@ There are two versions of the `/files` endpoints. - `/v2` files are tracked in the Langflow database. - `/v2` supports bulk upload and delete. - `/v2` responses contain more descriptive metadata. -- `/v2` endpoints have more strict security, requiring authentication by an API key or JWT. However, `/v2/files` doesn't support image files. To send image files to your flows through the API, use [Upload image files (v1)](#upload-image-files-v1). @@ -62,55 +61,56 @@ curl -X POST \ ### Upload image files (v1) -Send image files to the Langflow API for AI analysis. +Send image files to Langflow to use them in flows. -The default file limit is 100 MB. To configure this value, change the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` environment variable. -For more information, see [Supported environment variables](/environment-variables#supported-variables). +The default file limit is 100 MB. +To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment variable](/environment-variables). -1. To send an image to your flow with the API, POST the image file to the `v1/files/upload/` endpoint of your flow. - Replace **FILE_NAME** with the uploaded file name. +1. Attach the image to a `POST /v1/files/upload/$FLOW_ID` request with `--form` (`-F`) and the file path: -```bash -curl -X POST "$LANGFLOW_URL/api/v1/files/upload/a430cc57-06bb-4c11-be39-d3d4de68d2c4" \ - -H "Content-Type: multipart/form-data" \ - -H "x-api-key: $LANGFLOW_API_KEY" \ - -F "file=@FILE_NAME.png" -``` + ```bash + curl -X POST "$LANGFLOW_URL/api/v1/files/upload/$FLOW_ID" \ + -H "Content-Type: multipart/form-data" \ + -H "x-api-key: $LANGFLOW_API_KEY" \ + -F "file=@PATH/TO/FILE.png" + ``` -The API returns the image file path in the format `"file_path":"/_"}`. + A successful request returns the `file_path` for the image in the Langflow file management system in the format `FLOW_ID/TIMESTAMP_FILENAME.TYPE`. + For example: -```json -{ - "flowId": "a430cc57-06bb-4c11-be39-d3d4de68d2c4", - "file_path": "a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png" -} -``` + ```json + { + "flowId": "a430cc57-06bb-4c11-be39-d3d4de68d2c4", + "file_path": "a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png" + } + ``` -2. Post the image file to the **Chat Input** component of a **Basic prompting** flow. - Pass the file path value as an input in the **Tweaks** section of the curl call to Langflow. - Component `id` values can be found in [Langflow JSON files](/concepts-flows#langflow-json-file-contents). +2. Use the returned `file_path` to send the image file to other components that can accept file input. Where you specify the file path depends on the component type. -```bash -curl -X POST \ - "$LANGFLOW_URL/api/v1/run/a430cc57-06bb-4c11-be39-d3d4de68d2c4?stream=false" \ - -H 'Content-Type: application/json' \ - -H "x-api-key: $LANGFLOW_API_KEY" \ - -d '{ - "output_type": "chat", - "input_type": "chat", - "tweaks": { - "ChatInput-b67sL": { - "files": "a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png", - "input_value": "what do you see?" - } -}}' -``` + The following example runs a [Basic Prompting flow](/basic-prompting), passing the image file and the query `describe this image` as input for the **Chat Input** component. + In this case, the file path is specified in `tweaks`. -Your chatbot describes the image file you sent. + ```bash + curl -X POST \ + "$LANGFLOW_URL/api/v1/run/a430cc57-06bb-4c11-be39-d3d4de68d2c4?stream=false" \ + -H "Content-Type: application/json" \ + -H "x-api-key: $LANGFLOW_API_KEY" \ + -d '{ + "output_type": "chat", + "input_type": "chat", + "tweaks": { + "ChatInput-b67sL": { + "files": "a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png", + "input_value": "describe this image" + } + } + }' + ``` -```text -"text": "This flowchart appears to represent a complex system for processing financial inquiries using various AI agents and tools. Here's a breakdown of its components and how they might work together..." -``` + :::tip + For help with tweaks, use the **Input Schema** in a flow's [**API access** pane](/concepts-publish#api-access). + Setting tweaks with **Input Schema** also automatically populates the required component IDs. + ::: ### List files (v1) @@ -193,7 +193,7 @@ curl -X DELETE \ Use the `/files` endpoints to move files between your local machine and Langflow. -The `v2` endpoints require authentication by an API key or JWT. +The `/v2/files` endpoints can be authenticated by an API key or JWT. To create a Langflow API key and export it as an environment variable, see [Get started with the Langflow API](/api-reference-api-examples). ### Upload file (v2) diff --git a/docs/docs/API-Reference/api-flows-run.md b/docs/docs/API-Reference/api-flows-run.md index f76580d71..a330f9d61 100644 --- a/docs/docs/API-Reference/api-flows-run.md +++ b/docs/docs/API-Reference/api-flows-run.md @@ -12,6 +12,11 @@ To create, read, update, and delete flows, see [Flow management endpoints](/api- ## Run flow +:::tip +Langflow automatically generates Python, JavaScript, and curl code snippets for the `/v1/run/$FLOW_ID` endpoint for all flows. +For more information, see [Generate API code snippets](/concepts-publish#generate-api-code-snippets). +::: + Execute a specified flow by ID or name. Flow IDs can be found on the code snippets on the [**API access** pane](/concepts-publish#api-access) or in a flow's URL. diff --git a/docs/docs/API-Reference/api-flows.md b/docs/docs/API-Reference/api-flows.md index b98b6733d..d23dabe30 100644 --- a/docs/docs/API-Reference/api-flows.md +++ b/docs/docs/API-Reference/api-flows.md @@ -269,7 +269,7 @@ curl -X DELETE \ Exports specified flows to a ZIP file. -This endpoint downloads a ZIP file containing [Langflow JSON files](/concepts-flows#langflow-json-file-contents) for each flow ID listed in the request body. +This endpoint downloads a ZIP file containing [Langflow JSON files](/concepts-flows-import#langflow-json-file-contents) for each flow ID listed in the request body. @@ -301,7 +301,7 @@ curl -X POST \ ## Import flows -Imports flows by uploading a [Langflow-compatible JSON file](/concepts-flows#langflow-json-file-contents). +Imports flows by uploading a [Langflow-compatible JSON file](/concepts-flows-import#langflow-json-file-contents). To specify a target project for the flow, include the query parameter `project_id`. The target `project_id` must already exist before uploading a flow. Call the [/api/v1/projects/](/api-projects#read-projects) endpoint for a list of available projects. diff --git a/docs/docs/API-Reference/api-projects.md b/docs/docs/API-Reference/api-projects.md index c5a285365..da02164e1 100644 --- a/docs/docs/API-Reference/api-projects.md +++ b/docs/docs/API-Reference/api-projects.md @@ -6,7 +6,7 @@ slug: /api-projects import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -Use the `/projects` endpoint to create, read, update, and delete projects. +Use the `/projects` endpoint to create, read, update, and delete [Langflow projects](/concepts-flows#projects). Projects store your flows and components. diff --git a/docs/docs/API-Reference/api-reference-api-examples.md b/docs/docs/API-Reference/api-reference-api-examples.md index 288ae92db..3328cc88e 100644 --- a/docs/docs/API-Reference/api-reference-api-examples.md +++ b/docs/docs/API-Reference/api-reference-api-examples.md @@ -59,23 +59,12 @@ You can configure the Langflow port number in the `LANGFLOW_PORT` [environment v ### Authentication -As of Langflow v1.5, all API requests require a Langflow API key, even when `AUTO_LOGIN` is enabled. +In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is set to `True`. +The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication. -The only exceptions are the MCP endpoints at `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`. -These endpoints don't require authentication, regardless of the `AUTO_LOGIN` setting. - -You must provide a valid Langflow API key in either an `x-api-key` header or a query parameter. +To authenticate a Langflow API request, provide a Langflow API key in either an `x-api-key` header or query parameter. For more information, see [API keys](/configuration-api-keys). -
-Auto-login and API key authentication in earlier Langflow versions - -Prior to Langflow v1.5, when `AUTO_LOGIN` was enabled with `AUTO_LOGIN=true`, Langflow automatically logged users in as a superuser without requiring authentication, and API requests could be made without a Langflow API key. - -If you set `SKIP_AUTH_AUTO_LOGIN=true` and `AUTO_LOGIN=true`, authentication will be skipped entirely, and API requests will not require a Langflow API key. - -
- As with any API, follow industry best practices for storing and referencing sensitive credentials. For example, you can [set environment variables](#set-environment-variables) for your API keys, and then reference those environment variables in your API requests. diff --git a/docs/docs/Agents/agents-tools.md b/docs/docs/Agents/agents-tools.md index c32b8046e..4e60c7060 100644 --- a/docs/docs/Agents/agents-tools.md +++ b/docs/docs/Agents/agents-tools.md @@ -175,4 +175,4 @@ Your flow should be visible in the response as a tool. The connected flow returns an answer based on your question. For example, a Basic Prompting flow connected as a tool returns a different result depending upon its LLM and prompt instructions. -![Run Flow as tool connected to agnet](/img/agent-example-run-flow-as-tool.png) \ No newline at end of file +![Run Flow as tool connected to an agent](/img/agent-example-run-flow-as-tool.png) \ No newline at end of file diff --git a/docs/docs/Agents/agents.md b/docs/docs/Agents/agents.md index ddabd0585..a96e77f47 100644 --- a/docs/docs/Agents/agents.md +++ b/docs/docs/Agents/agents.md @@ -39,7 +39,7 @@ To allow agents to use tools from MCP servers, use the [**MCP Tools** component] When you attach a component as a tool, you must configure the component as a tool by enabling **Tool Mode**. -For more information, see [Configure tools for agents](/agents-tools) +For more information, see [Configure tools for agents](/agents-tools). ## Use the Agent component in a flow @@ -77,7 +77,7 @@ Web Search & Content Fetching: I can fetch and summarize content from web pages, News Search: I can search for recent news articles using Google News via RSS feeds. Calculator: I can perform arithmetic calculations and evaluate mathematical expressions. Date & Time: I can provide the current date and time in various time zones. -These tools help me provide up-to-date information, perform calculations, and retrieve specific data from the internet when needed. If you have a specific question, let me know, and I’ll use the most appropriate tool(s) to help! +These tools help me provide up-to-date information, perform calculations, and retrieve specific data from the internet when needed. If you have a specific question, let me know, and I'll use the most appropriate tool(s) to help! ``` 9. Ask the agent, `Summarize today's tech news`. @@ -88,4 +88,4 @@ Connect more tools to solve more specialized problems. ## See also -* [Configure tools for agents](/agents-tools) +* [Configure tools for agents](/agents-tools) \ No newline at end of file diff --git a/docs/docs/Components/components-agents.md b/docs/docs/Components/components-agents.md index a0fc5f0a1..7bf154aa2 100644 --- a/docs/docs/Components/components-agents.md +++ b/docs/docs/Components/components-agents.md @@ -64,7 +64,7 @@ Prior to Langflow 1.5, this component was named **MCP connection**. The **MCP tools** component connects to a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server and exposes the MCP server's tools as tools for Langflow agents. -In addition to being an MCP client that can leverage MCP servers, the **MCP tools** component's [SSE mode](/mcp-client#mcp-sse-mode) allows you to connect your flow to the Langflow MCP server at the `/api/v1/mcp/sse` API endpoint, exposing all flows within your [project](/concepts-overview#projects) as tools within a flow. +In addition to being an MCP client that can leverage MCP servers, the **MCP tools** component's [SSE mode](/mcp-client#mcp-sse-mode) allows you to connect your flow to the Langflow MCP server at the `/api/v1/mcp/sse` API endpoint, exposing all flows within your [project](/concepts-flows#projects) as tools within a flow. For more information, see [MCP client](/mcp-client). diff --git a/docs/docs/Components/components-io.md b/docs/docs/Components/components-io.md index b4ef5319a..69a3120e5 100644 --- a/docs/docs/Components/components-io.md +++ b/docs/docs/Components/components-io.md @@ -249,26 +249,28 @@ Your request is answered. A new chat session called `docker-question-on-m1` has appeared, using your unique `session_id`. 7. To modify additional parameters with **Tweaks** for your **Chat Input** and **Chat Output** components, click **Share**, and then click **API access**. 8. Click **Input schema** to modify parameters in the component's `data` object. -For example, disabling storing messages from the **Chat Input** component adds a **Tweak** to your command: -```text -curl --request POST \ - --url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \ - --header "Content-Type: application/json" \ - --header "x-api-key: LANGFLOW_API_KEY" \ - --data '{ - "input_value": "Text to input to the flow", - "output_type": "chat", - "input_type": "chat", - "tweaks": { - "ChatInput-4WKag": { - "should_store_message": false - } - } -}' -``` -To confirm your command is using the tweak, navigate to the **Logs** pane and view the request from the **Chat Input** component. -The value for `should_store_message` is `false`. + For example, disabling storing messages from the **Chat Input** component adds a **Tweak** to your command: + + ```text + curl --request POST \ + --url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \ + --header "Content-Type: application/json" \ + --header "x-api-key: LANGFLOW_API_KEY" \ + --data '{ + "input_value": "Text to input to the flow", + "output_type": "chat", + "input_type": "chat", + "tweaks": { + "ChatInput-4WKag": { + "should_store_message": false + } + } + }' + ``` + +9. To confirm your command is using the tweak, navigate to the **Logs** pane, and then view the request from the **Chat Input** component. +Given the preceding example, the value for `should_store_message` should be `false`. ## See also diff --git a/docs/docs/Components/mcp-client.md b/docs/docs/Components/mcp-client.md index 937450619..cd698e731 100644 --- a/docs/docs/Components/mcp-client.md +++ b/docs/docs/Components/mcp-client.md @@ -9,7 +9,7 @@ import Icon from "@site/src/components/icon"; Langflow integrates with the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) as both an MCP server and an MCP client. -This page describes how to use Langflow as an MCP client with the [MCP Tools](#use-the-mcp-tools-component) component and the [MCP servers](#manage-mcp-connections) page in **Settings**. +This page describes how to use Langflow as an MCP client with the [**MCP Tools** component](#use-the-mcp-tools-component) component and your [connected MCP servers](#manage-connected-mcp-servers). For information about using Langflow as an MCP server, see [Use Langflow as an MCP server](/mcp-server). @@ -19,10 +19,10 @@ The **MCP Tools** component connects to a [Model Context Protocol (MCP)](https:/ This component has two modes, depending on the type of server you want to access: -* To access tools provided by external, non-Langflow MCP servers, [use JSON](#mcp-stdio-mode) or [Stdio mode](#mcp-stdio-mode). -* To use flows from your [Langflow projects](/concepts-overview#projects) as MCP tools, [use SSE mode](#mcp-sse-mode). +* [Connect to a non-Langflow MCP server](#mcp-stdio-mode) with a JSON configuration file, server start command, or SSE URL to access tools provided by external, non-Langflow MCP servers. +* [Connect to a Langflow MCP server](#mcp-sse-mode) to use flows from your [Langflow projects](/concepts-flows#projects) as MCP tools. -### Use Stdio mode {#mcp-stdio-mode} +### Connect to a non-Langflow MCP server {#mcp-stdio-mode} 1. Add an **MCP Tools** component to your flow. @@ -67,7 +67,7 @@ For example, if you use `mcp-server-fetch` with the `fetch` tool, you could ask 8. If you want the agent to be able to use more tools, repeat these steps to add more **Tools** components with different servers or tools. -### Use SSE mode {#mcp-sse-mode} +### Connect a Langflow MCP server {#mcp-sse-mode} Every Langflow project runs a separate MCP server that exposes the project's flows as MCP tools. For more information about your projects' MCP servers, including how to manage exposed flows, see [Use Langflow as an MCP server](/mcp-server). diff --git a/docs/docs/Concepts/concepts-components.md b/docs/docs/Concepts/concepts-components.md index 657e3ec0b..9dc3f6111 100644 --- a/docs/docs/Concepts/concepts-components.md +++ b/docs/docs/Concepts/concepts-components.md @@ -92,7 +92,7 @@ For example, the **Prompt** component accepts inputs within curly braces, and ne Some components include dropdown menus to select the type of output sent to the next component. For example, the **Language Model** component includes **Model Response** or **Language Model** outputs. -The **Model Response** output sends a [Message](/concepts-objects#message) output on to another Message port. +The **Model Response** output sends a [Message](/concepts-objects#message-object) output on to another Message port. The **Language Model** output can be connected to components like [Structured output](/components-processing#structured-output) to use the LLM to power the component's reasoning. ### Port colors @@ -120,6 +120,8 @@ The following table lists the component port colors and their corresponding inpu ## Component code +You can edit components in the visual editor and in code. When editing a flow, select a component, and then click
+Cursor is now connected to your project's MCP server and your flows are registered as tools. +Cursor determines when to use tools based on your queries, and requests permissions when necessary. +For more information, see the [Cursor's MCP documentation](https://docs.cursor.com/context/model-context-protocol). + ### MCP server authentication and environment variables {#authentication} If your Langflow server [requires authentication](/configuration-authentication) ([`LANGFLOW_AUTO_LOGIN`](/environment-variables#LANGFLOW_AUTO_LOGIN) is set to `false`), then you must supply a [Langflow API key](/configuration-api-keys) in your MCP client configuration. @@ -175,44 +205,6 @@ Replace `KEY` and `VALUE` with the environment variable name and value you want To deploy your MCP server externally with ngrok, see [Deploy a public Langflow server](/deployment-public-server). -## Name and describe your flows for agentic use {#name-and-describe-your-flows} - -MCP clients like [Cursor](https://www.cursor.com/) "see" your Langflow project as a single MCP server, with _all_ of your enabled flows listed as tools. -This can confuse agents. -For example, an agent won't know that flow `adbbf8c7-0a34-493b-90ea-5e8b42f78b66` is a [Document Q&A](/document-qa) flow for a specific text file. - -To prevent this behavior, make sure to [name and describe](#select-flows-to-serve) your flows clearly. -It's helpful to think of the names and descriptions as function names and code comments, making sure to use clear statements describing the problems your flows solve. - -For example, let's say you have a [Document Q&A](/document-qa) flow that loads a sample resume for an LLM to chat with, and that you've given it the following name and description: - - - **Tool Name**: `document_qa_for_resume` - - - **Tool Description**: `A flow for analyzing Emily's resume.` - -If you ask Cursor a question specifically about the resume, such as `What job experience does Emily have?`, the agent asks to call the MCP tool `document_qa_for_resume`. -That's because your name and description provided the agent with a clear purpose for the tool. - -When you run the tool, the agent requests permissions when necessary, and then provides a response. -For example: - -``` -{ - "input_value": "What job experience does Emily have?" -} -Result: -What job experience does Emily have? -Emily J. Wilson has the following job experience: -``` - -If you ask about a different resume, such as `What job experience does Alex have?`, you've provided enough information in the description for the agent to make the correct decision: - -``` -I notice you're asking about Alex's job experience. -Based on the available tools, I can see there is a Document QA for Resume flow that's designed for analyzing resumes. -However, the description mentions it's for "Emily's resume" not Alex's. I don't have access to Alex's resume or job experience information. -``` - ## Use MCP Inspector to test and debug flows {#test-and-debug-flows} [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) is a common tool for testing and debugging MCP servers. diff --git a/docs/docs/Configuration/configuration-api-keys.md b/docs/docs/Configuration/configuration-api-keys.md index 56803a9ca..52bc58305 100644 --- a/docs/docs/Configuration/configuration-api-keys.md +++ b/docs/docs/Configuration/configuration-api-keys.md @@ -13,18 +13,17 @@ The API key has the same permissions and access as you do when you launch Langfl An API key represents the user who created it. If you create a key as a superuser, then that key will have superuser privileges. Anyone who has that key can authorize superuser actions through the Langflow API, including user management and flow management. -In Langflow versions 1.5 and later, most API requests require a Langflow API key, even when `AUTO_LOGIN=true`. - -The only exceptions are the MCP endpoints: `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`. -These endpoints don't require authentication, regardless of the `AUTO_LOGIN` setting. +In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is set to `True`. +The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
-Auto-login and API key authentication in earlier Langflow versions +AUTO_LOGIN and SKIP_AUTH options -If you are running a Langflow version earlier than 1.5, if `AUTO_LOGIN=true`, Langflow automatically logs users in as a superuser without requiring authentication, and API requests can be made without a Langflow API key. - -If you set `SKIP_AUTH_AUTO_LOGIN=true` and `AUTO_LOGIN=true`, authentication will be skipped entirely, and API requests will not require a Langflow API key. +In Langflow versions earlier than 1.5, if `AUTO_LOGIN=true`, then Langflow automatically logs users in as a superuser without requiring authentication. +In this case, API requests don't require a Langflow API key. +In Langflow version 1.5, you can set `SKIP_AUTH_AUTO_LOGIN=true` and `AUTO_LOGIN=true` to skip authentication for API requests. +However, the `SKIP_AUTH_AUTO_LOGIN` option will be removed in a future release.
## Generate a Langflow API key @@ -36,13 +35,12 @@ The UI-generated key is appropriate for most cases. The CLI-generated key is nee -1. Click your user icon, and then select **Settings**. +1. In the Langflow UI header, click your profile icon, and then select **Settings**. 2. Click **Langflow API Keys**, and then click **Add New**. 3. Name your key, and then click **Create API Key**. -4. Copy the API key and store it in a secure location. +4. Copy the API key and store it securely. - If you're serving your flow with `--backend-only=true`, you can't create API keys in the UI, because the frontend is not running. @@ -90,7 +88,7 @@ To create an API key for a user from the CLI, do the following: -2. Create an API key: +3. Create an API key: ```shell uv run langflow api-key @@ -102,7 +100,7 @@ To create an API key for a user from the CLI, do the following: Include your API key in API requests to authenticate requests to Langflow. -API keys allow access only to the flows and components of the specific user to whom the key was issued. +API keys allow access only to the flows and components of the specific user who created the key. @@ -141,10 +139,10 @@ For more information, see [Authentication](/configuration-authentication#langflo ## Revoke an API key -To revoke an API key, delete it from the list of keys in the **Settings** menu. +To revoke an API key, delete it from your Langflow settings: -1. Click your user icon, and then select **Settings**. -2. Click **Langflow API**. +1. In the Langflow UI header, click your profile icon, and then select **Settings**. +2. Click **Langflow API Keys**. 3. Select the keys you want to delete, and then click diff --git a/docs/docs/Configuration/environment-variables.md b/docs/docs/Configuration/environment-variables.md index a5434ee45..f3286ae97 100644 --- a/docs/docs/Configuration/environment-variables.md +++ b/docs/docs/Configuration/environment-variables.md @@ -54,11 +54,13 @@ If it detects a supported environment variable, then it automatically adopts the ### Import environment variables from a .env file {#configure-variables-env-file} -1. Create a `.env` file and open it in your preferred editor. +1. If Langflow is running, quit Langflow. -2. Add your environment variables to the file: +2. Create a `.env` file, and then open it in your preferred editor. - ```text title=".env" +3. Define [Langflow environment variables](#supported-variables) in the `.env` file. For example: + + ```text DO_NOT_TRACK=true LANGFLOW_AUTO_LOGIN=false LANGFLOW_AUTO_SAVING=true @@ -91,44 +93,48 @@ If it detects a supported environment variable, then it automatically adopts the LANGFLOW_WORKERS=3 ``` - :::tip - The Langflow project includes a [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) file to help you get started. - You can copy the contents of this file into your own `.env` file and replace the example values with your own preferred settings. - ::: + For additional examples, see the [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) file in the Langflow repository. -3. Save and close the file. +4. Save and close `.env`. -4. Start Langflow using the `--env-file` option to define the path to your `.env` file: - - +5. Start Langflow with your `.env` file: + + ```bash python -m langflow run --env-file .env ``` - + + ```bash docker run -it --rm \ -p 7860:7860 \ --env-file .env \ langflowai/langflow:latest ``` - + + If your `.env` file isn't in the same directory, provide the path to your `.env` file. + On startup, Langflow imports the environment variables from your `.env` file, as well as any that you [set in your terminal](#configure-variables-terminal), and adopts their specified values. ## Precedence {#precedence} -Environment variables [defined in the .env file](#configure-variables-env-file) take precedence over those [set in your terminal](#configure-variables-terminal). -That means, if you happen to set the same environment variable in both your terminal and your `.env` file, Langflow adopts the value from the the `.env` file. +You can set Langflow environment variables in your terminal, in `.env`, and with [Langflow CLI options](./configuration-cli.md). -:::info[CLI precedence] -[Langflow CLI options](./configuration-cli.md) override the value of corresponding environment variables defined in the `.env` file as well as any environment variables set in your terminal. -::: +If an environment variable is set in multiple places, the following hierarchy applies: + +1. Langflow CLI options override `.env` and terminal variables. +2. `.env` overrides terminal variables. +3. Terminal variables are used only if the variable isn't set in `.env` or Langflow CLI options. + +For example, if you set `LANGFLOW_PORT` in `.env` and your terminal, then Langflow uses the value from `.env`. +Similarly, if you run a Langflow CLI command with `--port`, Langflow uses that port number instead of the `LANGFLOW_PORT` in `.env`. ## Supported environment variables {#supported-variables} diff --git a/docs/docs/Contributing/contributing-bundles.md b/docs/docs/Contributing/contributing-bundles.md index 5cdb25f2b..64823ed9d 100644 --- a/docs/docs/Contributing/contributing-bundles.md +++ b/docs/docs/Contributing/contributing-bundles.md @@ -9,7 +9,7 @@ This example adds a new bundle named `DarthVader`. ## Add the bundle to the backend folder -1. Navigate to the backend directory in the Langflow project and create a new folder for your bundle. +1. Navigate to the backend directory in the Langflow repository and create a new folder for your bundle. The path for your new component is `src > backend > base > langflow > components > darth_vader`. You can view the [components folder](https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/components) in the Langflow repository. @@ -23,7 +23,7 @@ For an example of adding multiple components in a bundle, see the [Notion](https ## Add the bundle to the frontend folder -1. Navigate to the frontend directory in the Langflow project to add your bundle's icon. +1. Navigate to the frontend directory in the Langflow repository to add your bundle's icon. The path for your new component icon is `src > frontend > src > icons > DarthVader` You can view the [icons folder](https://github.com/langflow-ai/langflow/tree/main/src/frontend/src/icons) in the Langflow repository. To add your icon, create **three** files inside the `icons/darth_vader` folder. @@ -89,7 +89,7 @@ For example: CrewAI: () => import("@/icons/CrewAI").then((mod) => ({ default: mod.CrewAiIcon })), DarthVader: () => - import("@/icons/DartVader").then((mod) => ({ default: mod.DarthVaderIcon })), + import("@/icons/DarthVader").then((mod) => ({ default: mod.DarthVaderIcon })), DeepSeek: () => import("@/icons/DeepSeek").then((mod) => ({ default: mod.DeepSeekIcon })), ``` diff --git a/docs/docs/Contributing/contributing-community.md b/docs/docs/Contributing/contributing-community.md index f8ff278f0..ada282099 100644 --- a/docs/docs/Contributing/contributing-community.md +++ b/docs/docs/Contributing/contributing-community.md @@ -3,7 +3,7 @@ title: Join the Langflow community slug: /contributing-community --- -There are several ways you can interact with the Langflow community and learn more about the Langflow project. +There are several ways you can interact with the Langflow community and learn more about the Langflow codebase. ## Join the Langflow Discord server diff --git a/docs/docs/Contributing/contributing-github-issues.md b/docs/docs/Contributing/contributing-github-issues.md index 0776ed98c..91ad17025 100644 --- a/docs/docs/Contributing/contributing-github-issues.md +++ b/docs/docs/Contributing/contributing-github-issues.md @@ -5,7 +5,7 @@ slug: /contributing-github-issues The Langflow GitHub repository is an integral part of the [Langflow community](/contributing-community). -In addition to general assistance with Langflow, the repository is the best place to report bugs and request enhancements to ensure that they are tracked by the Langflow project. +In addition to general assistance with Langflow, the repository is the best place to report bugs and request enhancements to ensure that they are tracked by Langflow maintainers. ## GitHub issues diff --git a/docs/docs/Contributing/contributing-telemetry.md b/docs/docs/Contributing/contributing-telemetry.md index 0d7d24b8d..f74c4f29a 100644 --- a/docs/docs/Contributing/contributing-telemetry.md +++ b/docs/docs/Contributing/contributing-telemetry.md @@ -36,9 +36,9 @@ To opt out of telemetry, set the `LANGFLOW_DO_NOT_TRACK` or `DO_NOT_TRACK` e ### Playground {#ae6c3859f612441db3c15a7155e9f920} -- **Seconds**: Duration in seconds for playground execution, offering insights into performance during testing or experimental stages. -- **ComponentCount**: Number of components used in the playground, which helps understand complexity and usage patterns. -- **Success**: Success status of the playground operation, aiding in identifying the stability of experimental features. +- **Seconds**: Duration in seconds for Playground execution, offering insights into performance during testing or experimental stages. +- **ComponentCount**: Number of components used in the Playground, which helps understand complexity and usage patterns. +- **Success**: Success status of the Playground operation, aiding in identifying the stability of experimental features. ### Component {#630728d6654c40a6b8901459a4bc3a4e} diff --git a/docs/docs/Deployment/deployment-docker.md b/docs/docs/Deployment/deployment-docker.md index 403b28690..5d79b764c 100644 --- a/docs/docs/Deployment/deployment-docker.md +++ b/docs/docs/Deployment/deployment-docker.md @@ -3,30 +3,30 @@ title: Deploy Langflow on Docker slug: /deployment-docker --- -This guide demonstrates deploying Langflow with Docker and Docker Compose. +Running applications in Docker containers ensures consistent behavior across different systems and eliminates dependency conflicts. -Three options are available: +You can use the Langflow Docker image to start a Langflow container. -* The [Quickstart](#quickstart) option starts a Docker container with default values. -* The [Docker compose](#clone-the-repo-and-build-the-langflow-docker-container) option builds Langflow with a persistent PostgreSQL database service. -* The [Package your flow as a docker image](#package-your-flow-as-a-docker-image) option demonstrates packaging an existing flow with a Dockerfile. +This guide demonstrates several ways to deploy Langflow with [Docker](https://docs.docker.com/) and [Docker Compose](https://docs.docker.com/compose/): -For more information on configuring the Docker image, see [Customize the Langflow Docker image with your own code](#customize-the-langflow-docker-image-with-your-own-code). + +* [Start a Langflow container with default values](#quickstart) +* [Clone the repo and use Docker Compose to build the Langflow Docker container](#clone-the-repo-and-build-the-langflow-docker-container) with a persistent PostgreSQL database service +* [Use a Dockerfile to package a flow as a Docker image](#package-your-flow-as-a-docker-image) +* [Customize the Langflow Docker image](#customize-the-langflow-docker-image-with-your-own-code) -## Prerequisites +## Start a Langflow container with default values {#quickstart} -- [Docker](https://docs.docker.com/) -- [Docker Compose](https://docs.docker.com/compose/) - -## Quickstart - -With Docker installed and running on your system, run this command: +With Docker installed and running on your system, run the following command: `docker run -p 7860:7860 langflowai/langflow:latest` -Langflow is now accessible at `http://localhost:7860/`. +Then, access Langflow at `http://localhost:7860/`. + ## Clone the repo and build the Langflow Docker container +Use Docker Compose to build Langflow with a persistent PostgreSQL database service: + 1. Clone the Langflow repository: `git clone https://github.com/langflow-ai/langflow.git` @@ -39,17 +39,14 @@ Langflow is now accessible at `http://localhost:7860/`. `docker compose up` -Langflow is now accessible at `http://localhost:7860/`. +4. Access Langflow at `http://localhost:7860/`. ### Configure Docker services The Docker Compose configuration spins up two services: `langflow` and `postgres`. -To configure values for these services at container startup, include them in your `.env` file. - -An example `.env` file is available in the [project repository](https://github.com/langflow-ai/langflow/blob/main/.env.example). - -To pass the `.env` values at container startup, include the flag in your `docker run` command: +To configure values for these services at container startup, define relevant [Langflow environment variables](/environment-variables) in a `.env` file. +Then, include the `--env-file` flag in your `docker run` command: ``` docker run -it --rm \ @@ -58,6 +55,8 @@ docker run -it --rm \ langflowai/langflow:latest ``` +If your `.env` file isn't in the same directory, provide the path to your `.env` file. + ### Langflow service The `langflow`service serves both the backend API and frontend UI of the Langflow web application. @@ -95,7 +94,7 @@ Volumes: If you want to deploy a specific version of Langflow, you can modify the `image` field under the `langflow` service in the Docker Compose file. For example, to use version `1.0-alpha`, change `langflowai/langflow:latest` to `langflowai/langflow:1.0-alpha`. -## Package your flow as a Docker image +## Package your flow as a Docker image {#package-your-flow-as-a-docker-image} You can include your Langflow flow with the application image. When you build the image, your saved flow `.JSON` flow is included. diff --git a/docs/docs/Deployment/deployment-public-server.md b/docs/docs/Deployment/deployment-public-server.md index f408195ef..e0682a826 100644 --- a/docs/docs/Deployment/deployment-public-server.md +++ b/docs/docs/Deployment/deployment-public-server.md @@ -6,7 +6,7 @@ slug: /deployment-public-server By default, your Langflow server at `http://localhost:7860` isn't exposed to the public internet. However, you can forward Langflow server traffic with a forwarding platform like [ngrok](https://ngrok.com/docs/getting-started/) or [zrok](https://docs.zrok.io/docs/getting-started) to make your server public. -When your Langflow server is public, you can do things like [deploy your Langflow MCP server externally](#deploy-your-mcp-server-externally), [serve API requests](#serve-api-requests), and [share your playground externally](#share-your-playground-externally). +When your Langflow server is public, you can do things like [deploy your Langflow MCP server externally](#deploy-your-mcp-server-externally), [serve API requests](#serve-api-requests), and [share a flow's **Playground** publicly](#share-a-flows-playground). ## Prerequisites @@ -55,7 +55,7 @@ When your Langflow server is public, you can do things like [deploy your Langflo ## Use a public Langflow server -When your Langflow server is public, you can do things like [deploy your Langflow MCP server externally](#deploy-your-mcp-server-externally), [serve API requests](#serve-api-requests), and [share a Playground as a public website](#share-your-playground-externally). +When your Langflow server is public, you can do things like [deploy your Langflow MCP server externally](#deploy-your-mcp-server-externally), [serve API requests](#serve-api-requests), and [share a flow's **Playground** publicly](#share-a-flows-playground). ### Deploy your MCP server externally @@ -116,24 +116,9 @@ For example, the following code snippet calls an ngrok domain to trigger the spe For a demo of the Langflow API in a script, see the [Quickstart](/get-started-quickstart). -### Share your playground externally +### Share a flow's Playground -The **Shareable playground** option exposes the **Playground** for a single flow at the `/public_flow/{flow-id}` endpoint. +After you deploy a public Langflow server, you can use the **Shareable Playground** option to make a flow's **Playground** available at a public URL. +If a user accesses this URL, they can interact with the flow's chat input and output and view the results without installing Langflow or generating a Langflow API key. -This allows you to share a public URL with another user that displays only the **Playground** chat window for the specified flow. - -The user can interact with the flow's chat input and output and view the results without requiring a Langflow installation or API keys of their own. - -:::important -The **Sharable Playground** is for testing purposes only. - -The **Playground** isn't meant for embedding flows in applications. For information about running flows in applications or websites, see [About developing and configuring Langflow applications](/develop-overview) and [Publish flows](/concepts-publish). -::: - -To share a flow's **Playground** with another user, do the following: - -1. In Langflow, open the flow you want share. -2. From the **Workspace**, click **Share**, and then enable **Shareable Playground**. -3. Click **Shareable Playground** again to open the **Playground** window. -This window's URL is the flow's **Sharable Playground** address, such as `https://3f7c-73-64-93-151.ngrok-free.app/playground/d764c4b8-5cec-4c0f-9de0-4b419b11901a`. -4. Send the URL to another user to give them access to the flow's **Playground**. \ No newline at end of file +For more information, see [Share a flow's Playground](/concepts-playground#share-a-flows-playground). \ No newline at end of file diff --git a/docs/docs/Develop/Clients/typescript-client.md b/docs/docs/Develop/Clients/typescript-client.md index deb4ec5d6..8a855a5fb 100644 --- a/docs/docs/Develop/Clients/typescript-client.md +++ b/docs/docs/Develop/Clients/typescript-client.md @@ -359,10 +359,4 @@ Log: Log { -The `FlowResponse` object is returned to the client, with the `outputs` array including your flow result. - -## Langflow TypeScript project repository - -You can do even more with the Langflow TypeScript client. - -For more information, see the [langflow-client-ts](https://github.com/datastax/langflow-client-ts/) repository. \ No newline at end of file +The `FlowResponse` object is returned to the client, with the `outputs` array including your flow result. \ No newline at end of file diff --git a/docs/docs/Develop/develop-application.md b/docs/docs/Develop/develop-application.md index 821cab5c8..64f2b9f4c 100644 --- a/docs/docs/Develop/develop-application.md +++ b/docs/docs/Develop/develop-application.md @@ -66,7 +66,7 @@ To add authentication to your server, see [Authentication](/configuration-authen Add your flow's `.JSON` files to the `/flows` folder. -To export your flows from Langflow, see [Flows](/concepts-flows). +To export your flows from Langflow, see [Import and export flows](/concepts-flows-import). Optionally, add any custom components to a `/components` folder, and specify the path in your `docker.env`. diff --git a/docs/docs/Develop/develop-overview.md b/docs/docs/Develop/develop-overview.md index e34f01eaf..2fcafdcb1 100644 --- a/docs/docs/Develop/develop-overview.md +++ b/docs/docs/Develop/develop-overview.md @@ -8,7 +8,7 @@ The following pages provide information about how to develop and configure Langf The [Develop an application in Langflow](/develop-application) guide walks you through packaging and serving a flow, from your local development environment to a containerized application. As you build your application, you will configure the following application behaviors. More detailed explanation is provided in the individual pages. -* [Custom Dependencies](/install-custom-dependencies) - Add and manage additional Python packages and external dependencies in your Langflow projects. +* [Custom Dependencies](/install-custom-dependencies) - Add and manage additional Python packages and external dependencies in your Langflow applications. * [Memory and Storage](/memory) - Configure Langflow's storage and caching behavior. diff --git a/docs/docs/Develop/install-custom-dependencies.md b/docs/docs/Develop/install-custom-dependencies.md index 7eaf3caed..ff07b12e9 100644 --- a/docs/docs/Develop/install-custom-dependencies.md +++ b/docs/docs/Develop/install-custom-dependencies.md @@ -67,9 +67,9 @@ If you're working within a cloned Langflow repository, add dependencies with `uv uv add langflow matplotlib ``` -## Add dependencies to the Langflow project +## Add dependencies to the Langflow codebase -When contributing to Langflow itself, add dependencies to the project's configuration. +When contributing to the Langflow codebase, you might need to add dependencies to Langflow. Langflow uses a workspace with two packages: diff --git a/docs/docs/Develop/memory.md b/docs/docs/Develop/memory.md index 1ada068b8..7910eddd6 100644 --- a/docs/docs/Develop/memory.md +++ b/docs/docs/Develop/memory.md @@ -7,7 +7,7 @@ Langflow provides flexible memory management options for storage and retrieval. This page details the following memory configuration options in Langflow. -- [Use local Langflow database tables](#local-langflow-database-tables) +- [Local Langflow database tables](#local-langflow-database-tables) - [Store messages in local memory](#store-messages-in-local-memory) - [Configure external memory](#configure-external-memory) - [Configure the external database connection](#configure-the-external-database-connection) @@ -25,7 +25,7 @@ The following tables are stored in `langflow.db`: • **User** - Stores user account information including credentials, permissions, and profiles. For more information, see [Authentication](/configuration-authentication). -• **Flow** - Contains flow configurations. For more information, see [Flows](/concepts-flows). +• **Flow** - Contains flow configurations. For more information, see [Build flows](/concepts-flows). • **Message** - Stores chat messages and interactions that occur between components. For more information, see [Message objects](/concepts-objects#message-object). @@ -33,11 +33,11 @@ The following tables are stored in `langflow.db`: • **ApiKey** - Manages API authentication keys for users. For more information, see [API keys](/configuration-api-keys). -• **Project** - Provides a structure for flow storage. For more information, see [Projects](/concepts-overview#projects). +• **Project** - Provides a structure for flow storage. For more information, see [Projects](/concepts-flows#projects). • **Variables** - Stores global encrypted values and credentials. For more information, see [Global variables](/configuration-global-variables). -• **VertexBuild** - Tracks the build status of individual nodes within flows. For more information, see [Run a flow in the playground](/concepts-playground). +• **VertexBuild** - Tracks the build status of individual nodes within flows. For more information, see [Run a flow in the Playground](/concepts-playground). For more information, see the database models in the [source code](https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/services/database/models). diff --git a/docs/docs/Get-Started/about-langflow.md b/docs/docs/Get-Started/about-langflow.md new file mode 100644 index 000000000..9355115e0 --- /dev/null +++ b/docs/docs/Get-Started/about-langflow.md @@ -0,0 +1,82 @@ +--- +title: What is Langflow? +slug: /about-langflow +--- + +Langflow is an open-source, Python-based, customizable framework for building AI applications. +It supports important AI functionality like agents and the Model Context Protocol (MCP), and it doesn't require you to use specific large language models (LLMs) or vector stores. + +The visual editor simplifies prototyping of application workflows, enabling developers to quickly turn their ideas into powerful, real-world solutions. + +:::tip Try it +Build and run your first flow in minutes: [Install Langflow](/get-started-installation), and then try the [Quickstart](/get-started-quickstart). +::: + +## Application development and prototyping + +Langflow can help you develop a wide variety of AI applications, such as [chatbots](/memory-chatbot), [document analysis systems](/document-qa), [content generators](/blog-writer), and [agentic applications](/simple-agent). + +### Create flows in minutes + +The primary purpose of Langflow is to create and serve flows, which are functional representations of application workflows. + +To [build a flow](/concepts-flows), you connect and configure component nodes. Each component is a single step in the workflow. + +With Langflow's [visual editor](/concepts-overview), you can drag and drop components to quickly build and test a functional AI application workflow. +For example, you could build a chatbot flow for an e-commerce store that uses an LLM and a product data store to allow customers to ask questions about the store's products. + +![Basic prompting flow within the Workspace](/img/workspace-basic-prompting.png) + +### Test flows in real-time + +You can use the [Playground](/concepts-playground) to test flows without having to build your entire application stack. +You can interact with your flows and get real-time feedback about flow logic and response generation. + +You can also run individual components to test dependencies in isolation. + +### Run and serve flows + +You can use your flows as prototypes for more formal application development, or you can use the Langflow API to embed your flows into your application code. + +For more extensive projects, you can build Langflow as a dependency or deploy a Langflow server to serve flows over the public internet. + +For more information, see the following: + +* [Share and embed flows](/concepts-publish) +* [Get started with the Langflow API](/api-reference-api-examples) +* [Develop an application with Langflow](/develop-application) +* [Langflow deployment overview](/deployment-overview) + +## Endless modifications and integrations + +Langflow provides [components](/concepts-components) that support many services, tools, and functionality that are required for AI applications. + +Some components are generalized, such as inputs, outputs, and data stores. +Others are specialized, such as agents, language models, and embedding providers. + +All components offer parameters that you can set to fixed or variable values. You can also use tweaks to temporarily override flow settings at runtime. + +### Agent and MCP support + +In addition to building agentic flows with Langflow, you can leverage Langflow's built-in agent and MCP features: + +* [Use Langflow Agents](/agents) +* [Use components and flows as Agent tools](/agents-tools) +* [Use Langflow as an MCP server](/mcp-server) +* [Use Langflow as an MCP client](/mcp-client) + +### Extensibility + +In addition to the core components, Langflow supports custom components. + +You can use custom components developed by others, and you can develop your own custom components for personal use or to share with other Langflow users. + +For more information, see the following: + +* [Contribute to Langflow](/contributing-how-to-contribute) +* [Create custom Python components](/components-custom-components) + +## Next steps + +* [Install Langflow](/get-started-installation) +* [Quickstart](/get-started-quickstart) \ No newline at end of file diff --git a/docs/docs/Get-Started/get-started-installation.md b/docs/docs/Get-Started/get-started-installation.md index 7960d8a5e..f42074e5e 100644 --- a/docs/docs/Get-Started/get-started-installation.md +++ b/docs/docs/Get-Started/get-started-installation.md @@ -8,15 +8,20 @@ import TabItem from '@theme/TabItem'; Langflow can be installed in multiple ways: -* **Langflow Desktop (Recommended)**: Download and install the [standalone desktop application](#install-and-run-langflow-desktop) for the easiest setup experience. +* [**Langflow Desktop (Recommended)**](#install-and-run-langflow-desktop): Download and install the standalone desktop application for the least complicated setup experience. +This option includes dependency management and facilitated upgrades. -* **Docker**: Pull and run the [Docker image](#install-and-run-langflow-docker) to start a Langflow container. +* [**Docker**](#install-and-run-langflow-docker): Pull and run the Langflow Docker image to start a Langflow container and run Langflow in isolation. -* **Python package**: Install the [Langflow OSS Python package](#install-and-run-the-langflow-oss-python-package). +* [**Python package**](#install-and-run-the-langflow-oss-python-package): Install and run the Langflow OSS Python package. +This option offers more control over the environment, dependencies, and versioning. + +* [**Install from source**](/contributing-how-to-contribute#install-langflow-from-source): Use this option if you want to contribute to the Langflow codebase or documentation. ## Install and run Langflow Desktop -**Langflow Desktop** is a desktop version of Langflow that includes all the features of open source Langflow, with an additional [version management](#manage-your-version-of-langflow-desktop) feature for managing your Langflow version. +Langflow Desktop is a desktop version of Langflow that simplifies dependency management and upgrades. +However, some features aren't available for Langflow Desktop, such as the **Shareable Playground**. @@ -24,9 +29,7 @@ Langflow can be installed in multiple ways: 1. Navigate to [Langflow Desktop](https://www.langflow.org/desktop). 2. Click **Download Langflow**, enter your contact information, and then click **Download**. 3. Mount and install the Langflow application. - 4. When the installation completes, open the Langflow application. - - After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart). + 4. When the installation completes, open the Langflow application, and then create your first flow with the [Quickstart](/get-started-quickstart). @@ -40,58 +43,45 @@ Langflow can be installed in multiple ways: Windows installations of Langflow Desktop require a C++ compiler that may not be present on your system. If you receive a `C++ Build Tools Required!` error, follow the on-screen prompt to install Microsoft C++ Build Tools, or [install Microsoft Visual Studio](https://visualstudio.microsoft.com/downloads/). ::: - 5. When the installation completes, open the Langflow application. - - After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart). + 5. When the installation completes, open the Langflow application, and then create your first flow with the [Quickstart](/get-started-quickstart). - After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart). - -### Manage your version of Langflow Desktop - -When a new version of Langflow is available, Langflow Desktop displays an upgrade message. - -To manage your version of Langflow Desktop, follow these steps: - - 1. In Langflow Desktop, click your profile image, and then select **Version Management**. - The **Version Management** pane lists your active Langflow version first, followed by other available versions. - The **latest** version is always highlighted. - 2. To change your Langflow version, select another version. - A confirmation pane containing the selected version's changelog appears. - 3. To apply the change, click **Confirm**. - Langflow desktop restarts to install and activate the new version. - -### Manage dependencies in Langflow Desktop +For upgrade information, see the [Release notes](/release-notes). To manage dependencies in Langflow Desktop, see [Install custom dependencies in Langflow Desktop](/install-custom-dependencies#langflow-desktop). ## Install and run Langflow with Docker {#install-and-run-langflow-docker} -You can use the [Langflow Docker image](https://hub.docker.com/r/langflowai/langflow) to run Langflow in an isolated environment. -Running applications in [Docker](https://docs.docker.com/) containers ensures consistent behavior across different systems and eliminates dependency conflicts. +You can use the Langflow Docker image to start a Langflow container. +For more information, see [Deploy Langflow on Docker](/deployment-docker). 1. Install and start [Docker](https://docs.docker.com/). + 2. Pull the latest [Langflow Docker image](https://hub.docker.com/r/langflowai/langflow) and start it: - ```bash - docker run -p 7860:7860 langflowai/langflow:latest - ``` + ```bash + docker run -p 7860:7860 langflowai/langflow:latest + ``` 3. To access Langflow, navigate to `http://localhost:7860/`. -For more information, see [Deploy Langflow on Docker](/deployment-docker). +4. Create your first flow with the [Quickstart](/get-started-quickstart). ## Install and run the Langflow OSS Python package -To install and run Langflow OSS, you need the following: +1. Make sure you have the required dependencies and infrastructure: -- [Python 3.10 to 3.13](https://www.python.org/downloads/release/python-3100/) for macOS/Linux, and Python 3.10 to 3.12 for Windows -- [uv](https://docs.astral.sh/uv/getting-started/installation/) -- At minimum, a dual-core CPU and 2 GB RAM, but a multi-core CPU and at least 4 GB RAM are recommended + - [Python](https://www.python.org/downloads/release/python-3100/) + - macOS and Linux: Version 3.10 to 3.13 + - Windows: Version 3.10 to 3.12 + - [uv](https://docs.astral.sh/uv/getting-started/installation/) + - Sufficient infrastructure: + - Minimum: Dual-core CPU and 2 GB RAM + - Recommended: Multi-core CPU and at least 4 GB RAM -1. Create a virtual environment with [uv](https://docs.astral.sh/uv/pip/environments). +2. Create a virtual environment with [uv](https://docs.astral.sh/uv/pip/environments).
Need help with virtual environments? @@ -140,51 +130,43 @@ To delete the virtual environment, type `Remove-Item VENV_NAME`.
-2. To install Langflow, run the following command. +3. In your virtual environment, install Langflow: ```bash uv pip install langflow ``` -3. After installation, start Langflow: + To install a specific version of the Langflow package by adding the required version to the command, such as `uv pip install langflow==1.4.22`. + +
+ Reinstall or upgrade Langflow + + To reinstall Langflow and all of its dependencies, run `uv pip install langflow --force-reinstall`. + + To upgrade Langflow to the latest version, run `uv pip install langflow -U`. + However, the Langflow team recommends taking steps to backup your existing installation before you upgrade Langflow. + For more information, see [Prepare to upgrade](/release-notes#prepare-to-upgrade). + +
+ +4. Start Langflow: ```bash uv run langflow run ``` -4. To confirm that a local Langflow instance is running, navigate to the default Langflow URL `http://127.0.0.1:7860`. -It can take a few minutes for Langflow to start. + It can take a few minutes for Langflow to start. -After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart). +5. To confirm that a local Langflow instance is running, navigate to the default Langflow URL `http://127.0.0.1:7860`. -### Install Langflow from source +6. Create your first flow with the [Quickstart](/get-started-quickstart). -To install Langflow from source, see [Install Langflow from source](/contributing-how-to-contribute#install-langflow-from-source). +For upgrade information, see the [Release notes](/release-notes). -### Manage Langflow OSS versions - -:::important -The Langflow team recommends installing new Langflow versions in a new virtual environment before upgrading your primary installation. - -This allows you to [import flows](/concepts-flows#import-flow) from your existing installation and test them in the new version without disrupting your existing installation. -In the event of breaking changes or bugs, your existing installation is preserved in a stable state. -::: - -To manage your Langflow OSS version, use the following commands: - -* Upgrade Langflow to the latest version: `uv pip install langflow -U` -* Install a specific version of the Langflow package by adding the required version to the command, such as: `uv pip install langflow==1.3.2` -* Reinstall Langflow and all of its dependencies: `uv pip install langflow --force-reinstall` - -### Manage Langflow OSS dependencies - -Langflow OSS provides optional dependency groups and support for custom dependencies to extend Langflow functionality. -For more information, see [Install custom dependencies](/install-custom-dependencies). - -## Troubleshoot Langflow installation and startup issues - -If you encounter an issue when installing or running Langflow, see [Troubleshoot Langflow](/troubleshoot). +For information about optional dependency groups and support for custom dependencies to extend Langflow OSS functionality, see [Install custom dependencies](/install-custom-dependencies). ## Next steps -After installing Langflow, build and run a flow with the [quickstart](/get-started-quickstart). \ No newline at end of file +* [Quickstart](/get-started-quickstart): Build and run your first flow in minutes. +* [Build flows](/concepts-flows): Learn about building flows. +* [Troubleshoot Langflow](/troubleshoot): Get help with common Langflow install and startup issues. \ No newline at end of file diff --git a/docs/docs/Get-Started/get-started-quickstart.md b/docs/docs/Get-Started/get-started-quickstart.md index bcedd8785..3f3189eb4 100644 --- a/docs/docs/Get-Started/get-started-quickstart.md +++ b/docs/docs/Get-Started/get-started-quickstart.md @@ -11,22 +11,29 @@ Get started with Langflow by loading a template flow, running it, and then servi ## Prerequisites -- [A running Langflow instance](/get-started-installation) -- [An OpenAI API key](https://platform.openai.com/api-keys) -- [A Langflow API key](/configuration-api-keys) +- [Install and start Langflow](/get-started-installation) +- [Create an OpenAI API key](https://platform.openai.com/api-keys) +- [Create a Langflow API key](/configuration-api-keys) -## Create a Langflow API key +
+Create a Langflow API key -A [Langflow API key](/configuration-api-keys) is a user-specific token you can use with Langflow. +A Langflow API key is a user-specific token you can use with Langflow. To create a Langflow API key, do the following: 1. In Langflow, click your user icon, and then select **Settings**. 2. Click **Langflow API Keys**, and then click
## Run the Simple Agent template flow @@ -71,25 +74,22 @@ For this request, the agent selects the URL tool's `fetch_content` action, and t 6. When you are done testing the flow, click