openrag/assets/js/33362219.89557efb.js
2025-12-16 14:05:59 +00:00

1 line
No EOL
9.8 KiB
JavaScript

"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[9532],{3982:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/opensearch-agent-flow-f3b279e02425cd043002eb7749067108.png"},8748:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>g,frontMatter:()=>r,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"core-components/agents","title":"Use Langflow in OpenRAG","description":"OpenRAG includes a built-in Langflow instance for creating and managing functional application workflows called flows.","source":"@site/docs/core-components/agents.mdx","sourceDirName":"core-components","slug":"/agents","permalink":"/agents","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/agents.mdx","tags":[],"version":"current","frontMatter":{"title":"Use Langflow in OpenRAG","slug":"/agents"},"sidebar":"tutorialSidebar","previous":{"title":"Manage services","permalink":"/manage-services"},"next":{"title":"Configure knowledge","permalink":"/knowledge"}}');var o=s(4848),i=s(8453),l=s(9179);const r={title:"Use Langflow in OpenRAG",slug:"/agents"},a=void 0,c={},d=[{value:"Inspect and modify flows",id:"inspect-and-modify-flows",level:2},{value:"Revert a built-in flow to its original configuration",id:"revert-a-built-in-flow-to-its-original-configuration",level:3},{value:"Build custom flows and use other Langflow functionality",id:"build-custom-flows-and-use-other-langflow-functionality",level:2},{value:"Set the Langflow version",id:"set-the-langflow-version",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["OpenRAG includes a built-in ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/",children:"Langflow"})," instance for creating and managing functional application workflows called ",(0,o.jsx)(n.em,{children:"flows"}),".\nIn a flow, the individual workflow steps are represented by ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/concepts-components",children:(0,o.jsx)(n.em,{children:"components"})})," that are connected together to form a complete process."]}),"\n",(0,o.jsx)(n.p,{children:"OpenRAG includes several built-in flows:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsxs)(n.a,{href:"/chat#flow",children:[(0,o.jsx)(n.strong,{children:"OpenRAG OpenSearch Agent"})," flow"]})," powers the ",(0,o.jsx)(n.strong,{children:"Chat"})," feature in OpenRAG."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsxs)(n.a,{href:"/ingestion",children:[(0,o.jsx)(n.strong,{children:"OpenSearch Ingestion"})," and ",(0,o.jsx)(n.strong,{children:"OpenSearch URL Ingestion"})," flows"]})," process documents and web content for storage in your OpenSearch knowledge base."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsxs)(n.a,{href:"/chat#nudges",children:[(0,o.jsx)(n.strong,{children:"OpenRAG OpenSearch Nudges"})," flow"]})," provides optional contextual suggestions in the OpenRAG ",(0,o.jsx)(n.strong,{children:"Chat"}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"You can customize these flows and create your own flows using OpenRAG's embedded Langflow visual editor."}),"\n",(0,o.jsx)(n.h2,{id:"inspect-and-modify-flows",children:"Inspect and modify flows"}),"\n",(0,o.jsx)(n.p,{children:"All OpenRAG flows are designed to be modular, performant, and provider-agnostic."}),"\n",(0,o.jsxs)(n.p,{children:["To modify a flow in OpenRAG, click ",(0,o.jsx)(l.A,{name:"Settings2","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Settings"}),".\nFrom here, you can quickly edit commonly used parameters, such as the ",(0,o.jsx)(n.strong,{children:"Language model"})," and ",(0,o.jsx)(n.strong,{children:"Agent Instructions"}),".\nTo further explore and edit the flow, click ",(0,o.jsx)(n.strong,{children:"Edit in Langflow"})," to launch the embedded ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"})," where you can fully ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/concepts-flows",children:"customize the flow"})," to suit your use case."]}),"\n",(0,o.jsxs)(n.p,{children:["For example, to view and edit the built-in ",(0,o.jsx)(n.strong,{children:"Chat"})," flow (the ",(0,o.jsx)(n.strong,{children:"OpenRAG OpenSearch Agent"})," flow), do the following:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In OpenRAG, click ",(0,o.jsx)(l.A,{name:"MessageSquare","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Chat"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Click ",(0,o.jsx)(l.A,{name:"Settings2","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,o.jsx)(n.strong,{children:"Edit in Langflow"})," to launch the Langflow visual editor in a new browser window."]}),"\n",(0,o.jsxs)(n.p,{children:["If prompted to acknowledge that you are entering Langflow, click ",(0,o.jsx)(n.strong,{children:"Proceed"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["If Langflow requests login information, enter the ",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"})," from your ",(0,o.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,o.jsx)(n.code,{children:".env"})," file"]})," in your OpenRAG installation directory."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"OpenRAG OpenSearch Agent flow",src:s(3982).A+"",width:"4084",height:"2176"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Modify the flow as desired, and then press ",(0,o.jsx)("kbd",{children:"Command"}),"+",(0,o.jsx)("kbd",{children:"S"})," (",(0,o.jsx)("kbd",{children:"Ctrl"}),"+",(0,o.jsx)("kbd",{children:"S"}),") to save your changes."]}),"\n",(0,o.jsx)(n.p,{children:"You can close the Langflow browser window, or leave it open if you want to continue experimenting with the flow editor."}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["If you modify the built-in ",(0,o.jsx)(n.strong,{children:"Chat"})," flow, make sure you click ",(0,o.jsx)(l.A,{name:"Plus","aria-hidden":"true"})," in the ",(0,o.jsx)(n.strong,{children:"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."]})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"revert-a-built-in-flow-to-its-original-configuration",children:"Revert a built-in flow to its original configuration"}),"\n",(0,o.jsxs)(n.p,{children:["After you edit a built-in flow, you can click ",(0,o.jsx)(n.strong,{children:"Restore flow"})," on the ",(0,o.jsx)(n.strong,{children:"Settings"})," page to revert the flow to its original state when you first installed OpenRAG.\nThis is a destructive action that discards all customizations to the flow."]}),"\n",(0,o.jsx)(n.h2,{id:"build-custom-flows-and-use-other-langflow-functionality",children:"Build custom flows and use other Langflow functionality"}),"\n",(0,o.jsxs)(n.p,{children:["In addition to OpenRAG's built-in flows, all Langflow features are available through OpenRAG, including the ability to ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/concepts-flows",children:"create your own flows"})," and popular extensibility features such as the following:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://docs.langflow.org/components-custom-components",children:"Create custom components"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Integrate with many third-party services through ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/components-bundle-components",children:"bundles"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Use ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/mcp-client",children:"MCP clients"})," and ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/mcp-server",children:"MCP servers"}),", and serve flows as MCP tools for your agentic flows."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Explore the ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/",children:"Langflow documentation"})," to learn more about the Langflow platform, features, and visual editor."]}),"\n",(0,o.jsx)(n.h2,{id:"set-the-langflow-version",children:"Set the Langflow version"}),"\n",(0,o.jsx)(n.p,{children:"By default, OpenRAG is pinned to the latest Langflow Docker image for stability."}),"\n",(0,o.jsxs)(n.p,{children:["If necessary, you can set a specific Langflow version with the ",(0,o.jsx)(n.code,{children:"LANGFLOW_VERSION"})," ",(0,o.jsx)(n.a,{href:"/reference/configuration",children:"environment variable"}),". However, there are risks to changing this setting:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/",children:"Langflow documentation"})," describes the functionality present in the latest release of the Langflow OSS Python package. If your ",(0,o.jsx)(n.code,{children:"LANGFLOW_VERSION"})," is different, the Langflow documentation might not align with the features and default settings in your OpenRAG installation."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Components might break, including components in OpenRAG's built-in flows."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Default settings and behaviors might change causing unexpected results when OpenRAG expects a newer default."}),"\n"]}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},9179:(e,n,s)=>{s.d(n,{A:()=>i});s(6540);var t=s(7856),o=s(4848);function i({name:e,...n}){const s=t[e];return s?(0,o.jsx)(s,{...n}):null}}}]);