Getting started
Setup
There are two ways to set up the Chat SDK. Deploying with Vercel is the fastest way to get started by having a live deployment up and running, while also being able to develop locally immediately.
Use 1-click Deploy with Vercel and Develop Locally
- Enter the 1-click deploy flow using this link.
- Create new project and repository of the Chat SDK
- Add integrations like Neon Postgres and xAI Grok to your project
- Clone your repository locally and link to your project using
vc link
- Link environment variables using
vc env pull
- Continue development locally
- Push changes and recreate deployment automatically
Develop Locally and Deploy Later
- Fork the Chat SDK repository on GitHub
- Clone your forked repository locally
- Create a PostgreSQL database and retrieve its connection string to set the
DATABASE_URL
environment variable in.env.local
- Create a Vercel Blob store and set the
BLOB_READ_WRITE_TOKEN
environment variable in.env.local
- Sign up for a developer account on xAI's portal and create a new API key to set the
GROK_API_KEY
environment variable in.env.local
- Install dependencies using
pnpm install
- Start development server using
pnpm dev