Botman is an extensible PHP library for building chatbots that work across multiple messaging platforms from a single codebase. It provides a framework-agnostic foundation for creating chat bots that can operate on platforms like Slack, Telegram, and Facebook Messenger without requiring platform-specific code.
The library abstracts each chat platform behind a common driver interface, allowing developers to send and receive messages uniformly. It includes a conversation state machine for managing multi-turn dialogues, a message matching engine that triggers responses based on keywords or patterns, and an event-driven message routing system that dispatches incoming messages through a central bus to decoupled handlers. A middleware pipeline architecture processes messages through a chain of classes that can inspect, modify, or halt message flow before reaching the bot logic.
Botman supports sending rich replies including text, images, audio, video, and location data across supported channels. It handles conversation flow by tracking user state and guiding interactions through predefined steps or decision trees. The framework is designed to be configuration-driven, with a central driver registry that enables runtime selection and swapping of chat backends.