This is an OpenUI Agent Chat project bootstrapped with openui-cli.
First, create a .env file:
OPENAI_API_KEY=sk-your-key-here
OPENAI_MODEL=gpt-5.5Then run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying src/app/api/route.ts and improving your agent
by adding system prompts or tools.
The example chat app supports OpenAI-compatible APIs through the optional OPENAI_BASE_URL environment variable.
Example using OpenRouter:
OPENAI_API_KEY=sk-or-v1-...
OPENAI_BASE_URL=https://openrouter.ai/api/v1
OPENAI_MODEL=openai/gpt-5.5This also works with other OpenAI-compatible providers.
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!
You can build the image either from the example directory or from the repository root.
cd examples/openui-chat
docker build -f Dockerfile -t openui-chat ../..
docker run --rm -p 3000:3000 -e OPENAI_API_KEY=your_api_key openui-chatdocker build -f examples/openui-chat/Dockerfile -t openui-chat .
docker run --rm -p 3000:3000 -e OPENAI_API_KEY=your_api_key openui-chat. or ../..) because this example depends on pnpm workspace packages.
Notes:
- The Docker build uses pnpm workspace dependencies from the monorepo.
- Runtime uses Next.js standalone output (
node examples/openui-chat/server.js). - A placeholder API key will start the app, but chat requests will return
401.