Skip to content

⚡️ Speed up function set_multiple_field_display by 42% in PR #7741 (mcp-server-backend) #7784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 126 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
d1bf746
Add tools input to the backend
lucaseduoli Apr 15, 2025
6dc054d
Add tools type
lucaseduoli Apr 15, 2025
adf3639
Add tools component to parameter render
lucaseduoli Apr 15, 2025
fb01f98
Added tools to langflow supported types
lucaseduoli Apr 15, 2025
997a9b3
Add tools modal
lucaseduoli Apr 15, 2025
b609b81
Instantiate tools component in parameter render
lucaseduoli Apr 15, 2025
1d45ffd
Merge branch 'main' of https://github.com/langflow-ai/langflow into f…
deon-sanchez Apr 15, 2025
ce7cbd5
Removed div when there is not any visible actions
lucaseduoli Apr 15, 2025
cb8ec65
Added margin
lucaseduoli Apr 15, 2025
cf88a50
Add ComboBoxItem and ListItem components for enhanced selection UI
deon-sanchez Apr 15, 2025
443afa3
Merge branch 'feat/tool_mode_ui' of https://github.com/langflow-ai/la…
deon-sanchez Apr 15, 2025
782d215
Update ComboBoxItem to display item description and enhance ToolsModa…
deon-sanchez Apr 15, 2025
7bc9913
Refactor ToolsModal header styling for improved layout and icon padding
deon-sanchez Apr 15, 2025
8f67033
Enhance ComboBoxItem layout and styling; update ToolsModal size and c…
deon-sanchez Apr 15, 2025
e6eb626
Merge branch 'main' of https://github.com/langflow-ai/langflow into f…
deon-sanchez Apr 15, 2025
a8116ab
Changed display name
lucaseduoli Apr 15, 2025
ee16b0d
Adds truncate for badges
lucaseduoli Apr 15, 2025
9924793
Adds custom styling for table used for Tools modal
lucaseduoli Apr 15, 2025
cf1d734
Added Tools modal with AgGrid
lucaseduoli Apr 15, 2025
bce1899
Changed button
lucaseduoli Apr 15, 2025
47da023
feat: add MCP Server tab to HomePage and update flow type handling
deon-sanchez Apr 15, 2025
a83be15
feat: enhance MCP Server tab with mode selection and example display
deon-sanchez Apr 15, 2025
08a6c83
feat: import React and enhance MCP Server tab with whitespace preserv…
deon-sanchez Apr 15, 2025
ee2e288
feat: add react-syntax-highlighter for improved code display in MCP S…
deon-sanchez Apr 16, 2025
187f05b
feat: add Claude and Cursor icons, enable MCP feature flag, and enhan…
deon-sanchez Apr 16, 2025
8f2f4c5
feat: add MCP Server dropdown item and icon, update McpServerTab layout
deon-sanchez Apr 16, 2025
0c624d2
Merge branch 'main' of https://github.com/langflow-ai/langflow into l…
deon-sanchez Apr 16, 2025
fa90a31
feat: add navigation to MCP page and update deploy dropdown functiona…
deon-sanchez Apr 16, 2025
dee917f
feat: enhance McpServerTab layout and styling for Cursor mode
deon-sanchez Apr 16, 2025
685e0ad
Merge remote-tracking branch 'origin/main' into feat/tool_mode_ui
lucaseduoli Apr 16, 2025
4af849a
made name and description editable
lucaseduoli Apr 16, 2025
b569bb5
Parse values for saving
lucaseduoli Apr 16, 2025
b078f27
Add focused row without triggering checkbox click
lucaseduoli Apr 16, 2025
85fe28d
[autofix.ci] apply automated fixes
autofix-ci[bot] Apr 16, 2025
88413c0
Merge branch 'main' into feat/tool_mode_ui
lucaseduoli Apr 16, 2025
97ac2a0
Merge branch 'main' of https://github.com/langflow-ai/langflow into l…
deon-sanchez Apr 17, 2025
35225c1
feat: Enhance MCP Server Tab with dark mode support for syntax highli…
deon-sanchez Apr 17, 2025
8f7fac4
Added types for tools modal
lucaseduoli Apr 16, 2025
3534a2e
added toolsTable with sidebar on toolsModal
lucaseduoli Apr 17, 2025
509688a
Merge remote-tracking branch 'origin/feat/tool_mode_ui' into lfoss-949
lucaseduoli Apr 17, 2025
5eb119b
Added changes to work with MCP
lucaseduoli Apr 17, 2025
9d87f10
Merge remote-tracking branch 'origin/feat/tool_mode_ui' into lfoss-949
lucaseduoli Apr 17, 2025
ea0f586
Changed MCP Server Tab to work with new Actions component
lucaseduoli Apr 17, 2025
4eff214
Removed navigate that broke mcp in other folders
lucaseduoli Apr 17, 2025
96e1e64
Updated mcp server tab location
lucaseduoli Apr 17, 2025
67cad70
Merge branch 'main' of https://github.com/langflow-ai/langflow into l…
deon-sanchez Apr 18, 2025
1c2a48e
chore: update version to 1.3.4 and adjust positioning in McpServerTab…
deon-sanchez Apr 21, 2025
8d1f863
feat: add copy to clipboard functionality in McpServerTab component
deon-sanchez Apr 21, 2025
bf3f974
Add raw action names as metadata
erichare Apr 21, 2025
3e65d39
Merge branch 'main' into feat/tool_mode_ui
edwinjosechittilappilly Apr 21, 2025
7e9d7b3
update component.py to add display name and display description in to…
edwinjosechittilappilly Apr 21, 2025
671eb4d
Merge branch 'feat/tool_mode_ui' of https://github.com/langflow-ai/la…
edwinjosechittilappilly Apr 21, 2025
4384d23
refactor: Update API endpoints to use PROJECTS instead of FOLDERS
ogabrielluiz Mar 11, 2025
a2951b2
refactor: Update folder references to project in API endpoints
ogabrielluiz Mar 11, 2025
97bcefe
add projects api endpoint and redirect folders to projects endpoints
edwinjosechittilappilly Apr 22, 2025
1f2ca99
Update use-get-folder.ts
edwinjosechittilappilly Apr 22, 2025
160cd29
add details to flow table also create migration script
edwinjosechittilappilly Apr 22, 2025
06a09fe
updated the models and api endpoints to support mcp for projects
edwinjosechittilappilly Apr 22, 2025
3c4491e
removed editing directly
lucaseduoli Apr 22, 2025
c12ae43
individual mcp per proejcts
edwinjosechittilappilly Apr 22, 2025
7d27082
[autofix.ci] apply automated fixes
autofix-ci[bot] Apr 22, 2025
52c37e6
update constants to add PROJECTS variables
edwinjosechittilappilly Apr 22, 2025
16c00e3
Merge branch 'mcp-server-backend' of https://github.com/langflow-ai/l…
edwinjosechittilappilly Apr 22, 2025
6103fc2
Fixed editing
lucaseduoli Apr 22, 2025
3ffae73
removed to upper case
lucaseduoli Apr 22, 2025
0bd70dd
Make editing apply filters
lucaseduoli Apr 22, 2025
d1b3260
fixed migration file
lucaseduoli Apr 22, 2025
52c92ee
Changed folder to project on backend
lucaseduoli Apr 22, 2025
25cb4b9
Changed folder to project on frontend
lucaseduoli Apr 22, 2025
ae2f248
Changed folder to project on tests
lucaseduoli Apr 22, 2025
95eaa94
Changed folder to project on docs
lucaseduoli Apr 22, 2025
2c71383
changed data-testid of input edit folder name
lucaseduoli Apr 22, 2025
0d75539
Fixed formatting of docs
lucaseduoli Apr 23, 2025
b1f8d5d
fixed deploy dropdown button having same id
lucaseduoli Apr 23, 2025
2f15efd
fix import
lucaseduoli Apr 23, 2025
bade3b5
Fixed backend lint errors
lucaseduoli Apr 23, 2025
35a5300
Merge remote-tracking branch 'origin/feat/tool_mode_ui' into lfoss-949
lucaseduoli Apr 23, 2025
be3a532
Merge branch 'lfoss-949' into mcp-server-backend
lucaseduoli Apr 23, 2025
6f32315
Adds design changes for MCP
lucaseduoli Apr 23, 2025
ba82e8d
Merge branch 'feat/tool_mode_ui' into lfoss-949
lucaseduoli Apr 23, 2025
dd7ec4a
Merge branch 'lfoss-949' into mcp-server-backend
lucaseduoli Apr 23, 2025
a137254
Fixed MCPSettings model and removed ProjectMCPSettingsUpdate
lucaseduoli Apr 23, 2025
b29c10d
Fixed mcp_projects to include batch update of flows
lucaseduoli Apr 23, 2025
d0e3f69
Removed unused mcp API from flows
lucaseduoli Apr 23, 2025
28b4325
Adds new design and null check
lucaseduoli Apr 23, 2025
f008922
Merge remote-tracking branch 'origin/feat/tool_mode_ui' into lfoss-949
lucaseduoli Apr 23, 2025
33e575f
Merge branch 'lfoss-949' into mcp-server-backend
lucaseduoli Apr 23, 2025
aed66f4
Adds routing for mcp folders
lucaseduoli Apr 23, 2025
2b3f9bd
Adds correct link for mcp server on publish
lucaseduoli Apr 23, 2025
e3e2977
Adds mcp api url
lucaseduoli Apr 23, 2025
708afd7
Adds MCP get flows and patch flows
lucaseduoli Apr 23, 2025
291b493
Adds MCP types
lucaseduoli Apr 23, 2025
b420037
removed unused navigate
lucaseduoli Apr 23, 2025
8ef7bb9
Implemented correct value query and mutation for MCP actions
lucaseduoli Apr 23, 2025
b66d014
Merge remote-tracking branch 'origin/lfoss-949' into mcp-server-backend
lucaseduoli Apr 23, 2025
c63455b
Changed McpServerTab to have right content on each tab
lucaseduoli Apr 23, 2025
cb02386
Passed folder name to mcp server tab
lucaseduoli Apr 23, 2025
6de952b
Merge branch 'lfoss-949' into mcp-server-backend
lucaseduoli Apr 23, 2025
8f89850
changed mcp settings from models to schemas
lucaseduoli Apr 23, 2025
86a90a5
moved MCPSettings import to the correct location in mcp_projects.py
ogabrielluiz Apr 23, 2025
f5b2a0b
Changed mcp url
lucaseduoli Apr 23, 2025
190bba5
back to old url
lucaseduoli Apr 23, 2025
d5b56dd
Added new modal size
lucaseduoli Apr 23, 2025
fb8a62f
Added new base modal size
lucaseduoli Apr 23, 2025
58b0ef0
Added mcp notice modal
lucaseduoli Apr 23, 2025
93cd112
Show modal when entering for the first time
lucaseduoli Apr 23, 2025
a1a6a7e
added hasSeenMcpModal setting when no flows are available
lucaseduoli Apr 23, 2025
683cd00
update to not show dialog
lucaseduoli Apr 23, 2025
20ed0da
test
edwinjosechittilappilly Apr 23, 2025
cb8cab4
[autofix.ci] apply automated fixes
autofix-ci[bot] Apr 23, 2025
9450611
Update mcp_projects.py
edwinjosechittilappilly Apr 23, 2025
5cc8cee
Merge branch 'mcp-server-backend' of https://github.com/langflow-ai/l…
edwinjosechittilappilly Apr 23, 2025
9c307dc
Update mcp_projects.py
edwinjosechittilappilly Apr 24, 2025
c76603f
added security and error handling to MCP Projects
edwinjosechittilappilly Apr 24, 2025
7e4ed12
[autofix.ci] apply automated fixes
autofix-ci[bot] Apr 24, 2025
8ad253c
fix lint and ruff errors
edwinjosechittilappilly Apr 24, 2025
89d8237
frontend fix main
edwinjosechittilappilly Apr 24, 2025
4cdb1e1
Merge branch 'main' into mcp-server-backend
edwinjosechittilappilly Apr 24, 2025
b36d39d
fix alembic
edwinjosechittilappilly Apr 24, 2025
cb1aa3b
[autofix.ci] apply automated fixes
autofix-ci[bot] Apr 24, 2025
631f5cd
Merge branch 'main' into mcp-server-backend
edwinjosechittilappilly Apr 24, 2025
33dda50
Merge branch 'mcp-server-backend' of https://github.com/langflow-ai/l…
edwinjosechittilappilly Apr 24, 2025
7cf3ffa
changed flow snake case to get the action name
lucaseduoli Apr 24, 2025
5d4becc
enable is_action on mcp_projects getting flow id
lucaseduoli Apr 24, 2025
5846567
put lowercase transformer on flow name
lucaseduoli Apr 24, 2025
d27dbb5
⚡️ Speed up function `set_multiple_field_display` by 42% in PR #7741 …
codeflash-ai[bot] Apr 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
659 changes: 535 additions & 124 deletions docs/docs/API-Reference/api-reference-api-examples.md

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions docs/docs/Concepts/concepts-file-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ To upload a file from your local machine:

1. From the **My Files** window at `http://127.0.0.1:7860/files`, click **Upload**.
2. Select the file to upload.
The file is uploaded to Langflow.
The file is uploaded to Langflow.

Files stored in **My Files** can be renamed, downloaded, duplicated, or deleted.

Files are available to flows stored in different folders.
Files are available to flows stored in different projects.

## Use uploaded files in a flow

Expand All @@ -40,6 +40,7 @@ If you prefer a one-time upload, the [File](/components-data#file) component sti
The maximum supported file size is 100 MB.

Text files:

- `.txt` - Text files
- `.md`, `.mdx` - Markdown files
- `.csv` - CSV files
Expand All @@ -56,12 +57,9 @@ Text files:
- `.ts`, `.tsx` - TypeScript files

Archive formats (for bundling multiple files):

- `.zip` - ZIP archives
- `.tar` - TAR archives
- `.tgz` - Gzipped TAR archives
- `.bz2` - Bzip2 compressed files
- `.gz` - Gzip compressed files




55 changes: 26 additions & 29 deletions docs/docs/Concepts/concepts-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ Flows are created in the **workspace** with components dragged from the componen

A flow can be as simple as the [basic prompting flow](/get-started-quickstart), which creates an OpenAI chatbot with four components.

* Each component in a flow is a **node** that performs a specific task, like an AI model or a data source.
* Each component has a **Configuration** menu. Click the **Code** pane to see a component's underlying Python code.
* Components are connected with **edges** to form flows.
- Each component in a flow is a **node** that performs a specific task, like an AI model or a data source.
- Each component has a **Configuration** menu. Click the **Code** pane to see a component's underlying Python code.
- Components are connected with **edges** to form flows.

If you're familiar with [React Flow](https://reactflow.dev/learn), a **flow** is a node-based application, a **component** is a node, and the connections between components are **edges**.

When a flow is run, Langflow builds a Directed Acyclic Graph (DAG) graph object from the nodes (components) and edges (connections between components), with the nodes sorted to determine the order of execution. The graph build calls the individual components' `def_build` functions to validate and prepare the nodes. This graph is then processed in dependency order. Each node is built and executed sequentially, with results from each built node being passed to nodes that are dependent on the previous node's results.

Flows are stored on local disk at these default locations:

* **Linux or WSL on Windows**: `home/<username>/.cache/langflow/`
* **MacOS**: `/Users/<username>/Library/Caches/langflow/`
- **Linux or WSL on Windows**: `home/<username>/.cache/langflow/`
- **MacOS**: `/Users/<username>/Library/Caches/langflow/`

The flow storage location can be customized with the [LANGFLOW_CONFIG_DIR](/environment-variables#LANGFLOW_CONFIG_DIR) environment variable.

Expand All @@ -46,8 +46,8 @@ The **workspace** is where you create AI applications by connecting and running

The workspace controls allow you to adjust your view and lock your flows in place.

* Add **Notes** to flows with the **Add Note** button, similar to commenting in code.
* To access the [Settings](#settings) menu, click <Icon name="Settings" aria-label="Gear icon" /> **Settings**.
- Add **Notes** to flows with the **Add Note** button, similar to commenting in code.
- To access the [Settings](#settings) menu, click <Icon name="Settings" aria-label="Gear icon" /> **Settings**.

This menu contains configuration for **Global Variables**, **Langflow API**, **Shortcuts**, and **Messages**.

Expand Down Expand Up @@ -95,9 +95,9 @@ Langflow stores logs at the location specified in the `LANGFLOW_CONFIG_DIR` envi

This directory's default location depends on your operating system.

* **Linux/WSL**: `~/.cache/langflow/`
* **macOS**: `/Users/<username>/Library/Caches/langflow/`
* **Windows**: `%LOCALAPPDATA%\langflow\langflow\Cache`
- **Linux/WSL**: `~/.cache/langflow/`
- **macOS**: `/Users/<username>/Library/Caches/langflow/`
- **Windows**: `%LOCALAPPDATA%\langflow\langflow\Cache`

To modify the location of your log file:

Expand All @@ -106,25 +106,25 @@ To modify the location of your log file:

An example `.env` file is available in the [project repository](https://github.com/langflow-ai/langflow/blob/main/.env.example).

## Projects and folders
## Projects

The **My Projects** page displays all the flows and components you've created in the Langflow workspace.

![](/img/my-projects.png)

**My Projects** is the default folder where all new projects and components are initially stored.
**My Projects** is the default project where all new projects and components are initially stored.

Projects, folders, and flows are exchanged as JSON objects.
Projects and flows are exchanged as JSON objects.

* To create a new folder, click 📁 **New Folder**.
- To create a new project, click 📁 **New Project**.

* To rename a folder, double-click the folder name.
- To rename a project, double-click the project name.

* To download a folder, click 📥 **Download**.
- To download a project, click 📥 **Download**.

* To upload a folder, click 📤 **Upload**. The default maximum file upload size is 100 MB.
- To upload a project, click 📤 **Upload**. The default maximum file upload size is 100 MB.

* To move a flow or component, drag and drop it into the desired folder.
- To move a flow or component, drag and drop it into the desired project.

## File management

Expand All @@ -136,18 +136,15 @@ For more on managing your files, see [Manage files](/concepts-file-management).

The dropdown menu labeled with the project name offers several management and customization options for the current flow in the Langflow workspace.

* **New**: Create a new flow from scratch.
* **Settings**: Adjust settings specific to the current flow, such as its name, description, and endpoint name.
* **Logs**: View logs for the current project, including execution history, errors, and other runtime events.
* **Import**: Import a flow or component from a JSON file into the workspace.
* **Export**: Export the current flow as a JSON file.
* **Undo (⌘Z)**: Revert the last action taken in the project.
* **Redo (⌘Y)**: Reapply a previously undone action.
* **Refresh All**: Refresh all components and delete cache.
- **New**: Create a new flow from scratch.
- **Settings**: Adjust settings specific to the current flow, such as its name, description, and endpoint name.
- **Logs**: View logs for the current project, including execution history, errors, and other runtime events.
- **Import**: Import a flow or component from a JSON file into the workspace.
- **Export**: Export the current flow as a JSON file.
- **Undo (⌘Z)**: Revert the last action taken in the project.
- **Redo (⌘Y)**: Reapply a previously undone action.
- **Refresh All**: Refresh all components and delete cache.

## Settings

Click <Icon name="Settings" aria-label="Gear icon" /> **Settings** to access **Global variables**, **Langflow API**, **Shortcuts**, and **Messages**.



19 changes: 10 additions & 9 deletions docs/docs/Develop/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following tables are stored in `langflow.db`:

**ApiKey** - Manages API authentication keys for users. For more information, see [API keys](/configuration-api-keys).

**Folder** - Provides a structure for flow storage. For more information, see [Projects and folders](/concepts-overview#projects-and-folders).
**Project** - Provides a structure for flow storage. For more information, see [Projects](/concepts-overview#projects).

**Variables** - Stores global encrypted values and credentials. For more information, see [Global variables](/configuration-global-variables).

Expand Down Expand Up @@ -86,14 +86,15 @@ LANGFLOW_DB_CONNECT_TIMEOUT=20

Langflow provides multiple caching options that can be configured using the `LANGFLOW_CACHE_TYPE` environment variable.

| Type | Description | Storage Location | Persistence |
|------|-------------|------------------|-------------|
| `async` (default) | Asynchronous in-memory cache | Application memory | Cleared on restart |
| `memory` | Thread-safe in-memory cache | Application memory | Cleared on restart |
| `disk` | File system-based cache | System cache directory* | Persists after restart |
| `redis` | Distributed cache | Redis server | Persists in Redis |
| Type | Description | Storage Location | Persistence |
| ----------------- | ---------------------------- | ------------------------ | ---------------------- |
| `async` (default) | Asynchronous in-memory cache | Application memory | Cleared on restart |
| `memory` | Thread-safe in-memory cache | Application memory | Cleared on restart |
| `disk` | File system-based cache | System cache directory\* | Persists after restart |
| `redis` | Distributed cache | Redis server | Persists in Redis |

\*System cache directory locations:

*System cache directory locations:
- Linux/WSL: `~/.cache/langflow/`
- macOS: `/Users/<username>/Library/Caches/langflow/`
- Windows: `%LOCALAPPDATA%\langflow\langflow\Cache`
- Windows: `%LOCALAPPDATA%\langflow\langflow\Cache`
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""add_optins_column_to_user
"""mcp fix and adding user option

Revision ID: e56d87f8994a
Revision ID: d70856c644fb
Revises: 1b8b740a6fa3
Create Date: 2025-04-09 15:57:46.904977
Create Date: 2025-04-24 01:49:08.468077

"""
from typing import Sequence, Union
Expand All @@ -15,7 +15,7 @@


# revision identifiers, used by Alembic.
revision: str = 'e56d87f8994a'
revision: str = 'd70856c644fb'
down_revision: Union[str, None] = '1b8b740a6fa3'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
Expand All @@ -24,15 +24,12 @@
def upgrade() -> None:
conn = op.get_bind()
# ### commands auto generated by Alembic - please adjust! ###
if not migration.column_exists(table_name='user', column_name='optins', conn=conn):
with op.batch_alter_table('user', schema=None) as batch_op:
batch_op.add_column(sa.Column('optins', sa.JSON(), nullable=True))
pass
# ### end Alembic commands ###


def downgrade() -> None:
conn = op.get_bind()
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('user', schema=None) as batch_op:
batch_op.drop_column('optins')
pass
# ### end Alembic commands ###
4 changes: 4 additions & 0 deletions src/backend/base/langflow/api/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
flows_router,
folders_router,
login_router,
mcp_projects_router,
mcp_router,
monitor_router,
projects_router,
starter_projects_router,
store_router,
users_router,
Expand Down Expand Up @@ -44,9 +46,11 @@
router_v1.include_router(files_router)
router_v1.include_router(monitor_router)
router_v1.include_router(folders_router)
router_v1.include_router(projects_router)
router_v1.include_router(starter_projects_router)
router_v1.include_router(voice_mode_router)
router_v1.include_router(mcp_router)
router_v1.include_router(mcp_projects_router)

router_v2.include_router(files_router_v2)

Expand Down
4 changes: 4 additions & 0 deletions src/backend/base/langflow/api/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
from langflow.api.v1.folders import router as folders_router
from langflow.api.v1.login import router as login_router
from langflow.api.v1.mcp import router as mcp_router
from langflow.api.v1.mcp_projects import router as mcp_projects_router
from langflow.api.v1.monitor import router as monitor_router
from langflow.api.v1.projects import router as projects_router
from langflow.api.v1.starter_projects import router as starter_projects_router
from langflow.api.v1.store import router as store_router
from langflow.api.v1.users import router as users_router
Expand All @@ -22,8 +24,10 @@
"flows_router",
"folders_router",
"login_router",
"mcp_projects_router",
"mcp_router",
"monitor_router",
"projects_router",
"starter_projects_router",
"store_router",
"users_router",
Expand Down
8 changes: 4 additions & 4 deletions src/backend/base/langflow/api/v1/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async def read_flows(
get_all (bool, optional): Whether to return all flows without pagination. Defaults to True.
**This field must be True because of backward compatibility with the frontend - Release: 1.0.20**
folder_id (UUID, optional): The folder ID. Defaults to None.
folder_id (UUID, optional): The project ID. Defaults to None.
params (Params): Pagination parameters.
remove_example_flows (bool, optional): Whether to remove example flows. Defaults to False.
header_flows (bool, optional): Whether to return only specific headers of the flows. Defaults to False.
Expand All @@ -212,7 +212,7 @@ async def read_flows(
if not starter_folder and not default_folder:
raise HTTPException(
status_code=404,
detail="Starter folder and default folder not found. Please create a folder and add flows to it.",
detail="Starter project and default project not found. Please create a project and add flows to it.",
)

if not folder_id:
Expand Down Expand Up @@ -536,13 +536,13 @@ async def read_basic_examples(
list[FlowRead]: A list of basic example flows.
"""
try:
# Get the starter folder
# Get the starter project
starter_folder = (await session.exec(select(Folder).where(Folder.name == STARTER_FOLDER_NAME))).first()

if not starter_folder:
return []

# Get all flows in the starter folder
# Get all flows in the starter project
flows = (await session.exec(select(Flow).where(Flow.folder_id == starter_folder.id))).all()

# Return compressed response using our utility function
Expand Down
Loading
Loading