> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# dispatch()

> **dispatch**(`task`): `Promise`\<[`HarnessRun`](/docs/agent-sdk/harness-sdk/harness/get#harnessrun) | `undefined`>

Execute one task emitted by `accept()` after validating its private harness envelope.

**Parameters**

| Parameter | Type |
| - | - |
| `task` | `Readonly`\<`Pick`\<`TaskRecord`, `"name"` \| `"payload"`>> |

**Returns**
`Promise`\<[`HarnessRun`](/docs/agent-sdk/harness-sdk/harness/get#harnessrun) | `undefined`>
