Platforms#

An agent has to interact with the users through some communication channel. BAF’s platforms wrap all the necessary code to build the connection between the agent and a communication channel.

All platforms implement the abstract class Platform. It defines the methods any platform must have. So, if you would like to create your own platform (and contribute to the BAF development 🙂), it must implement them according to the platform needs:

  • initialize(): Initialize the platform. It is called internally when you run the agent (Agent.run()). You may need to set some things previously to the platform execution.

  • start(): Start the platform execution. It is called internally when you run the agent (Agent.run()).

  • stop(): Stop the platform. It is called internally when you stop the agent (Agent.stop()).

  • _send(): Send a payload (usually a message) to the user. This is a private method. It is called internally by other platform methods, such as the following one.

  • reply(): Send a textual message to the user.

Additionally, a platform could have specific methods for it, as you can see in our implemented platforms.

Table of contents#