Architecture and modules

Messaging channels
Makes bot able to response on any available messaging channel.
- Connector (
<Facebook>, <BotService>, ...) - transforms an incomming event - Sender (
<FacebookSender>, <BotServiceSender>, ...) - sends an outgoing event
Conversational interface
Transforms incomming messaging event to bot response and is responsible for managing conversation state.
Modules (Services)
Provides additional abilities like logging, NLP and Notifications.
Chat Logger - Stores the history of conversations
Available at
lib/chatLogStorage.jsand connected to Messaging Channel Connector atbot/index.jsAnonymization - Filters any sensitive data in text messages
Available at
bot/anonymize.js, connected to<Ai>atbot/bot.jsand to Analytics atbot/onAction.jsChat Analytics - By default as an integration to Google Analytics
Available at
bot/onAction.jsconnected toProcessoratbot/Processor.jsto catch incomming events and connected toRouteratbot/bot.jsto catch all visited interactions.NLP - Natural language processing service
Wingbot NLP is built in core
wingbotNPM module. It's configured inbot/bot.jsin globalwingbot.aiservice. You can register own NLP modulte withai.register(module)method.Plugins - Business logic and API integrations
Available at
bot/plugins/index.jsto be able to register all required modules. Connected atbot/bot.jstoBuildRouter.Notifications
Complex subsystem consists of
Notificationsservice atlib/notifications.jswhich usesNotificationsStorageat the same place. Notifications has own "interval" script in routes and are connected as a processor plugin toProcessoratbot/processor.js.
GraphQL API
Makes wingbot.ai or other applications able to access bots services. Has own route in routes/api.js. Allows to attach or detach any API you want.