Skip to content

feat(packages): add Langflow adapter - #1101

Open
vishxrad wants to merge 1 commit into
thesysdev:mainfrom
vishxrad:visharad/openui-langflow-integration
Open

feat(packages): add Langflow adapter#1101
vishxrad wants to merge 1 commit into
thesysdev:mainfrom
vishxrad:visharad/openui-langflow-integration

Conversation

@vishxrad

Copy link
Copy Markdown
Contributor

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 with stream_protocol: "agui", and returns Langflow's native AG-UI SSE for OpenUI's agUIAdapter().

Closes #1056

Related Langflow proposal: langflow-ai/langflow#14732
langflow-ai/langflow#14732

Changes

  • Add packages/langflow with Web-standard request, response, fetch, and stream APIs.
  • Add createLangflowStreamResponse() for request validation, session scoping, action and form normalization, and sanitized upstream errors.
  • Add streamLangflowWorkflow() for lower-level Workflow API v2 streaming calls.
  • Cover request construction, native AG-UI passthrough, action context, forms, session mapping, validation, and error redaction with 11 unit tests.
  • Add package and API-reference documentation, an integrations-directory entry, root package catalog updates, and npm release-workflow support.

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-scripts
  • pnpm --filter @openuidev/langflow run ci
  • pnpm --filter @openuidev/langflow build
  • pnpm --filter @openuidev/langflow check:publint
  • pnpm --filter @openuidev/langflow check:attw
  • pnpm --filter @openuidev/docs build
  • Prettier check for all changed source, documentation, manifest, and workflow files

Live acceptance used a local Langflow chat harness with the same adapter:

  • AgentInterface rendered a labeled numeric chart with the OpenUI theme active and no parser errors.
  • Clicking a generated follow-up started one new workflow run in the same Langflow session.
  • Required form validation blocked an empty submission.
  • A valid form sent its edited values and action context to Langflow, and the next rendered response named those values.

No screenshot is included because this pull request contains the server adapter and documentation, not a new UI surface.

  • Not applicable (explain why)
  • Verified locally

Follow-up

OpenUI examples are now standalone and must pin exact published @openuidev/* versions. The runnable Langflow catalog example should follow after @openuidev/langflow has its first release instead of depending on an unpublished workspace package in this pull request.

Checklist

  • I linked a related issue, if applicable
  • I updated docs/README when needed
  • I considered backwards compatibility

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

@vishxrad is attempting to deploy a commit to the thesys-devs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add @openuidev/langflow adapter

1 participant