Skip to main content

onReply

plugin.gateway.onReply(callback: Function): void

Register a callback for agent replies. When an agent sends a response on a gateway-managed thread, the server pushes a gateway.reply message which triggers this callback.

Parameters​

ParameterTypeRequiredDescription
callbackFunctionYesCalled with the reply text and externalThreadId

Returns​

void

Example​

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.gateway.onReply(/* Function */);
console.log(result);