Skip to main content

createThreadInBackground

plugin.thread.createThreadInBackground(options: object): Promise<object | object>

Creates a thread in the background and resolves when the agent starts or fails.

Parameters

ParameterTypeRequiredDescription
optionsobjectYesThe thread creation and start parameters

Returns

Promise<object | object> — A promise that resolves with ThreadAgentStarted or ThreadAgentStartFailed response

Example

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

const result = await plugin.thread.createThreadInBackground(/* object */);
console.log(result);