Is your feature request related to a problem? Please describe.
OpenUI does not have a maintained adapter for Langflow's Workflow API. Developers connecting an OpenUI AgentInterface to Langflow currently have to map OpenUI thread and action turns into Langflow workflow inputs, preserve follow-up and form context, scope session ids, and pass Langflow's native AG-UI stream back to OpenUI themselves.
The related Langflow proposal is langflow-ai/langflow#14732:
langflow-ai/langflow#14732
Describe the solution you'd like
Add an @openuidev/langflow package to this repository. The package exposes a Web-standard server helper around Langflow's public POST /api/v2/workflows endpoint. It maps OpenUI threadId values to Langflow session_id values, converts the latest user, follow-up, or form turn into input_value, requests mode: "stream" with stream_protocol: "agui", and returns the native AG-UI response for OpenUI's maintained agUIAdapter().
The request path is:
OpenUI AgentInterface
-> application server route
-> @openuidev/langflow
-> Langflow Workflow API v2 with native AG-UI streaming
-> Langflow flow, model, tools, and session memory
-> OpenUI agUIAdapter, parser, renderer, actions, and theme
Langflow owns the workflow graph, model calls, tools, and session memory. OpenUI owns the chat shell, OpenUI Lang parser and renderer, streaming UI state, theme, follow-ups, and form actions. The adapter is the server-side boundary between them and keeps credentials out of the browser.
The proposed scope is:
packages/langflow with request handling, session mapping, input normalization, native AG-UI passthrough, typed extension hooks, and focused tests;
- an API-reference page and integrations-directory entry;
- root package catalog and npm release-workflow updates.
The implementation targets Langflow Workflow API v2 and was exercised with lfx==1.11.4, lfx-openai==0.1.0, and the OpenUI workspace packages. Package unit tests, typecheck, lint, formatting, build, publint, and AreTheTypesWrong pass. The OpenUI docs production build also passes.
A full Langflow chat application was used for live acceptance. It rendered a labeled chart, sent a follow-up as one new turn in the same session, blocked an incomplete required form, and included edited form values in the next response. OpenUI examples are now standalone and require exact published @openuidev/* versions, so the catalog example should follow after the first package release instead of depending on an unpublished workspace package in this pull request.
I would be happy to maintain @openuidev/langflow as the Langflow API evolves.
Describe alternatives you've considered
- Keep the adapter in an example. This avoids a package but leaves every application to copy request parsing, action normalization, session mapping, error handling, and Workflow API setup.
- Put the adapter only in the Langflow repository. That can document Langflow's frontend boundary, but the reusable TypeScript API directly serves OpenUI's message and stream contracts and fits alongside other OpenUI framework adapters.
- Convert Langflow's stream to an OpenAI-compatible protocol. Langflow already emits AG-UI, so an extra conversion layer adds code and loses the native protocol boundary.
Additional context
The implementation is on visharad/openui-langflow-integration. The package documentation links both projects and records their division of responsibility.
Is your feature request related to a problem? Please describe.
OpenUI does not have a maintained adapter for Langflow's Workflow API. Developers connecting an OpenUI
AgentInterfaceto Langflow currently have to map OpenUI thread and action turns into Langflow workflow inputs, preserve follow-up and form context, scope session ids, and pass Langflow's native AG-UI stream back to OpenUI themselves.The related Langflow proposal is langflow-ai/langflow#14732:
langflow-ai/langflow#14732
Describe the solution you'd like
Add an
@openuidev/langflowpackage to this repository. The package exposes a Web-standard server helper around Langflow's publicPOST /api/v2/workflowsendpoint. It maps OpenUIthreadIdvalues to Langflowsession_idvalues, converts the latest user, follow-up, or form turn intoinput_value, requestsmode: "stream"withstream_protocol: "agui", and returns the native AG-UI response for OpenUI's maintainedagUIAdapter().The request path is:
Langflow owns the workflow graph, model calls, tools, and session memory. OpenUI owns the chat shell, OpenUI Lang parser and renderer, streaming UI state, theme, follow-ups, and form actions. The adapter is the server-side boundary between them and keeps credentials out of the browser.
The proposed scope is:
packages/langflowwith request handling, session mapping, input normalization, native AG-UI passthrough, typed extension hooks, and focused tests;The implementation targets Langflow Workflow API v2 and was exercised with
lfx==1.11.4,lfx-openai==0.1.0, and the OpenUI workspace packages. Package unit tests, typecheck, lint, formatting, build,publint, and AreTheTypesWrong pass. The OpenUI docs production build also passes.A full Langflow chat application was used for live acceptance. It rendered a labeled chart, sent a follow-up as one new turn in the same session, blocked an incomplete required form, and included edited form values in the next response. OpenUI examples are now standalone and require exact published
@openuidev/*versions, so the catalog example should follow after the first package release instead of depending on an unpublished workspace package in this pull request.I would be happy to maintain
@openuidev/langflowas the Langflow API evolves.Describe alternatives you've considered
Additional context
The implementation is on
visharad/openui-langflow-integration. The package documentation links both projects and records their division of responsibility.