Activate Agent for Widget
ethora-agents-activate-v2Activate an agent as the default widget bot for an app, enabling the embedded widget to answer website visitors. Requires prior agent invitation to a room.
Instructions
Make an agent the app's ACTIVE widget bot: sets App.defaultBotInstanceId (and botStatus: on), which is what POST /v2/widget/sessions uses to decide who answers website visitors. Required before an embedded widget can answer on an API-created app. Preconditions: the agent was invited into a room of this app with ethora-agent-invite-to-chat (that creates its bot instance). Works in user auth (app update route); falls back to the app-token /v2/agents/:id/activate route when an appToken is stored.
Requires: an agent already invited into a room of the selected app (ethora-agents-create-v2 -> ethora-app-create-chat -> ethora-agent-invite-to-chat); the invite creates the bot instance this tool binds as the app's default responder.
Auth: user session (owner of the app). Errors: 404 no bot instance for this agent in the app (invite first); 403 not the app owner. Related: ethora-widget-embed-snippet next, ethora-bot-instances-list to inspect.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | No | App to activate the agent for. Defaults to the app from `ethora-app-select`. | |
| agentId | No | Id (or address) of the agent to activate. Get it from `ethora-agents-list-v2` / `ethora-agents-create-v2`. | |
| chatJid | No | Room JID `${appId}_${chatId}` (with or without `@conference...`) that becomes the widget chat. Required for API-created apps; omit only for dashboard-created apps that already have an AI Widget chat bound. | |
| agentIdOrAddress | No | Alias for `agentId` - either name is accepted, pass whichever you have. |