---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/taskrouter/quickstart/csharp/agent-ui-introducing#article
headline: "Control Worker Activities using TaskRouter.js: Introducing TaskRouter.js"
description: TaskRouter.js adds Worker Activity controls and real-time event notifications to your web user interface over a WebSocket connection.
url: https://www.twilio.com/docs/taskrouter/quickstart/csharp/agent-ui-introducing
inLanguage: en
dateModified: 2026-07-20T14:57:47.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

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

TaskRouter's TaskRouter.js library enables you to easily add 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 JavaScript SDK documentation](/docs/taskrouter/js-sdk).

In the next step, we'll add a realtime "Agent" user interface - a highly 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 »](/docs/taskrouter/quickstart/csharp/agent-ui-add-project)
