Quick Start

Get Raison running in your application in under 5 minutes.

Use this pre-built prompt to get started faster.

Prerequisites

  • Node.js 18 or later
  • npm, pnpm, or yarn
  • A Raison account at raison.ist

1. Get Your API Key

  1. Sign in at raison.ist.
  2. If this is your first login, you will be prompted to create an organization — give it a name and continue.
  3. Create a project (or open an existing one).
  4. Go to API Keys.
  5. Click New, select the environment (start with Development), and give it a label.
  6. Copy the key — it starts with rsn_ and is shown only once.

Your API key is tied to one project and one environment. To connect to Production, create a separate key for the Production environment.

2. Create and Deploy a Prompt

  1. Go to Agents in the left sidebar.
  2. Open an agent (or use the Default Agent that comes with your project).
  3. Click on a prompt (e.g. System Prompt), or click + New Prompt to create one.
  4. Write your prompt content. You can use variables with Handlebars syntax, e.g. {{company_name}}.
  5. Click Edit as new draft in the History panel on the right (or edit the existing draft).
  6. Click Deploy to Development in the History panel.
  7. Copy the prompt ID from the top of the prompt detail view (click IDs).

Your prompt must be deployed to the same environment as your API key. If your key is for Development, make sure the prompt is deployed to Development.

3. Install

npm install raison

4. Connect and Use

import { Raison } from 'raison'

const raison = new Raison({
  apiKey: process.env.RAISON_API_KEY, // rsn_development_xxxxxxxx
})

// Render a prompt with variables
// Copy the prompt ID from the dashboard: Prompts > click a prompt > copy ID
const message = await raison.render('YOUR_PROMPT_ID', {
  userName: 'Alice',
  context: 'billing inquiry',
})

// Query all prompts deployed to this environment
const allPrompts = await raison.find()

// Find a single prompt by name
const systemPrompt = await raison.findOne({ name: 'system-prompt' })

// Disconnect when your process exits
raison.disconnect()

The SDK connects via WebSocket, receives all deployed prompts for the environment in the initial sync, and keeps them updated in real-time. Every method (render, find, findOne) waits for the initial sync before returning — there are no race conditions to handle.

What Happens After Connection

After new Raison({ apiKey }):

  1. A WebSocket connection is opened to api.raison.ist/sdk.
  2. The server sends a sync event with all prompts currently deployed to your environment.
  3. Prompts are stored in an in-memory database on your side.
  4. The SDK is now ready — all methods resolve immediately from memory.
  5. When you deploy a prompt update in the dashboard, the SDK receives a prompt:deployed event and updates its local copy. Your next call to render or find returns the new content.

Where to Find Prompt IDs

In the Raison dashboard:

  1. Open your project.
  2. Go to Agents and open an agent.
  3. Click on a prompt.
  4. The prompt ID is displayed at the top of the prompt detail view — click to copy.

Prompt IDs are stable across versions and environments. The same ID works in Development, Staging, and Production.

Next Steps

  • SDK Guide — How the SDK works internally, error handling, and patterns
  • Concepts — Understand the prompt lifecycle in depth
  • Templating — Full Handlebars guide for writing prompts
  • Examples — Anthropic/Claude, Next.js, multi-environment patterns