Skip to contentSkip to navigationSkip to topbar
Page tools
Looking for more inspiration?Visit the

Control Worker Activities using TaskRouter.js: Introducing TaskRouter.js


TaskRouter.js is a JavaScript library that adds Worker Activity controls and event notifications to your web user interfaces.

TaskRouter.js provides methods for changing the Activity of a Worker. It also provides event callbacks that allow you to subscribe to important events and state changes on your Worker directly from a web-based client. Communication to the TaskRouter infrastructure is handled via a WebSocket connection managed by TaskRouter.js.

For details, refer to the TaskRouter.js SDK documentation.

In the next step, we'll add a real-time "Agent" user interface - a simplified web page that allows our Worker Alice to control her current Activity state, see when her Activity state has changed, and see information about new incoming calls.

Next: Add an Agent UI to our Project »