Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Botman Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. BotMan is a substitutable edge layer, not core domain logic. It gives us a driver abstraction (Slack, Telegram, Messenger, Web, others), multi-turn conversation state, a middleware pipeline, and rich message types. That is the undifferentiated 80% of any bot. It belongs behind an adapter interface (BotMessenger::notify() / ask()), so replacing it later is a class swap rather than a grep-and-refactor. It should not be allowed to sit in the middle of the main Laravel application.

Integration feasibility. High for a PHP shop. botman/botman auto-discovers BotManServiceProvider and the BotMan facade; integration is a published config, credentials per driver under config/botman/, and one webhook route with a CSRF exception. Time to first reply is measured in days, and the effort sits in platform app registration and public HTTPS ingress, not in the package. Multi-turn state rides on Laravel's cache, which is free if we already run Redis and a liability if we do not.

Technical risk. This is the deciding factor. 2.6.1 (Sept 2020) is a compatibility patch topping out at Laravel 7/8 — both end-of-life. Composer will refuse to resolve on Laravel 9/10/11; forcing it surfaces PHP 8 deprecation breakage at runtime. Driver decay is the real production risk: Telegram secret-token verification, Messenger/WhatsApp payload and auth changes, Teams, and WeChat have all moved since 2020, and HipChat is dead. Deliveries are not deduplicated. Exceptions can degrade into silent non-responses while health checks stay green. With zero recorded dependents, we would be among the few production users — we find the bugs. The package's 42.9 score and 3.2 opportunity rating are consistent with that picture, and the source ticket's mpociot/botman name is the abandoned pre-rename identity; anyone running that composer line gets an old, painful resolution.

Key questions.

  • What Laravel version is the target app on today, and committed for the next 12 months?
  • Is the bot an isolated deployable (an L8 pin is then acceptable) or inside the monolith (it caps our framework upgrade)?
  • Which channels are actually in scope, and have their APIs changed materially since 2020?
  • Who is the named internal owner, and what is the fork/replace trigger date?
  • Is the first release internal-only or customer-facing with an availability/security expectation?
  • Does the use case require LLM-native conversation tooling that a 2020-era package cannot model?

Integration Approach

Stack fit. PHP/Laravel, same runtime, same team. This is a staffing decision as much as a technical one — no Node/Python bot specialist required, the existing Laravel team owns the bot end to end.

Migration path. Greenfield: pin ^2.6, keep a tested lockfile, and deploy the bot as an isolated service behind the BotMessenger adapter. Existing Laravel 9/10/11 apps: do not force resolution — either isolate the bot or fork under MIT. Do not mix a Laravel upgrade with a BotMan change; if something breaks, we won't know which side caused it.

Compatibility. Treat BotMan Studio as scaffolding and local harness tooling only; the /botman/chat widget must be gated or stripped from the production route file. Drivers cover the common cases, but the escape hatch is $bot->getMessage()->getPayload() for platform features the 2020 drivers don't model. Verify webhook signatures in our own route middleware, before BotMan sees the request, and fail closed.

Sequencing.

  1. Internal Slack or Telegram ops bot first — lowest blast radius, no customer SLA, and it exercises credentials, webhook verification, and outbound sends.
  2. Shared cache (Redis/DB) and serialization hygiene — store IDs, never Eloquent models, closures, or resources in conversation state.
  3. Middleware for logging, auth/allow-listing, rate limiting, tenant resolution, and signature validation on received/heard/sending.
  4. A second channel to actually prove the driver abstraction rather than assume it.
  5. An explicit prototype-to-production gate with engineering sign-off before anything customer-facing inherits an SLA.

Operational Impact

Maintenance. Self-support is the operating model, not a footnote. A named owner absorbs upgrades, security review, and possibly a fork. Budget a quarterly audit of each in-scope driver against the platform's current changelog.

Support. Community only, no vendor path. MIT makes forking legal, not free — assume we inherit the maintenance burden the day we ship.

Scaling. Conversation state must live in a shared cache. Local file cache breaks horizontally the moment a second worker exists: dialogues jump servers and go incoherent. TTL matters — the default is tens of minutes, so long onboarding flows silently restart, and eviction under memory pressure looks identical to a user abandoning the flow. Raise it deliberately. Proactive/outbound sends need an explicit driver and should be wrapped in an internal Notifier service so callers never touch the facade from queued jobs or schedulers.

Failure modes. The 419-on-CSRF webhook is the most common production failure. Platform retries are normal, not exceptional — without dedupe keyed on platform message ID we send duplicate replies and double-charge side effects. Rotated credentials that "didn't take" are almost always cached config (config:clear). A throwing handler or middleware can present as a healthy service returning nothing; log inside every middleware and give the fallback an error-reporting path. Non-serializable conversation properties fail on the next message, which is a miserable debugging experience. And an unauthenticated Studio widget endpoint in production is an open door.

Ramp-up. A Laravel developer reaches a working internal bot in days. The real investment is around the package, not in it: app registration, public HTTPS ingress, signature verification, conversation design, cache hygiene, and the ownership commitment. The decision to carry an exit criterion on the roadmap — "if no maintained Laravel 9+ path by , replace behind the adapter" — should be made now, on evidence, rather than discovered mid-upgrade.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource