Skip to main content

executeTaskWithAgent

plugin.task.executeTaskWithAgent(taskId: string, agentId: string): Promise<object>

Executes a task with a specific agent. Assigns the agent and then starts the task.

Parameters

ParameterTypeRequiredDescription
taskIdstringYesThe task ID
agentIdstringYesThe agent ID

Returns

Promise<object>

Example

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

const result = await plugin.task.executeTaskWithAgent('taskId', 'agentId');
console.log(result);