2026-07-16 18:13:34 +08:00
<!-- Generated by scripts/gen-website-api.ts — do not edit by hand. Run `pnpm run gen-website-api` to regenerate. -->
# ctx.workflows
`WorkflowService` (abstract seam) — provided by `@deepseek-ai/dsh-workflow` .
2026-07-16 21:36:43 +08:00
Workflow execution seam. Invalid requests throw before publication; a live run is holder-owned, its result never rejects, cancellation and disposal are bounded, and disposal waits for child cleanup within that bound. Lifecycle listener failures are contained, and `workflow/end` fires exactly once as the result settles.
2026-07-16 18:13:34 +08:00
2026-07-16 21:36:43 +08:00
[Source ](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/workflow/workflow/src/index.ts#L159 )
2026-07-16 18:13:34 +08:00
### ctx.workflows.start(request)
```ts website-api
2026-07-19 14:14:02 +08:00
/**
* Parse and execute a workflow script.
* @param request - the script, its ` args`, the parent agent, and an
* optional cancel signal.
* @returns the live run; its ` result` resolves when the script settles.
*/
2026-07-16 18:13:34 +08:00
abstract start(request: WorkflowStartRequest): WorkflowRun
` ``
Parse and execute a workflow script.
- ` request` — the script, its ` args`, the parent agent, and an optional cancel signal.
**Returns** the live run; its ` result` resolves when the script settles.
2026-07-16 21:36:43 +08:00
[Source ](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/workflow/workflow/src/index.ts#L170 )