Skip to content

feat(cli): add self-hosted LangGraph and Vercel AI SDK backends - #968

Open
AbhinRustagi wants to merge 1 commit into
be-framework-template-depsfrom
be-framework-self-hosted
Open

feat(cli): add self-hosted LangGraph and Vercel AI SDK backends#968
AbhinRustagi wants to merge 1 commit into
be-framework-template-depsfrom
be-framework-self-hosted

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 self-hosted template.

Changes

  • LangGraph — a standalone Agent Server in src/agent/agent.ts described by langgraph.json, with /api/chat proxying to it through @openuidev/langchain. pnpm dev runs the Agent Server and Next.js together.
  • Vercel AI SDK — a streamText() route returning toUIMessageStreamResponse(), consumed by vercelAIAdapter(). The whole project deploys to Vercel as one Next.js app.
  • Both drop the openai dependency, since the framework owns the provider client.
  • Adds a shared get_weather example backed by Open-Meteo (no API key), so the selected framework's multi-step tool loop is testable right after scaffolding.

Warning

This touches packages/openui-cli/src/templates/, which #953 deletes in favour of the openui-templates repo. Whichever stack lands second needs this redone over there.

Test Plan

  • Verified locally

Built the CLI and scaffolded both variants. Confirmed the route and page land, framework dependencies merge, openai is dropped, langgraph.json and src/agent/agent.ts ship for the LangGraph variant, and backends/ never leaks into the generated project.

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 14, 2026 11:19am

Request Review

Add the two backend overlays for the self-hosted template, selected with
`--backend-framework`.

- LangGraph: a standalone Agent Server in `src/agent/agent.ts` described
  by `langgraph.json`, with `/api/chat` acting as a browser-to-server
  proxy via `@openuidev/langchain`. `pnpm dev` runs the Agent Server and
  Next.js together; deploy the frontend to Vercel and point
  `LANGGRAPH_API_URL` at the Agent Server.
- Vercel AI SDK: a `streamText()` route returning
  `toUIMessageStreamResponse()`, consumed by `vercelAIAdapter()`. The
  whole project deploys to Vercel as one Next.js app.
- Both overlays drop the `openai` dependency, since the framework owns
  the provider client.
- Add a shared `get_weather` example tool backed by Open-Meteo (no API
  key) so the selected framework's native multi-step tool loop is
  testable right after scaffolding.

Migrated from PR #785 (visharad/th-2051-route-replacement).

Co-Authored-By: Visharad Kashyap <154831195+vishxrad@users.noreply.github.com>
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