docs: user feedback items (#9122)

* db-location-and-agent-memory

* cleanup

* postgresql-for-agent-memory

* postgresql-in-message-history

* remove-mcp-tutorial-note
This commit is contained in:
Mendon Kissling 2025-07-22 12:22:30 -04:00 committed by GitHub
commit 8f84d9100d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 44 additions and 11 deletions

View file

@ -122,6 +122,25 @@ In the **Agent Instructions** (`system_prompt`) field, you can provide custom in
These instructions are applied in addition to the **Input** (`input_value`), which can be entered directly or provided through another component, such as a **Chat Input** component.
### Agent memory
Langflow Agents have built-in memory enabled by default that allows them to remember previous messages in a conversation.
This memory acts as a rolling chat history window, ensuring the Agent can reference earlier exchanges and maintain context without requiring a separate [Message History](/components-helpers#message-history) component.
The Agents internal chat history is stored in the Langflow database, just like the [Message History](/components-helpers#message-history) helper component.
The default storage option in Langflow is a [SQLite](https://www.sqlite.org/) database stored in your system's cache directory:
- **macOS Desktop**: `/Users/<username>/.langflow/data/database.db`
- **Windows Desktop**: `C:\Users\<name>\AppData\Roaming\com.Langflow\data\langflow.db`
- **OSS macOS/Windows/Linux/WSL (uv pip install)**: `<path_to_venv>/lib/python3.12/site-packages/langflow/langflow.db` (Python version may vary)
- **OSS macOS/Windows/Linux/WSL (git clone)**: `<path_to_clone>/src/backend/base/langflow/langflow.db`
If your Langflow deployment has `LANGFLOW_DATABASE_URL` set to PostgreSQL, the Agent memory will use the PostgreSQL database.
Each conversation is associated with a session ID, so messages are grouped and retrieved per session.
This means your chat history is saved and can be accessed or retrieved later, even if you refresh or revisit the flow.
The number of stored messages can be configured in the **Number of Chat History Messages** field in the Agent component.
### Tools
Agents are most useful when they have the appropriate tools available to complete requests.

View file

@ -55,7 +55,14 @@ The Current Date component returns the current date and time in a selected timez
Prior to Langflow 1.5, this component was two separate components called **Chat History** and **Message Store**.
:::
This component provides combined chat history and message store functionality. This component can use Langflow's SQLite database or external memory to store and retrieve chat messages.
This component handles chat history and message storage using Langflows SQLite database or an external memory source to save and retrieve chat messages. The default storage option is a [SQLite](https://www.sqlite.org/) database stored in your system's cache directory:
- **macOS Desktop**: `/Users/<username>/.langflow/data/database.db`
- **Windows Desktop**: `C:\Users\<name>\AppData\Roaming\com.Langflow\data\langflow.db`
- **OSS macOS/Windows/Linux/WSL (uv pip install)**: `<path_to_venv>/lib/python3.12/site-packages/langflow/langflow.db` (Python version may vary)
- **OSS macOS/Windows/Linux/WSL (git clone)**: `<path_to_clone>/src/backend/base/langflow/langflow.db`
If your Langflow deployment has `LANGFLOW_DATABASE_URL` set to PostgreSQL, the Message History component will use the PostgreSQL database.
Chat memory is distinct from vector store memory, because it is built specifically for storing and retrieving chat messages from databases.

View file

@ -83,9 +83,10 @@ From the **Projects** page, you can manage flows within each of your projects:
Flows and [flow logs](#flow-logs) are stored on local disk at the following default locations:
- **Linux and WSL**: `home/<username>/.cache/langflow/`
- **macOS**: `/Users/<username>/Library/Caches/langflow/`
- **Windows**: `%LOCALAPPDATA%\langflow\langflow\Cache`
- **macOS Desktop**: `/Users/<username>/.langflow/cache`
- **Windows Desktop**: `C:\Users\<username>\AppData\Roaming\com.Langflow\cache`
- **OSS macOS/Windows/Linux/WSL (uv pip install)**: `<path_to_venv>/lib/python3.12/site-packages/langflow/cache`
- **OSS macOS/Windows/Linux/WSL (git clone)**: `<path_to_clone>/src/backend/base/langflow/cache`
The flow storage location can be customized with the [`LANGFLOW_CONFIG_DIR`](/environment-variables#LANGFLOW_CONFIG_DIR) environment variable.

View file

@ -25,6 +25,10 @@ As an MCP server, Langflow exposes your flows as [tools](https://modelcontextpro
## Select and configure flows to expose as MCP tools {#select-flows-to-serve}
:::important MCP flow requirements
A flow must contain a [**Chat Output**](/components-io#chat-output) component to be used as a tool by MCP clients.
:::
Each [Langflow project](/concepts-flows#projects) has an MCP server that exposes the project's flows as tools that MCP clients can use to generate responses.
By default, all flows in a project are exposed as tools on the project's MCP server.

View file

@ -192,7 +192,7 @@ The following table lists the environment variables supported by Langflow.
| <Link id="LANGFLOW_BUNDLE_URLS"/><span class="env-prefix">LANGFLOW_</span>BUNDLE_URLS | List[String] | `[]` | A list of URLs from which to load component bundles and flows. Supports GitHub URLs. If <span class="env-prefix">LANGFLOW_</span>AUTO_LOGIN is enabled, flows from these bundles are loaded into the database. |
| <Link id="LANGFLOW_CACHE_TYPE"/><span class="env-prefix">LANGFLOW_</span>CACHE_TYPE | String | `async` | Set the cache type for Langflow. Possible values: `async`, `redis`, `memory`, `disk`.<br/>If you set the type to `redis`, then you must also set the following environment variables: <span class="env-prefix">LANGFLOW_REDIS_HOST</span>, <span class="env-prefix">LANGFLOW_REDIS_PORT</span>, <span class="env-prefix">LANGFLOW_REDIS_DB</span>, and <span class="env-prefix">LANGFLOW_REDIS_CACHE_EXPIRE</span>. |
| <Link id="LANGFLOW_COMPONENTS_PATH"/><span class="env-prefix">LANGFLOW_</span>COMPONENTS_PATH | String | `langflow/components` | Path to the directory containing custom components.<br/>See [`--components-path` option](./configuration-cli.mdx#run-components-path). |
| <Link id="LANGFLOW_CONFIG_DIR"/><span class="env-prefix">LANGFLOW_</span>CONFIG_DIR | String | See description | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. Defaults: **Linux/WSL**: `~/.cache/langflow/`<br/>**macOS**: `/Users/<username>/Library/Caches/langflow/`<br/>**Windows**: `%LOCALAPPDATA%\langflow\langflow\Cache`|
| <Link id="LANGFLOW_CONFIG_DIR"/><span class="env-prefix">LANGFLOW_</span>CONFIG_DIR | String | See description | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. Defaults:<br/>**macOS Desktop cache**: `/Users/<username>/.langflow/cache`<br/>**Windows Desktop cache**: `C:\Users\<username>\AppData\Roaming\com.Langflow\cache`<br/>**OSS macOS/Windows/Linux/WSL (uv pip install) cache**: `<path_to_venv>/lib/python3.12/site-packages/langflow/cache`<br/>**OSS macOS/Windows/Linux/WSL (git clone) cache**: `<path_to_clone>/src/backend/base/langflow/cache` |
| <Link id="LANGFLOW_DATABASE_URL"/><span class="env-prefix">LANGFLOW_</span>DATABASE_URL | String | Not set | Set the database URL for Langflow. If not provided, Langflow uses a SQLite database. |
| <Link id="LANGFLOW_USE_NOOP_DATABASE"/><span class="env-prefix">LANGFLOW_</span>USE_NOOP_DATABASE | Boolean | `false` | Use a no-op database, which avoids database connections and operations. Useful for running flows without a database. |
| <Link id="LANGFLOW_DATABASE_CONNECTION_RETRY"/><span class="env-prefix">LANGFLOW_</span>DATABASE_CONNECTION_RETRY | Boolean | `false` | If True, Langflow tries to connect to the database again if it fails. |

View file

@ -15,9 +15,10 @@ The default `log_level` is `ERROR`. Other options are `DEBUG`, `INFO`, `WARNING`
The default logfile is called `langflow.log`, and its location depends on your operating system.
* Linux/WSL: `\~/.cache/langflow/`
* macOS: `/Users/\<username\>/Library/Caches/langflow/`
* Windows: `%LOCALAPPDATA%\langflow\langflow\Cache`
- **macOS Desktop**:`/Users/<username>/.langflow/cache`
- **Windows Desktop**:`C:\Users\<username>\AppData\Roaming\com.Langflow\cache`
- **OSS macOS/Windows/Linux/WSL (uv pip install)**: `<path_to_venv>/lib/python3.12/site-packages/langflow/cache`
- **OSS macOS/Windows/Linux/WSL (git clone)**: `<path_to_clone>/src/backend/base/langflow/cache`
The `LANGFLOW_LOG_ENV` controls log output and formatting. The `container` option outputs serialized JSON to stdout. The `container_csv` option outputs CSV-formatted plain text to stdout. The `default` (or not set) logging option outputs prettified output with [RichHandler](https://rich.readthedocs.io/en/stable/reference/logging.html).

View file

@ -12,9 +12,10 @@ Langflow supports both local memory and external memory options.
The default storage option in Langflow is a [SQLite](https://www.sqlite.org/) database stored in your system's cache directory:
- Linux/WSL: `~/.cache/langflow/langflow.db`
- macOS: `/Users/<username>/Library/Caches/langflow/langflow.db`
- Windows: `%LOCALAPPDATA%\langflow\langflow\Cache\langflow.db`
- **macOS Desktop**: `/Users/<username>/.langflow/data/database.db`
- **Windows Desktop**: `C:\Users\<name>\AppData\Roaming\com.Langflow\data\langflow.db`
- **OSS macOS/Windows/Linux/WSL (uv pip install)**: `<path_to_venv>/lib/python3.12/site-packages/langflow/langflow.db` (Python version may vary)
- **OSS macOS/Windows/Linux/WSL (git clone)**: `<path_to_clone>/src/backend/base/langflow/langflow.db`
The following tables are stored in `langflow.db`: