The Open Standard for Generative UI
This is an OpenUI Self Hosted Chat project bootstrapped with openui-cli.
OpenUI: guide for coding agents
This project is built with OpenUI. Before changing it, read the maintained OpenUI skill for coding agents published at thesysdev/skills.
Setup
Create .env.local with your OpenAI credentials:
OPENAI_API_KEY=...
# Optional:
OPENAI_MODEL=gpt-5.2
Getting Started
First, run the development server:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying src/app/api/chat/route.ts and improving your agent
by adding system prompts or tools. A LangGraph scaffold puts the
implementation in src/agent.ts instead.
The generated app includes a get_weather tool example. Ask “What’s the weather in Berlin?” to exercise its native tool loop.
Deploy
From the project directory, deploy a preview with the pinned OpenUI CLI:
pnpm run deploy
pnpm run deploy -- --prod
The command deploys to Vercel. Allowlisted keys from .env / .env.local (including OPENAI_API_KEY)
are passed to that deployment unless you use --skip-env. Persist them on the Vercel project for later
deploys.
Framework deployments
The Vercel AI SDK scaffold runs its backend inside the Next.js API route, so the frontend and backend can be deployed together as one Next.js project.
Conversation storage
This starter does not configure durable conversation storage. AgentInterface
keeps messages in memory for the current page session and sends that history to
/api/chat; refreshing the page loses it. To persist conversations, pass a storage
implementation to AgentInterface and back it with your own database. Add a
LangGraph checkpointer separately only for graph-specific durable state.
Learn More
To learn more about OpenUI, take a look at the following resources:
- OpenUI Documentation - learn about OpenUI features and API.
- OpenUI GitHub repository - your feedback and contributions are welcome!
LangGraph is the default backend and uses Chat Completions with your provider.