{"id":36333939,"url":"https://github.com/dldl/chatbot-platform","last_synced_at":"2026-01-11T12:02:55.123Z","repository":{"id":56970024,"uuid":"96516891","full_name":"dldl/chatbot-platform","owner":"dldl","description":"Chatbot platform allowing to connect any chat solution to any service provider.","archived":false,"fork":false,"pushed_at":"2017-09-04T09:11:48.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-27T22:06:50.248Z","etag":null,"topics":["chatbots","php","php-library"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/dldl/chatbot-platform","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dldl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-07T08:25:49.000Z","updated_at":"2017-07-07T21:42:24.000Z","dependencies_parsed_at":"2022-08-21T06:40:19.995Z","dependency_job_id":null,"html_url":"https://github.com/dldl/chatbot-platform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dldl/chatbot-platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldl%2Fchatbot-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldl%2Fchatbot-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldl%2Fchatbot-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldl%2Fchatbot-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dldl","download_url":"https://codeload.github.com/dldl/chatbot-platform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldl%2Fchatbot-platform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28302073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbots","php","php-library"],"created_at":"2026-01-11T12:02:55.050Z","updated_at":"2026-01-11T12:02:55.117Z","avatar_url":"https://github.com/dldl.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatbotPlatform\n\n[![Build Status](https://travis-ci.org/dldl/chatbot-platform.svg?branch=master)](https://travis-ci.org/dldl/chatbot-platform)\n\n**This platform is not heavy tested and is a proof-of-concept.** Any contributions are welcomed.\n\nChatbotPlatform is a PHP library allowing to build a multiple chatbot platform with multiple\nactions providers and multiple sources.\n\nThe current implementation allows basic Ajax interactions or Facebook Messenger discussions. It can be extended easily.\n\n## Installation\n\nInstall the library using Composer:\n\n```sh\ncomposer require dldl/chatbot-platform\n```\n\n## Basic usage\n\nChatbotPlatform may be used as a standalone project or integrated into existing applications\nusing any framework or CMS.\n\nFor a basic standalone usage, create an `index.php` file with the following code:\n\n```php\n\u003c?php\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Dotenv\\Dotenv;\nuse dLdL\\ChatbotPlatform\\ChatbotPlatform;\nuse dLdL\\ChatbotPlatform\\Handler\\FacebookMessageHandler;\nuse dLdL\\ChatbotPlatform\\Handler\\AjaxMessageHandler;\nuse dLdL\\ChatbotPlatform\\Action\\RepeatMessageAction;\nuse dLdL\\ChatbotPlatform\\Action\\APIAIAction;\n\nrequire __DIR__.'/vendor/autoload.php';\n\n(new Dotenv())-\u003eload(__DIR__.'/.env'); // Requires a .env file at project root to load configuration (see an example on .env.dist file)\n\n$request = Request::createFromGlobals();\n$chatbotPlatform = new ChatbotPlatform([\n    new FacebookMessageHandler(), // Enables discussion through Facebook messenger (configuration required in .env file)\n    new AjaxMessageHandler(), // Enables discussion through basic HTTP requests\n], [\n    [new APIAIAction(), 10], // Enables API.AI support (configuration required in .env file)\n    new RepeatMessageAction(), // Enables a bot repeating anything you said (useful for testing)\n]);\n\n$response = $chatbotPlatform-\u003ehandleRequest($request);\n$response-\u003esend();\n```\n\nAs you can see, you may pass an action instance or an array with the action instance and the priority it should hold.\n\nYou can then start a server redirecting to this file, and send requests from `Facebook` or an\n`Ajax` script.\n\nFor `Facebook` usage, please refer to [Facebook developers](https://developers.facebook.com/docs/messenger-platform) documentation.\nFor `Ajax` support, you must send *POST* requests to your server with the following body:\n\n```json\n{\n\t\"message\": \"Hello world!\",\n\t\"sender\": \"sender-id\",\n\t\"recipient\": \"recipient-id\",\n\t\"discussion_id\": \"12345\"\n}\n```\n\nReply will be returned immediately. Asynchronous replies are also supported using tags. Enable the `AsynchronousMessageAction` and add\nto your body a `tags: ['ASYNC_GET']` or `tags: ['ASYNC_SAVE']` to get or save a message. Messages are removed from the SQLite database\nwhen read. This can be used with your own actions to append the required tag to the message when needed.\n\n## Provided features\n\nChatbotPlatform can be easily extended. It provides by default some message handlers and action providers.\n\nSee `ChatbotPlatform/Handler` for available message handlers. See `ChatbotPlatform/Action` for available actions.\n\n## Extensibility\n\nYou may add your own message handlers by implementing the `MessageHandlerInterface` and providing them to the `ChatbotPlatform`\ninstance.\n\nYou should also add your own actions by implementing the `MessageActionInterface` to perform custom actions when a message\nis received (e.g. generating a reply or delegating the task to any external API).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdldl%2Fchatbot-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdldl%2Fchatbot-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdldl%2Fchatbot-platform/lists"}