git clone https://github.com/CopilotKit/OpenGenerativeUI.git
cd OpenGenerativeUI
# Install all dependencies and create .env
make setupmake setup runs pnpm install and creates apps/agent/.env if it doesn't exist.
Add your OpenAI API key to apps/agent/.env:
OPENAI_API_KEY=sk-...You can also set these optional variables in the root .env:
| Variable | Default | Description |
|---|---|---|
LLM_MODEL |
gpt-5.4-2026-03-05 |
LLM model for the agent |
RATE_LIMIT_ENABLED |
false |
Enable per-IP rate limiting |
RATE_LIMIT_WINDOW_MS |
60000 |
Rate limit window (ms) |
RATE_LIMIT_MAX |
40 |
Max requests per window |
MCP_SERVER_URL |
— | Optional MCP server URL |
# Start all services (frontend + agent)
make devThis starts:
- Frontend at http://localhost:3000 (Next.js)
- Agent at http://localhost:8123 (FastAPI/LangGraph)
You can also start services individually:
make dev-app # Frontend only
make dev-agent # Agent only
make dev-mcp # MCP server only- Open http://localhost:3000
- You should see the Open Generative UI chat interface
- Try typing "Create a todo list for a weekend project" or click one of the demo suggestions
- The agent should respond and you'll see generative UI rendered in the chat
make build # Build all apps
make lint # Lint all apps
make clean # Clean build artifacts
make help # Show all available commands- Architecture — Understand how the pieces fit together
- Bring to Your App — Use these patterns in your own project