WorkflowsResource
object
Read access to Modus workflows.
client.workflows.list() → Page[Agent] client.workflows.get(workflow_id) → Agent
To create, update, or deploy workflows use modus.management.ModusManagement.
list()
-
Parameters:
- page_size – Items per page (default 25).
-
page_token – Opaque token from a previous page’s
next_page_token. - search – Case-insensitive substring filter on the workflow name.
-
type – Filter by workflow type:
"task"or"workflow". -
view – Variation view —
"active"(deployed) or"draft". - include_variation – Include variation payload on each list row.
get()
-
Parameters:
view – Variation view —
"active"(deployed) or"draft". - Raises: NotFoundError – if no workflow with this ID/slug exists.
chat_stream()
-
Parameters:
- workflow_id – Workflow ID or slug.
- message – The message to send.
-
model – Model to run this message with (required). One of the supported model IDs, e.g.
"claude-sonnet-5"or"gpt-5.5". - thread_id – Continue an existing conversation; omit to start a new one.
-
version – Run a specific variation —
"published"or"draft".
-
Returns:
ChatStream you can iterate for text chunks; the final result carries the
thread_id.
AsyncWorkflowsResource
object
Async read access to Modus workflows.
await client.workflows.list() → AsyncPage[Agent] await client.workflows.get(workflow_id) → Agent
To create, update, or deploy workflows use modus.management.ModusManagement.
list()
-
Parameters:
- page_size – Items per page (default 25).
-
page_token – Opaque token from a previous page’s
next_page_token. - search – Case-insensitive substring filter on the workflow name.
-
type – Filter by workflow type:
"task"or"workflow". -
view – Variation view —
"active"(deployed) or"draft". - include_variation – Include variation payload on each list row.
get()
-
Parameters:
view – Variation view —
"active"(deployed) or"draft". - Raises: NotFoundError – if no workflow with this ID/slug exists.
chat_stream()
-
Parameters:
- workflow_id – Workflow ID or slug.
- message – The message to send.
-
model – Model to run this message with (required). One of the supported model IDs, e.g.
"claude-sonnet-5"or"gpt-5.5". - thread_id – Continue an existing conversation; omit to start a new one.
-
version – Run a specific variation —
"published"or"draft".
-
Returns:
AsyncChatStream you can iterate for text chunks; the final result carries the
thread_id.
WorkflowRunsResource
object
list()
-
Parameters:
- workflow_id – Workflow ID or slug.
- page_size – Maximum number of items to return (default 25, max 100).
-
page_token – Token from a previous page’s
next_page_token; omit for the first page. -
status – Filter by run status (e.g.
"running","awaiting_human","completed","error","cancelled","all_executions"). -
timeframe – Filter by time window (e.g.
"last_hour","last_day","last_week"). -
approval_scope – When
status="awaiting_human", scope to"mine"or"all". - search – Free-text search filter.
active()
-
Parameters:
- page_size – Maximum number of active runs to return (default 50, max 100).
-
page_token – Token from a previous page’s
next_page_token; omit for the first page.
active_by_session()
- Parameters: session_ids – Conversation thread ids to check; blanks and duplicates are ignored.
get()
-
Parameters:
- workflow_id – Modus workflow ID or slug.
- run_id – Run ID.
- temporal_run_id – Optional Temporal run ID when disambiguating.
create()
-
Parameters:
- workflow_id – Workflow ID or slug.
- body – Run request fields such as message, sessionId, config, and runId.
create_scope()
-
Parameters:
- scope_id – Scope ID or slug.
- body – Run request fields such as message, sessionId, config, and runId.
create_modus()
- Parameters: body – Run request fields such as message, sessionId, config, and runId.
resume()
-
Parameters:
- run_id – Run ID to resume.
- body – Resume request fields including the decision and message.
cancel()
-
Parameters:
- run_id – Run ID to cancel.
- body – Optional cancellation details.
interrupt()
-
Parameters:
- run_id – Run ID to interrupt.
- body – Optional interruption details.
edit_queued()
-
Parameters:
- run_id – Run ID to edit.
- body – Optional queued-run edit details.
events()
- Parameters: run_id – Run ID to follow.
stream()
- Parameters: run_id – Run ID to follow.
AsyncWorkflowRunsResource
object
list()
-
Parameters:
- workflow_id – Workflow ID or slug.
- page_size – Maximum number of items to return (default 25, max 100).
-
page_token – Token from a previous page’s
next_page_token; omit for the first page. -
status – Filter by run status (e.g.
"running","awaiting_human","completed","error","cancelled","all_executions"). -
timeframe – Filter by time window (e.g.
"last_hour","last_day","last_week"). -
approval_scope – When
status="awaiting_human", scope to"mine"or"all". - search – Free-text search filter.
active()
-
Parameters:
- page_size – Maximum number of active runs to return (default 50, max 100).
-
page_token – Token from a previous page’s
next_page_token; omit for the first page.
active_by_session()
- Parameters: session_ids – Conversation thread ids to check; blanks and duplicates are ignored.
get()
-
Parameters:
- workflow_id – Modus workflow ID or slug.
- run_id – Run ID.
- temporal_run_id – Optional Temporal run ID when disambiguating.
create()
-
Parameters:
- workflow_id – Workflow ID or slug.
- body – Run request fields such as message, sessionId, config, and runId.
create_scope()
-
Parameters:
- scope_id – Scope ID or slug.
- body – Run request fields such as message, sessionId, config, and runId.
create_modus()
- Parameters: body – Run request fields such as message, sessionId, config, and runId.
resume()
-
Parameters:
- run_id – Run ID to resume.
- body – Resume request fields including the decision and message.
cancel()
-
Parameters:
- run_id – Run ID to cancel.
- body – Optional cancellation details.
interrupt()
-
Parameters:
- run_id – Run ID to interrupt.
- body – Optional interruption details.
edit_queued()
-
Parameters:
- run_id – Run ID to edit.
- body – Optional queued-run edit details.
events()
- Parameters: run_id – Run ID to follow.
stream()
- Parameters: run_id – Run ID to follow.