Skip to content

feat(cli): add OpenUI Cloud LangGraph and Vercel AI SDK backends - #969

Open
AbhinRustagi wants to merge 2 commits into
be-framework-self-hostedfrom
be-framework-cloud
Open

feat(cli): add OpenUI Cloud LangGraph and Vercel AI SDK backends#969
AbhinRustagi wants to merge 2 commits into
be-framework-self-hostedfrom
be-framework-cloud

Conversation

@AbhinRustagi

@AbhinRustagi AbhinRustagi commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What

Adds the LangGraph and Vercel AI SDK backend overlays for the Cloud template. In both, the framework owns orchestration and application tools while OpenUI Cloud stays the Responses model provider and conversation store — reports, presentations, web search, image search and MCP remain provider-executed.

Changes

  • LangGraphsrc/agent/agent.ts builds the agent with createAgent() plus a middleware that points the model at Cloud, forwards only the newest message (Cloud holds the history), and strips Cloud-owned tool calls from graph state so ToolNode runs only app tools.
  • Vercel AI SDK — a streamText() route with middleware that marks Cloud-executed tools as provider-executed, so the SDK streams them without dispatching them locally, plus a UI-chunk transform that makes completed Cloud tools display-only in the browser.
  • Each overlay ships its own cloud-chat.tsx wired to the transport its route speaks — agUIAdapter() for LangGraph, vercelAIAdapter() + vercelAIMessageFormat for the AI SDK. The base template is untouched, so there's no transport map or backend prop to keep in sync as backends are added.
  • Ignore .langgraph_api, written by the local Agent Server.

Pure additions — this PR modifies no existing template file.

Test Plan

  • Verified locally

Built the CLI and scaffolded all three Cloud variants. Each gets the right adapter in its generated cloud-chat.tsxagUIAdapter, vercelAIAdapter, and openAIResponsesAdapter for default — with no backend prop and no transport map anywhere. Also confirmed src/lib/tool-loop.ts is removed via files.remove and backends/ doesn't leak.

Checklist

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openui-docs Ready Ready Preview Aug 24, 2026 9:00am

Request Review

@AbhinRustagi
AbhinRustagi marked this pull request as ready for review August 13, 2026 11:57
Parallel local tools produce multiple ToolMessages; slice(-1) dropped
siblings so the second model step got an incomplete function_call_output
set and returned no answer on the live stream.
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.

1 participant