AgentKit Amazing is a production-ready AI ChatKit application powered by OpenAI's ChatKit and Agent Builder. It features a beautiful, modern UI built with Next.js and is ready to deploy to Vercel in minutes.
- Next.js app with
<openai-chatkit>web component and theming controls - API endpoint for creating a session at
app/api/create-session/route.ts - Config file for starter prompts, theme, placeholder text, and greeting message
npm installCopy the example file and fill in the required values:
cp .env.example .env.localYou can get your workflow id from the Agent Builder interface, after clicking "Publish":
You can get your OpenAI API key from the OpenAI API Keys page.
Update .env.local with the variables that match your setup.
OPENAI_API_KEY— API key created within the same org & project as your Agent BuilderNEXT_PUBLIC_CHATKIT_WORKFLOW_ID— the workflow you created in Agent Builder- (optional)
CHATKIT_API_BASE- customizable base URL for the ChatKit API endpoint
Note: if your workflow is using a model requiring organization verification, such as GPT-5, make sure you verify your organization first. Visit your organization settings and click on "Verify Organization".
npm run devVisit http://localhost:3000 and start chatting. Use the prompts on the start screen to verify your workflow connection, then customize the UI or prompt list in lib/config.ts and components/ChatKitPanel.tsx.
npm run buildBefore deploying your app, you need to verify the domain by adding it to the Domain allowlist on your dashboard.
This app is configured for easy deployment to Vercel:
-
Push your code to GitHub
git init git add . git commit -m "Initial commit" git remote add origin <your-github-repo-url> git push -u origin main
-
Import project to Vercel
- Go to vercel.com
- Click "Import Project"
- Select your GitHub repository
-
Configure environment variables In the Vercel project settings, add these environment variables:
OPENAI_API_KEY- Your OpenAI API keyNEXT_PUBLIC_CHATKIT_WORKFLOW_ID- Your ChatKit workflow ID- (Optional)
CHATKIT_API_BASE- Custom API base URL if needed
-
Deploy
- Click "Deploy"
- Wait for the build to complete
- Your app will be live!
-
Domain verification
- After deployment, go to your Vercel deployment URL
- Add this URL to your OpenAI Domain allowlist
Note: The app is pre-configured with vercel.json for optimal deployment settings.
- Adjust starter prompts, greeting text, chatkit theme, and placeholder copy in
lib/config.ts. - Update the event handlers inside
components/.tsxto integrate with your product analytics or storage.
