mpociot/botman
BotMan is a framework-agnostic PHP chatbot library for building conversational bots across Slack, Telegram, Facebook Messenger, and more. It offers a fluent API, drivers, middleware, and conversation patterns to create interactive chat experiences in Laravel or any PHP app.
Build vs. buy on chatbot plumbing. BotMan already solves the undifferentiated ~80% of a messaging bot: a driver abstraction across Slack, Telegram, Facebook Messenger, Web, Nexmo and others; multi-turn, stateful conversation management; a middleware pipeline for logging, auth, rate limiting and tenant resolution; and rich message types (buttons, quick replies, attachments) that map to each platform's native format. With MIT licensing and ~6.1k stars, the "buy" side costs nothing in license fees — so the real decision is not license vs. build, it is adopt-and-own vs. going direct to each platform SDK. Frame it that way in the decision doc.
Channel roadmap and sequencing. Because bot logic is written once and mapped to drivers, you can commit to Slack first and add Telegram or Messenger later without re-architecting the conversation layer. That directly informs the supported-channel matrix and the order in which channels get promised to internal teams or customers. A channel commitment becomes "add a driver and credentials," not "start a new project."
Team and staffing model. This is PHP with first-class Laravel integration, meaning the existing Laravel team owns the bot end to end. That is a "we don't need a Node/Python bot specialist" decision as much as a technical one — material when headcount is the binding constraint and you'd otherwise be hiring into a new runtime for a single feature.
Scope and target use case for the first release. Best suited to internal tools, ops/alerting bots, onboarding flows, FAQ deflection and discovery prototypes: bounded dialogue trees, tolerant of downtime, where a broken driver is an annoyance rather than an incident. Customer-facing conversational products on a modern Laravel version are a separate, higher-bar decision with their own go/no-go.
Prototype-to-production gate. BotMan is a strong default for demos and pilots — days, not weeks, to a working flow — but promotion to a customer-facing SLA should be a distinct decision with engineering sign-off rather than a continuation of the same project by inertia. Bake this gate into the roadmap so pilots don't drift into production unexamined.
Framework upgrade planning. The latest release (2.6.1, September 2020) is a compatibility patch that tops out at Laravel 7 and 8 — both now end-of-life. This is an input to the platform upgrade plan, not a feature commitment, and it can cap the application's Laravel version if the package lands in the main codebase. The mitigation is architectural: keep the bot behind a thin adapter interface so it can run as an isolated deployable on a pinned framework, and treat "upgrade Laravel" and "change BotMan" as two separate releases so you can attribute breakage.
Exit risk carried explicitly on the roadmap. Last release ~5 years ago, community-only support, no verifiable dependent activity, and known driver decay (HipChat is dead; Telegram, Messenger, Slack and WeChat have all changed payloads, limits and auth flows since 2020). The roadmap should carry a named "own it, fork it, or replace it" line item with a trigger date and written exit criteria — e.g. "if there is no maintained Laravel 9+ path by , replace behind the adapter" — so that decision is made on evidence rather than discovered mid-upgrade. MIT makes forking legal, not free.
Risk allocation you should budget for, not discover. Webhook signature verification for newer platform mechanisms must be added yourself; BotMan does not dedupe platform retries, so idempotency keys on message IDs are your responsibility; and conversation state lives in the cache, which must be shared and serializable (Redis/DB, not local file) or multi-turn dialogues go incoherent the moment you run two workers. Each of these is a small, known line item — but only if it's in the plan.
Consider it when:
^2.6 with a tested lockfile and accept that framework compatibility will not advance unless you make it advance.Look elsewhere when:
To executives — one paragraph: BotMan is a free, MIT-licensed PHP framework that gets us a working, multi-channel messaging bot in days instead of a quarter, using the Laravel team we already have rather than new hires or a paid bot platform. It's the right call for internal, low-risk automation now — ops bots, onboarding, FAQ — where the payoff is fast and the downside is contained. The trade-off is honest: the project has been dormant since 2020 and doesn't support current Laravel versions, so we adopt it as owned infrastructure, not vendor-supported software — run it behind a small adapter, keep it off the main app's upgrade path, and set a dated trigger to fork or replace it. Total ask: one named owner, a quarterly dependency review, and a spike-sized budget for the adapter work. What we get back is a validated channel strategy and a working prototype before we commit real engineering to conversational product.
To engineering — the short version: BotMan gives us the driver abstraction, conversation state and middleware pipeline we'd otherwise build three times for Slack, Telegram and Messenger. It's framework-agnostic PHP; the Laravel integration gives us a facade, a webhook controller and cache-backed conversation state. Constraints to design around: pin ^2.6 and treat the framework version as fixed; register the webhook route with CSRF exempted; put signature verification in route middleware before BotMan sees the request and fail closed; add idempotency keys on platform message IDs because it doesn't dedupe retries; use Redis/DB for the conversation cache, and store IDs in conversation state — never Eloquent models, closures or resources, since state is serialized between turns. Treat Studio and the /botman/chat widget as dev tooling only and gate or strip it in production. Wrap the whole thing behind a BotMessenger interface so replacement is a class swap rather than a grep-and-refactor, and drive tests through a fake driver rather than HTTP so conversation branches are covered in CI.
How can I help you explore Laravel packages today?