Skip to main content

OpenAI bots

caution

Virtual agents are currently in open beta. Bot active time is limited to 24 hours per month. Please contact us at [email protected] if you need more information or need a quota raise.

What are OpenAI bots?

OpenAI bots are powered by the GPT-4o engine. They can provide answers to questions, engage in conversations, and provide information. They can understand their environment and interact with it. They can speak in multiple languages and can even be used as a translator.

Configuring your bot

Connect to your WorkAdventure room.

Click on the menu icon (the coffee cup), and then click on "Bots" menu item:

The list of bots

Click on the "Create new bot" button:

The bot creation form

You can give the bot any name and choose any avatar you like (please note that since your bot has a "Bot" tag, it can select any Woka avatar that is reserved for bots).

Select "OpenAI" as the bot type.

An OpenAI bot requires 2 prompts.

  • The chat prompt is the prompt that will be used to generate the bot's answers. Use this prompt to explain to the bot who it is, what it is supposed to do, and how it should behave.
  • The move prompt is the prompt that will be used to generate the bot's movements. This prompt is regularly called when someone walks on the map. The bot knows the difference between "visitors" (anonymous users) and "coworkers" (users that are logged in and part of the "members" of the world). You can therefore tell the bot (for instance) to welcome visitors in priority.

Done? Save the bot.

You can now start the bot using the "Start" button.

Be patient

When you start the bot, a headless browser containing the bot starts on the WorkAdventure servers. It will take between 1 and 2 minutes for the bot to be fully operational. If the servers need to scale, it could take as long as 10 minutes.

Your bot capabilities

Any OpenAI bot has the following capabilities:

Short term memory

The bot can remember the last discussion it has with you.

Searching the "members" database

The bot can search the "members" database to find information about its coworkers.

For instance, if asked "who is John?", the bot will search the "members" database for a coworker named "John". This can be very useful if users fill their profile with information about themselves.

tip

Fill as much information as possible in your profile to help the bot provide more accurate answers. The 'information' field is particularly useful for the bot.

Sending e-mail messages

The bot can send e-mails to its coworkers (and only to its coworkers).

Reading the map

The bot can understand a textual representation of the map. This textual representation should be stored in the Tiled map (the TMJ file).

In order to create such a representation, in Tiled:

  • Create a rectangular object on any "object layer" of your map
  • The object class must be "area"
  • The name of area must be descriptive. You can call it "Kitchen" or "Living room" for instance.
  • You must now add 2 properties to the object:
    • ai-zone: a boolean property that tells the bot that this area is a zone where it can go
    • description: a description of the area

The Tiled map with an area readable by OpenAI

Guiding someone on the map

The bot can guide someone to a specific area on the map. In order to guide someone, the bot must know the name of the area where it should guide the user. See the previous section to learn how to create such an area.

Ending a conversation

When the bot understands the conversation is over, it will walk away.

Saying nothing

One of the most important capabilities of the bot is to stay silent (!). Indeed, when in a conversation with several users, the bot must know when to speak and when to keep quiet. It will try to understand if the sentence is addressed to it and will only respond if it is.