Core Concepts
The SDK is organized into three main modules:Bots
Bots are the primary conversational interfaces in Botpress. They handle user messages, manage state, execute actions, and orchestrate workflows.- BotDefinition - Defines bot structure, integrations, and capabilities
- BotImplementation - Implements event handlers, actions, and business logic
- BotSpecificClient - Type-safe API client for bot operations
Integrations
Integrations connect Botpress to external platforms and services. They define channels, actions, events, and handle webhook-based communication.- IntegrationDefinition - Defines integration capabilities and schema
- IntegrationImplementation - Implements webhooks, actions, and channel handlers
- IntegrationSpecificClient - Type-safe client for integration operations
Plugins
Plugins extend bot functionality with reusable components. They can add states, events, actions, and handlers that work across multiple bots.- PluginDefinition - Defines plugin capabilities and dependencies
- PluginImplementation - Implements plugin actions and handlers
Installation
Package Exports
The SDK exports all major types and utilities from@botpress/sdk:
Type Safety
The SDK provides end-to-end type safety:Client API
The@botpress/client package provides runtime API access:
Error Handling
The SDK includes built-in error types:Next Steps
Bot SDK
Build conversational bots
Integration SDK
Connect external platforms
Plugin SDK
Create reusable components