Skip to content

Introduction

Copy page

The Divinci AI SDK is a family of TypeScript packages for building on the Divinci platform — chat, retrieval-augmented generation (RAG), fine-tuning, evaluation, and pay-per-call tools. Every package shares one type system (@divinci-ai/types) and the same authentication model, so what you learn in one carries over to the rest.

You configure an AI assistant once as a Release — its model, prompt, RAG knowledge base, theme, and access rules. A Release lives inside a Workspace (also called a white‑label). Your end users chat against a Release; your backend manages Workspaces, Releases, and knowledge bases. The SDK packages split cleanly along that line: client-side packages talk to a Release, the server package administers the platform.

@divinci-ai/client

A headless, browser‑safe TypeScript SDK. You own the UI; the client owns chat threads, streaming, realtime WebSockets, and per‑user RAG. Reach for this when building a custom chat experience in React, Vue, Svelte, or vanilla JS.

Embed script

A zero‑build <script> tag that mounts a fully‑rendered Divinci chat widget on any page. No bundler, no npm. Reach for this when you want chat live in minutes and don’t need to control the UI.

@divinci-ai/server

A Node.js SDK with full platform access — Workspaces, Releases, RAG ingestion, API keys, fine‑tuning, QA suites, and x402 payments. Holds your secret API key, so it runs only on a trusted backend.

@divinci-ai/mcp

A Model Context Protocol client. Connects MCP‑compatible assistants (Claude Desktop, Cursor, your own agent) to Divinci tools and resources, with optional x402 pay‑per‑call.

A typical production app uses two packages at once:

  • Your backend uses @divinci-ai/server to create a Release, upload RAG documents, and mint short‑lived user tokens.
  • Your frontend uses @divinci-ai/client with that token to run the chat, streaming responses directly to the browser.

The @divinci-ai/types package is the shared vocabulary — ChatMessage, Release, RagDocument, and friends. It ships as a dependency of the other packages, so you rarely install it directly, but you can import its types for your own function signatures.