Developer/Products/Client SDK

Client SDK

@cognipeer/sdk  ·  Around Console
stable

Official JavaScript and TypeScript SDK for Cognipeer Studio. Connect applications to Studio conversations, channels, peers, users, and client-side tool execution from the browser or server.

License  ·  MITTypeScript  ·  100%Audience  ·  Product and applicationFits  ·  Studio conversations
Studio conversationsClient-side tool executionBrowser and Node integrationsBrowse recipes
Production install
$npm install @cognipeer/sdk

What's in the box

Product and application teams integrating Cognipeer Studio into web apps, backends, and custom conversational experiences. Each capability is opt-in — use the parts that fit, leave the rest.

Studio Resource APIs

Work with Studio conversations, channels, peers, and users through a typed JavaScript and TypeScript client.

Client-Side Tool Execution

Define JavaScript functions in your app and let the AI call them directly with structured arguments and retry-aware execution.

Browser + Node Support

Run the same SDK in browser applications, Node.js services, and edge-compatible environments.

Hook and Token Auth

Authenticate with Studio-compatible credentials such as personal access tokens and hook-based integration flows.

Flow Support

Trigger structured workflows and automations with predictable request and response contracts.

Type-Safe Integration

Use full TypeScript types for requests, responses, pagination, and client tool contracts.

OpenAI-Style Tool Shape

Reuse familiar function-calling schemas while keeping tool execution on your own client or infrastructure.

How it runs

A typed SDK for Cognipeer Studio that exposes conversations, peers, channels, and client-side tools to apps running in the browser or on the server.

Step 1
Auth
Token · hook
Step 2
Channel
Step 3
Conversation
Step 4
Client tools
Step 5
Flow / Run

Resources

  • conversations
  • channels
  • peers
  • users

Capabilities

  • OpenAI-style tools
  • Hook auth
  • Flow triggers
  • Pagination

Runtimes

  • Browser
  • Node.js
  • Edge
  • React Native

Quickstart

Install, configure, run. The example below is the smallest piece of code that does something useful in production.

1import { CognipeerClient } from "@cognipeer/sdk";
2 
3const client = new CognipeerClient({
4  token: env.STUDIO_TOKEN,
5});
6 
7const conversation = await client.conversations.create({
8  peerId: "peer_123",
9  tools: [{ name: "get_balance", run: getBalance }],
10});
11 
12await conversation.send("What is my balance?");

How it compares

Against the around console options teams most often weigh — focused on operational concerns, not feature inventories.

CapabilityClient SDKDirect REST CallsOpenAI Node SDKGeneric Fetch Wrapper
Studio Auth●  native◐  partial○  missing◐  partial
Client Tools●  native◐  partial◐  partial○  missing
Browser Ready●  native●  native◐  partial●  native
Typed Resources●  native○  missing●  native◐  partial
Conversation API●  native◐  partial○  missing◐  partial
Flow Support●  native◐  partial○  missing◐  partial

Patterns that use Client SDK

Production-tested recipes powered by this package.

Next steps