Use Langflow in OpenRAG
OpenRAG includes a built-in Langflow instance for creating and managing functional application workflows called flows. In a flow, the individual workflow steps are represented by components that are connected together to form a complete process.
OpenRAG includes several built-in flows:
- The OpenRAG OpenSearch Agent flow powers the Chat feature in OpenRAG.
- The OpenSearch Ingestion and OpenSearch URL Ingestion flows process documents and web content for storage in your OpenSearch knowledge base.
- The OpenRAG OpenSearch Nudges flow provides optional contextual suggestions in the OpenRAG Chat.
You can customize these flows and create your own flows using OpenRAG's embedded Langflow visual editor.
Inspect and modify flows
All OpenRAG flows are designed to be modular, performant, and provider-agnostic.
To modify a flow in OpenRAG, click Settings. From here, you can quickly edit commonly used parameters, such as the Language model and Agent Instructions. To further explore and edit the flow, click Edit in Langflow to launch the embedded Langflow visual editor where you can fully customize the flow to suit your use case.
For example, to view and edit the built-in Chat flow (the OpenRAG OpenSearch Agent flow), do the following:
-
In OpenRAG, click Chat.
-
Click Settings, and then click Edit in Langflow to launch the Langflow visual editor in a new browser window.
If prompted to acknowledge that you are entering Langflow, click Proceed.
If Langflow requests login information, enter the
LANGFLOW_SUPERUSERandLANGFLOW_SUPERUSER_PASSWORDfrom your OpenRAG.envfile.
-
Modify the flow as desired, and then press Command+S (Ctrl+S) to save your changes.
You can close the Langflow browser window, or leave it open if you want to continue experimenting with the flow editor.
tipIf you modify the built-in Chat flow, make sure you click in the Conversations tab to start a new conversation. This ensures that the chat doesn't persist any context from the previous conversation with the original flow settings.
Revert a built-in flow to its original configuration
After you edit a built-in flow, you can click Restore flow on the Settings page to revert the flow to its original state when you first installed OpenRAG. This is a destructive action that discards all customizations to the flow.
Build custom flows and use other Langflow functionality
In addition to OpenRAG's built-in flows, all Langflow features are available through OpenRAG, including the ability to create your own flows and popular extensibility features such as the following:
- Create custom components.
- Integrate with many third-party services through bundles.
- Use MCP clients and MCP servers, and serve flows as MCP tools for your agentic flows.
Explore the Langflow documentation to learn more about the Langflow platform, features, and visual editor.
Modify a flow at runtime
You can use tweaks to modify flow settings at runtime without permanently changing the flow's configuration. Tweaks are one-time parameter modifications that are passed to specific Langflow components during flow execution. For more information on tweaks, see the Langflow documentation on Input schema (tweaks).
Set the Langflow version
By default, OpenRAG is pinned to the latest Langflow Docker image for stability.
If necessary, you can set a specific Langflow version with the LANGFLOW_VERSION environment variable. However, there are risks to changing this setting:
-
The Langflow documentation describes the functionality present in the latest release of the Langflow OSS Python package. If your
LANGFLOW_VERSIONis different, the Langflow documentation might not align with the features and default settings in your OpenRAG installation. -
Components might break, including components in OpenRAG's built-in flows.
-
Default settings and behaviors might change causing unexpected results when OpenRAG expects a newer default.