SDK Integration
The Rightbrain SDK lets you add production-ready AI capabilities into your TypeScript or JavaScript apps direct from the Tasks you’ve created in Rightbrain.
No boilerplate, no manual schema handling. It pairs with the Rightbrain CLI to generate type-safe client code and simplify authentication.
When to use the SDK
Use the SDK when building apps or internal tools in TypeScript/Node/Next.js. Use the REST API directly when working from other languages or lightweight back-end scripts.
Quick Start
1. Prerequisites
- Node.js 18+
- pnpm / npm / yarn
- A Rightbrain account with API credentials
2. Install the SDK
3. Configure Environment
Copy .env.example → .env.local and add your Rightbrain credentials:
In the Rightbrain Dashboard, create an OAuth 2.0 Client and click Client.env to copy the credentials.
Setting Up the Demo App
Clone the Rightbrain SDK Demo:
Populate Tasks in Your Project
Run the setup script to auto-create demo Tasks in your dashboard:
You’ll now see three new Tasks under your project in the dashboard.
Generate the Type-Safe SDK
This uses your credentials from rightbrain.config.ts to output generated SDK code to src/generated.
Run the App
Visit http://localhost:3000 - each demo shows real Task executions, visible in your dashboard’s Runs view.
