Start task (async)
client.agent.tasks.start(TaskStartParams { instruction, agent_icon, agent_type, 24 more } body, RequestOptionsoptions?): TaskStartResponse { status, task_id, idempotency_key, reused }
POST/agent/tasks
Starts an agent task and returns a task_id immediately.
Parameters
Returns
Start task (async)
import Lightcone from '@tzafon/lightcone';
const client = new Lightcone({
apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted
});
const response = await client.agent.tasks.start({ instruction: 'instruction' });
console.log(response.task_id);{
"status": "status",
"task_id": "task_id",
"idempotency_key": "idempotency_key",
"reused": true
}Returns Examples
{
"status": "status",
"task_id": "task_id",
"idempotency_key": "idempotency_key",
"reused": true
}