# Chatbot

::references
  :::ref-guide{link="/docs/guides/validation" title="Validation"}
  :::

  :::ref-example{link="/examples/customization/react" title="Customization"}
  :::

  :::ref-example{link="/examples/processing/hybrid-engine" title="Hybrid"}
  :::
::

This is a simple demonstration of a chatbot whose behavior is programmed using a visual editor. In this implementation, all elements are customized, including animated connections. The chat window is presented as a separate node that can be moved only using special handles at the bottom and top. A dataflow and control flow-based engine is used to process the graph. There is also validation of connections by checking socket compatibility.

::kit
::

::example{#rete-js-v2-chatbot-programming-nok9iq module="/src/editor.ts"}
::

`DataflowEngine` and `ControlFlowEngine` are being used here, just like in the [Hybrid engine](https://retejs.org/examples/processing/hybrid-engine) example.

Validation of connections carried out by extending `ClassicPreset.Socket` and including a corresponding method that takes in another socket as an argument and checks for compatibility. If the sockets are incompatible, a message is displayed and the connection is not added.