Skip to main content

Methods

active()

List active conversation runs across the organization.

Parameters

{ pageSize: number; pageToken: string }

Returns

Promise<Page<ActiveConversationRun>> A page of active runs with session and status metadata.

activeBySession()

Look up active runs for specific conversation sessions.

Parameters

readonly string[]
required
Up to 100 session ids.

Returns

Promise<ActiveConversationRun[]> Active runs matching any of the given sessions.

cancel()

Cancel a run that is still in progress.

Parameters

string
required
Run id to cancel.

Returns

Promise<void>

create()

Start a workflow run and stream run events.

Parameters

string | number
required
Workflow id or slug to run.
object
required
Run body (message, optional sessionId, optional version as published or draft).
{ idempotencyKey: string }

Returns

AgentRunStream A stream of run events (tokens, completion, errors, and related signals).

createModus()

Start a Modus assistant run and stream run events.

Parameters

object
required
Run body (message, optional sessionId, optional subordinateSkillIds to narrow context).
{ idempotencyKey: string }

Returns

AgentRunStream A stream of run events.

createScope()

Start a scope run and stream run events.

Parameters

string | number
required
Scope id to run.
object
required
Run body (message, optional sessionId, optional version as published or draft).
{ idempotencyKey: string }

Returns

AgentRunStream A stream of run events.

editQueued()

Move a queued run back into an editable state before it starts.

Parameters

string
required
Queued run id.

Returns

Promise<void>

events()

Fetch stored run events for a run.

Parameters

string
required
Run id.

Returns

Promise<unknown> Run event history for replay or inspection.

get()

Retrieve a workflow run by id.

Parameters

string | number
required
Workflow id or slug the run belongs to.
string
required
Run id.
{ temporalRunId: string }

Returns

Promise<object> Run details including status and output.

interrupt()

Request a graceful stop for a running execution.

Parameters

string
required
Run id to interrupt.

Returns

Promise<void>

list()

List runs for a workflow.

Parameters

string | number
required
Workflow id or slug.

Returns

Promise<Page<object>> A page of run summaries.

resume()

Resume an interrupted run and stream run events.

Parameters

string
required
Run id to resume.
object
required
Resume body (message, sessionId, and decision: approve / deny / connected / cancelled).
{ idempotencyKey: string }

Returns

AgentRunStream A stream of run events.

stream()

Reconnect to an in-progress run and stream run events.

Parameters

string
required
Run id to follow.
{ lastEventId: string }

Returns

AgentRunStream A stream of run events from the current execution point.