Long Running Tasks

Often, when invoking an action, the AI assistant expects a response within a very short time (typically the timeout is around 10 seconds, although many AI providers allow this to be configured). However, some robotics tasks—such as those involving robot motion—require significantly more time to complete.

To support long-running tasks, you can use the return message function at the beginning of your action to immediately send an acknowledgment (for example, “Task started”), and then continue with the actual action implementation in your code. This approach allows the AI assistant to receive an immediate response while the robot continues executing the task asynchronously.

Optionally, you can also implement a separate action that allows the user to query the task status and receive updates on its progress.

If you want to provide the task status action:

  • You can store the task status / progress into an installation variable.

  • Set the action scope as Background to use the action while the primary one is running.

Action to start the long running task
Action to get the task status

Last updated