diff --git a/docs/docs/API-Reference/api-build.mdx b/docs/docs/API-Reference/api-build.mdx index fe4d51262..5f445e70e 100644 --- a/docs/docs/API-Reference/api-build.mdx +++ b/docs/docs/API-Reference/api-build.mdx @@ -7,14 +7,14 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::important -The `/build` endpoints are used by Langflow's frontend **Workspace** and **Playground** code. +The `/build` endpoints are used by Langflow's frontend visual editor code. These endpoints are part of the internal Langflow codebase. Don't use these endpoints to run flows in applications that use your Langflow flows. 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. +The `/build` endpoints support Langflow's frontend code for building flows in the Langflow visual editor. 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 codebase. @@ -105,7 +105,8 @@ curl -X GET \ The `/build` endpoint accepts optional values for `start_component_id` and `stop_component_id` to control where the flow run starts and stops. Setting `stop_component_id` for a component triggers the same behavior as clicking the **Play** button on that component, where all dependent components leading up to that component are also run. -For example, to stop flow execution at the OpenAI model component, run the following command: + +The following example stops flow execution at an **OpenAI** component: ```shell curl -X POST \ @@ -119,7 +120,7 @@ curl -X POST \ ### Override flow parameters The `/build` endpoint also accepts inputs for `data` directly, instead of using the values stored in the Langflow database. -This is useful for running flows without having to pass custom values through the UI. +This is useful for running flows without having to pass custom values through the visual editor. ```shell curl -X POST \ diff --git a/docs/docs/API-Reference/api-files.mdx b/docs/docs/API-Reference/api-files.mdx index c0d4aaf28..05e01f5e9 100644 --- a/docs/docs/API-Reference/api-files.mdx +++ b/docs/docs/API-Reference/api-files.mdx @@ -237,11 +237,10 @@ The `/v2/files` endpoint can't send image files to flows. To send image files to your flows through the API, see [Upload image files (v1)](#upload-image-files-v1). ::: -Send a file to your flow for analysis using the [File](/components-data#file) component and the API. -Your flow must contain a [File](/components-data#file) component to receive the file. +This endpoint uploads files to your Langflow server's file management system. +To use an uploaded file in a flow, send the file path to a flow with a [**File** component](/components-data#file). -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 configure this value, change the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment variable](/environment-variables). 1. To send a file to your flow with the API, POST the file to the `/api/v2/files` endpoint. @@ -269,11 +268,10 @@ For more information, see [Supported environment variables](/environment-variabl } ``` -2. To use this file in your flow, add a [File](/components-data#file) component to load a file into the flow. -3. To load the file into your flow, send it to the **File** component. +2. To use this file in your flow, add a **File** component to your flow. +This component loads files into flows from your local machine or Langflow file management. - To retrieve the **File** component's full name with the UUID attached, call the [Read flow](/api-flows#read-flow) endpoint, and then include your **File** component and the file path as a tweak with the `/v1/run` POST request. - In this example, the file uploaded to `/v2/files` is included with the `/v1/run` POST request. +3. Run the flow, passing the `path` to the `File` component in the `tweaks` object: ```text curl --request POST \ @@ -294,13 +292,9 @@ For more information, see [Supported environment variables](/environment-variabl }' ``` -
- Result + To get the `File` component's ID, call the [Read flow](/api-flows#read-flow) endpoint or inspect the component in the visual editor. - ```text - "text":"This document provides important safety information and instructions for selecting, installing, and operating Briggs & Stratton engines. It includes warnings and guidelines to prevent injury, fire, or damage, such as choosing the correct engine model, proper installation procedures, safe fuel handling, and correct engine operation. The document emphasizes following all safety precautions and using authorized parts to ensure safe and effective engine use." - ``` -
+ If the file path is valid, the flow runs successfully. ### List files (v2) diff --git a/docs/docs/API-Reference/api-flows-run.mdx b/docs/docs/API-Reference/api-flows-run.mdx index b768210d8..7043b2834 100644 --- a/docs/docs/API-Reference/api-flows-run.mdx +++ b/docs/docs/API-Reference/api-flows-run.mdx @@ -178,7 +178,7 @@ curl -X POST \ Use the `/webhook` endpoint to start a flow by sending an HTTP `POST` request. :::tip -After you add a [**Webhook** component](/components-data#webhook) to a flow, open the [**API access** pane](/concepts-publish), and then click the **Webhook cURL** tab to get an automatically generated `POST /webhook` request for your flow. +After you add a [**Webhook** component](/components-data#webhook) to a flow, open the [**API access** pane](/concepts-publish), and then click the **Webhook curl** tab to get an automatically generated `POST /webhook` request for your flow. For more information, see [Trigger flows with webhooks](/webhook). ::: diff --git a/docs/docs/API-Reference/api-projects.mdx b/docs/docs/API-Reference/api-projects.mdx index 3b762d20d..a231cde4d 100644 --- a/docs/docs/API-Reference/api-projects.mdx +++ b/docs/docs/API-Reference/api-projects.mdx @@ -8,8 +8,6 @@ import TabItem from '@theme/TabItem'; Use the `/projects` endpoint to create, read, update, and delete [Langflow projects](/concepts-flows#projects). -Projects store your flows and components. - ## Read projects Get a list of Langflow projects, including project IDs, names, and descriptions. @@ -70,7 +68,7 @@ curl -X POST \ To add flows and components at project creation, retrieve the `components_list` and `flows_list` values from the [`/all`](/api-reference-api-examples#get-all-components) and [/flows/read](/api-flows#read-flows) endpoints and add them to the request body. -Adding a flow to a project moves the flow from its previous location. The flow is not copied. +Adding a flow to a project moves the flow from its previous location. The flow isn't copied. ```bash curl -X POST \ diff --git a/docs/docs/API-Reference/api-reference-api-examples.mdx b/docs/docs/API-Reference/api-reference-api-examples.mdx index 0f64dfa83..f9c7aeaae 100644 --- a/docs/docs/API-Reference/api-reference-api-examples.mdx +++ b/docs/docs/API-Reference/api-reference-api-examples.mdx @@ -11,8 +11,8 @@ You can use the Langflow API for programmatic interactions with Langflow, such a * Create and edit flows, including file management for flows. * Develop applications that use your flows. * Develop custom components. -* Build Langflow as a dependency of a larger project. -* Contribute to the overall Langflow project. +* Build Langflow as a dependency of a larger application, codebase, or service. +* Contribute to the overall Langflow codebase. To view and test all available endpoints, you can access the Langflow API's OpenAPI specification at your Langflow deployment's `/docs` endpoint, such as `http://localhost:7860/docs`. @@ -26,7 +26,7 @@ The quickstart demonstrates how to get automatically generated code snippets for While individual options vary by endpoint, all Langflow API requests share some commonalities, like a URL, method, parameters, and authentication. -As an example of a Langflow API request, the following curl command calls the `/v1/run` endpoint, and it passes a runtime override (`tweaks`) to the flow's Chat Output component: +As an example of a Langflow API request, the following curl command calls the `/v1/run` endpoint, and it passes a runtime override (`tweaks`) to the flow's **Chat Output** component: ```bash curl --request POST \ diff --git a/docs/docs/Agents/agents-tools.mdx b/docs/docs/Agents/agents-tools.mdx index 85b755255..c5a1a2ea9 100644 --- a/docs/docs/Agents/agents-tools.mdx +++ b/docs/docs/Agents/agents-tools.mdx @@ -7,21 +7,44 @@ import Icon from "@site/src/components/icon"; Configure tools connected to agents to extend their capabilities. -## Edit a tool component's actions +## Edit a tool's actions {#edit-a-tools-actions} -To edit a tool's actions, in the tool component, click