DocsGetting started

Getting started

Quickstart

Create your first persistent Chusky conversation.

Install the SDK on your trusted server, create a thread for your authenticated user, and stream the agent response. Keep your project key private and map userId to your own account identity.

example.ts
import { Chusky } from "@chusky/sdk";

const chusky = new Chusky({
  apiKey: process.env.CHUSKY_API_KEY!,
  baseUrl: process.env.CHUSKY_BASE_URL,
  userId: session.user.id,
});

const thread = await chusky.threads.create();
const run = await chusky.threads.runs(thread.id).create({
  input: "Prepare a concise renewal brief.",
});
console.log(run.output);