# botman/botman

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/botman-botman).**

6,162 stars · 815 forks · PHP · MIT

## Links

- GitHub: https://github.com/botman/botman
- Homepage: https://botman.io
- awesome-repositories: https://awesome-repositories.com/repository/botman-botman.md

## Description

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.

## Tags

### Artificial Intelligence & ML

- [Chat Bot Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/chat-bot-frameworks.md) — An extensible PHP library for building chatbots that work across multiple messaging platforms.
- [State-Tracking Dialogue Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/conversation-state-management/conversation-flow-design/dialog-flow-engines/multi-turn-flow-managers/state-tracking-dialogue-managers.md) — Provides a conversation state machine for managing multi-turn dialogues with step progression.
- [Keyword Action Triggers](https://awesome-repositories.com/f/artificial-intelligence-ml/keyword-action-triggers.md) — Includes a message matching engine that triggers responses based on keywords or patterns.
- [Multi-Platform Chatbot Development](https://awesome-repositories.com/f/artificial-intelligence-ml/multi-platform-chatbot-development.md) — Builds a single chatbot that works across multiple messaging platforms from one PHP codebase.
- [Chat Message Pattern Matchers](https://awesome-repositories.com/f/artificial-intelligence-ml/pattern-matching-engines/chat-message-pattern-matchers.md) — Evaluates incoming messages against registered patterns or keywords to trigger corresponding bot responses.
- [Conversation Flow Design](https://awesome-repositories.com/f/artificial-intelligence-ml/conversation-state-management/conversation-flow-design.md) — Designs multi-turn dialogues that track user state and guide conversations through predefined steps or decision trees.
- [Multi-Turn Flow Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/conversation-state-management/conversation-flow-design/dialog-flow-engines/multi-turn-flow-managers.md) — Guides users through multi-turn dialogues by tracking state and following predefined conversation steps. ([source](https://slack.botman.io/))

### Networking & Communication

- [Cross-Platform](https://awesome-repositories.com/f/networking-communication/chat-bots/cross-platform.md) — Builds a single bot that listens and replies across multiple messaging platforms from one codebase. ([source](https://cdn.jsdelivr.net/gh/botman/botman@main/README.md))
- [Chat Message Capture Pipelines](https://awesome-repositories.com/f/networking-communication/in-process-message-routing/chat-message-capture-pipelines.md) — Receives and routes incoming messages from chat platforms into a unified processing pipeline for the bot logic.
- [Chat Message Capturers](https://awesome-repositories.com/f/networking-communication/incoming-message-processors/chat-message-capturers.md) — Captures incoming messages from a chat platform and routes them to the bot's logic for processing. ([source](https://slack.botman.io/))
- [Chat Message Routers](https://awesome-repositories.com/f/networking-communication/incoming-message-processors/chat-message-routers.md) — Processes messages from multiple chat platforms and sends them to the appropriate bot handler. ([source](https://botman.io/2.0/welcome))
- [Chat Message Sending APIs](https://awesome-repositories.com/f/networking-communication/messaging-api-integrations/chat-message-sending-apis.md) — Delivers text or rich-media messages to users through the configured chat platform. ([source](https://slack.botman.io/))
- [Media Replies](https://awesome-repositories.com/f/networking-communication/direct-message-replies/media-replies.md) — Responds to users with text, images, audio, video, or location data across supported messaging channels. ([source](https://botman.io/2.0/welcome))
- [Pattern-Triggered Message Replies](https://awesome-repositories.com/f/networking-communication/direct-message-replies/pattern-triggered-message-replies.md) — Matches incoming messages against defined patterns and triggers corresponding reply logic. ([source](https://cdn.jsdelivr.net/gh/botman/botman@main/README.md))

### Graphics & Multimedia

- [Chat Platform Driver Configurations](https://awesome-repositories.com/f/graphics-multimedia/nvidia-driver-configuration/chat-platform-driver-configurations.md) — Provides a central configuration-driven registry for selecting and swapping chat platform backends at runtime.

### Software Engineering & Architecture

- [Chat Platform Driver Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/cross-platform-abstractions/chat-platform-driver-abstractions.md) — Abstracts each chat platform behind a common driver interface for uniform message sending and receiving.
- [Event Driven Messaging](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-messaging.md) — Dispatches incoming messages as events through a central bus to decoupled handlers.
- [Bot](https://awesome-repositories.com/f/software-engineering-architecture/framework-agnostic-interfaces/bot.md) — Adds chatbot capabilities to any PHP application without being tied to a specific framework or architecture.

### User Interface & Experience

- [Messaging Platform Adapters](https://awesome-repositories.com/f/user-interface-experience/extensible-interfaces/messaging-platform-adapters.md) — Abstracts each chat platform behind a common driver interface for uniform message handling.
- [Conversation State Machines](https://awesome-repositories.com/f/user-interface-experience/interaction-state-machines/conversation-state-machines.md) — Implements a finite state machine that maintains per-user conversation state across multi-turn dialogues.

### Web Development

- [Middleware Architectures](https://awesome-repositories.com/f/web-development/middleware-architectures.md) — Processes incoming messages through a chain of middleware classes that can inspect or modify message flow.

### Part of an Awesome List

- [General Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/general-utilities.md) — Framework-agnostic library for building chatbots.
