Client SDK
Cognipeer Client SDK
The official JavaScript/TypeScript SDK for building conversational AI applications, with client-side tool execution — your functions run in your environment, and the results flow straight back into the conversation.
- Package
@cognipeer/sdk - Runtime Node.js · browsers · edge, ESM & CommonJS
- Tool calling OpenAI-compatible function format
Unlike SDKs that only support server-side tools, the Client SDK lets your JavaScript functions be called automatically by the AI, with full type safety and configurable retry logic — so sensitive operations stay on your own infrastructure instead of round-tripping through someone else's server.
npm install @cognipeer/sdkyarn add @cognipeer/sdkpnpm add @cognipeer/sdkimport { CognipeerClient } from '@cognipeer/sdk';
const client = new CognipeerClient({
token: 'pat_your-personal-access-token',
hookId: 'your-channel-hook-id'
});
const response = await client.conversations.create({
messages: [{ role: 'user', content: 'Hello! How can you help me?' }]
});
console.log(response.content);Getting started
Install the SDK, authenticate, and send your first message.
Client-side tools
Define functions the AI calls automatically, with typed arguments and results.
Flows
Run structured workflows and automations with typed input and output.
API reference
CognipeerClient, conversations, flows, and every exported type.
Examples
Basic usage, client tools, structured output, browser integration, and real-world use cases.
Release notes
What shipped, release by release.
Why the Client SDK
Automatic tool execution
No need to manually handle tool calls — the SDK detects them, runs your function, and feeds the result back into the conversation for you.
Client-side security
Sensitive operations run in your own environment. Nothing needs to be proxied through a server just to call a function.
OpenAI-compatible tool format
Tool definitions use the same function-calling shape as OpenAI, so existing schemas and mental models carry over directly.
Universal runtime support
Works in Node.js, browsers, and edge runtimes, shipped as both ESM and CommonJS with full TypeScript types.
Where to go next
- Getting started — install, authenticate, first conversation.
- Client-side tools — define and register functions the AI can call.
- Configuration — client options, retries, and error handling.
- TypeScript support — types for messages, tools, and responses.

