Getting Started

Create a new OpenUI application or add OpenUI to an existing agent.

Start a new agent application with the OpenUI CLI, or add OpenUI to an application you already have.

Start a new application

You need Node.js 20 or later. Run the interactive setup to choose your model connection and agent framework:

npx @openuidev/cli@latest create

The CLI creates the project, installs its dependencies, and can start the development server for you.

Choose a model connection

Use OpenUI Gateway for model access, output correction, and provider fallbacks:

npx @openuidev/cli@latest create --name my-agent --template openui-cloud

Or connect the generated application directly to your own model provider:

npx @openuidev/cli@latest create --name my-agent --template openui-self-hosted

Choose an agent framework

Add --backend-framework to scaffold an integration for a specific agent framework. These options can be combined with either model setup.

npx @openuidev/cli@latest create \
  --name my-agent \
  --template openui-cloud \
  --backend-framework default

The generated application includes Agent Interface and an OpenUI Lang component library. Follow the Agent Interface Quickstart to understand the generated project.

Add OpenUI to an existing application

Build only with OpenUI Lang

Use OpenUI Lang without adopting a complete agent interface or hosted model service:

  1. Define the components the model can use.
  2. Generate the system prompt from the component library.
  3. Send those instructions to your chosen model or agent framework.
  4. Render the streamed response with your application components.

Learn more in the OpenUI Lang documentation.

On this page