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.


Last updated