Interfaces in the Botpress SDK establish standardized contracts that integrations must implement to enable extra features and capabilities. For example, an integration might implement the hitl
(human-in-the-loop) interface to support human agent intervention, or the typing-indicator
interface to use typing indicators provided by the external service.
Each interface is defined through an Interface Definition that specifies the contract integrations must fulfill.
Interfaces can define events that integrations must support. These events establish a consistent model for how activities are communicated to bots, regardless of the underlying external service.
Interfaces can specify actions that integrations must provide. These actions define standardized operations that bots can invoke across different integrations that implement the same interface.
Interfaces can define communication channel requirements that integrations must implement.
Entities define standardized data structures for an interface. They:
Actions and events defined by an interface may consume or produce these entities.
Integrations can rename an interface’s events, actions, channels, and entities to better align with the concepts and terminology of their specific external service. Integrations can also extend entities with additional fields to accomodate the requirements of their external service.
Interfaces provide significant benefits to the Botpress ecosystem: