@chatbotkit/sdk
v1.37.2
Published
The fastest way to build advanced AI chat bots
Maintainers
Readme
ChatBotKit Node SDK
Welcome to the ChatBotKit Node SDK. This is a Node.js-based solution designed to simplify the process of building conversational AI chatbots. Utilize ChatBotKit to rapidly develop and deploy AI bots capable of natural language interactions.
Why ChatBotKit?
Build lighter, future-proof AI agents. When you build with ChatBotKit, the heavy lifting happens on our servers-not in your application. This architectural advantage delivers:
🪶 Lightweight Agents: Your agents stay lean because complex AI processing, model orchestration, and tool execution happen server-side. Less code in your app means faster load times and simpler maintenance.
🛡️ Robust & Streamlined: Server-side processing provides a more reliable experience with built-in error handling, automatic retries, and consistent behavior across all platforms.
🔄 Backward & Forward Compatible: As AI technology evolves-new models, new capabilities, new paradigms-your agents automatically benefit. No code changes required on your end.
🔮 Future-Proof: Agents you build today will remain capable tomorrow. When we add support for new AI models or capabilities, your existing agents gain those powers without any updates to your codebase.
This means you can focus on building great user experiences while ChatBotKit handles the complexity of the ever-changing AI landscape.
Getting Started
Embark on creating your chatbot with ChatBotKit in a few easy steps:
- Installation: To integrate the SDK into your project, use npm:
npm install @chatbotkit/sdk - Implementation: Start using the SDK to build and manage your chatbot.
Example: Streaming in Edge and Serverless Environments
Below is a straightforward example demonstrating how to implement streaming with the SDK in both Edge and Serverless environments:
import { ConversationClient } from '@chatbotkit/sdk/conversation/index.js'
// Initialize the ConversationClient
const client = new ConversationClient({
/* configuration options */
})
// Stream messages using the ConversationClient
for await (const { type, data } of client
.complete(null, { model: 'gpt-5-mini', messages })
.stream()) {
if (type === 'token') {
process.stdout.write(data.token)
}
}
// Additional processing can be added hereExplore a detailed example with more advanced features here.
Documentation
For an in-depth exploration of the ChatBotKit Node SDK, including insights into its capabilities and configurations for different environments, visit our type documentation page.
Contributing
Encountered a bug or interested in contributing? Your participation is highly appreciated! Feel free to open an issue or submit a pull request on our official GitHub repository.
