PHPackages                             serpentine/serpentine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. serpentine/serpentine

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

serpentine/serpentine
=====================

Intellectual bot creation platform for PHP 8

0.3.0(4y ago)1141GPL-3.0-or-laterPHPPHP &gt;=8.0

Since Aug 24Pushed 4y agoCompare

[ Source](https://github.com/serpentine-ai/serpentine)[ Packagist](https://packagist.org/packages/serpentine/serpentine)[ Docs](https://github.com/serpentine-ai/serpentine)[ RSS](/packages/serpentine-serpentine/feed)WikiDiscussions main Synced 5d ago

READMEChangelogDependencies (2)Versions (4)Used By (1)

🚀 Serpentine
============

[](#-serpentine)

**Serpentine** is a platform to create an intellectual bot on in PHP 8

Installation
------------

[](#installation)

```
composer require serpentine/serpentine

```

Brief info
----------

[](#brief-info)

This package provides only foundation for your bot system. It realizes a lot of interfaces, basic `Serpentine` class and the machine learning model - [CATI Tree](https://github.com/krypt0nn/cati-tree)

That means that you can't just *use* this project. You should *extend* it, install or create other modules and build ***your own*** bot with native language commands understanding

More information you can see inside the code or in the Serpentine packages

[![](https://camo.githubusercontent.com/ed45222f62488722e71033343e8efb0bcedf92fa1c8742b14fd287d22d36ad37/68747470733a2f2f692e6962622e636f2f776438505439512f556e7469746c65642d4469616772616d2e706e67)](https://camo.githubusercontent.com/ed45222f62488722e71033343e8efb0bcedf92fa1c8742b14fd287d22d36ad37/68747470733a2f2f692e6962622e636f2f776438505439512f556e7469746c65642d4469616772616d2e706e67)

This is how Serpentine looks inside

The first thing you meet is `IO` objects. This objects realizes functionality to work with user input and output. For example, `Telegram IO` will realize methods to get new messages from telegram user and send answers back

After `IO` receives a message - this will be applied to every `InputHandler`. These callbacks will do they stuff and if it needs - disallow new message being processed

If all the input handlers will allow the message to be processed - then this message will be applied to the `ContextIdentifier`s. These ones will try to parse some useful info from the message text like dates and times

After that, action predictor (CATI Tree model) will try to find the `Action` for this message and if it found - then it will be executed

Example
-------

[](#example)

```
