feat(packages): add Langflow adapter - #1101
Open
vishxrad wants to merge 1 commit into
Open
Conversation
|
@vishxrad is attempting to deploy a commit to the thesys-devs Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
@openuidev/langflow, a server-side adapter between OpenUI Agent Interface requests and Langflow Workflow API v2.The adapter maps OpenUI thread ids to Langflow session ids, normalizes the newest user, follow-up, or form turn into
input_value, starts a streaming workflow run withstream_protocol: "agui", and returns Langflow's native AG-UI SSE for OpenUI'sagUIAdapter().Closes #1056
Related Langflow proposal: langflow-ai/langflow#14732
langflow-ai/langflow#14732
Changes
packages/langflowwith Web-standard request, response, fetch, and stream APIs.createLangflowStreamResponse()for request validation, session scoping, action and form normalization, and sanitized upstream errors.streamLangflowWorkflow()for lower-level Workflow API v2 streaming calls.Langflow owns the workflow graph, model calls, tools, and session memory. OpenUI owns the chat surface, parser, renderer, theme, streaming UI state, follow-ups, and form actions. Credentials remain in the application server route.
Test Plan
CI=true pnpm install --frozen-lockfile --ignore-scriptspnpm --filter @openuidev/langflow run cipnpm --filter @openuidev/langflow buildpnpm --filter @openuidev/langflow check:publintpnpm --filter @openuidev/langflow check:attwpnpm --filter @openuidev/docs buildLive acceptance used a local Langflow chat harness with the same adapter:
AgentInterfacerendered a labeled numeric chart with the OpenUI theme active and no parser errors.No screenshot is included because this pull request contains the server adapter and documentation, not a new UI surface.
Follow-up
OpenUI examples are now standalone and must pin exact published
@openuidev/*versions. The runnable Langflow catalog example should follow after@openuidev/langflowhas its first release instead of depending on an unpublished workspace package in this pull request.Checklist