Skip to main content

WorkflowsResource

Bases: object Full CRUD access to Modus workflows. mgmt.workflows.list() → Page[Agent] mgmt.workflows.get(workflow_id) → Agent (with variation fields) mgmt.workflows.create(name, type) → Agent mgmt.workflows.update(workflow_id, ..) → Agent mgmt.workflows.deploy(workflow_id) → Agent mgmt.workflows.delete(workflow_id) → None

list()

List all Modus workflows in the organisation.
  • Parameters:
    • page_size – Maximum number of items to return (default 25).
    • page_token – Token from a previous page’s next_page_token; omit for the first page.
    • 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()

Retrieve a Modus workflow with full configuration.

interfaces()

Return the interfaces sub-resource scoped to workflow_id.

create()

Create a new Modus workflow.
  • Parameters:
    • name – Display name for the workflow.
    • type"task" for single-step skill orchestration, or "workflow" for a multi-step graph.
    • guardrails – Runtime guardrail labels (for example "no-pii"). When set, the workflow is created with these labels under the organisation default sharing rules. Omit (None) to create with no guardrails. ACL fields cannot be set from the SDK.

update()

Update a Modus workflow’s configuration. Only the fields you pass are changed. To clear a field, name it in update_mask (a comma-separated list of field names) and leave its argument unset — the server sets each masked field to null and leaves fields not named in the mask untouched.
  • Parameters: guardrails – Runtime guardrail labels to set on the workflow. Fetches the current workflow first and merges these labels into its access configuration (an extra get request). Omit (None) to leave guardrails unchanged. Pass [] to clear all guardrails.

deploy()

Publish the current draft of a Modus workflow.
  • Parameters: workflow_id – Workflow to publish.
  • Returns: The workflow with its newly published configuration.

toggle()

Enable or disable a workflow.

delete()

Delete a Modus workflow.
  • Parameters: workflow_id – Workflow to remove.

request_ownership_transfer()

Start transferring ownership of a workflow to another organisation member.

cancel_ownership_transfer()

Cancel a pending workflow ownership transfer.

accept_ownership_transfer()

Accept a pending workflow ownership transfer.

restore()

Restore a deleted workflow.

AsyncWorkflowsResource

Bases: object

list()

List all Modus workflows in the organisation.
  • Parameters:
    • page_size – Maximum number of items to return (default 25).
    • page_token – Token from a previous page’s next_page_token; omit for the first page.
    • 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()

Retrieve a Modus workflow with full configuration.

interfaces()

Return the interfaces sub-resource scoped to workflow_id.

create()

Create a new Modus workflow.
  • Parameters:
    • name – Display name for the workflow.
    • type"task" for single-step skill orchestration, or "workflow" for a multi-step graph.
    • guardrails – Runtime guardrail labels (for example "no-pii"). When set, the workflow is created with these labels under the organisation default sharing rules. Omit (None) to create with no guardrails. ACL fields cannot be set from the SDK.

update()

Update a Modus workflow’s configuration. Only the fields you pass are changed. To clear a field, name it in update_mask (a comma-separated list of field names) and leave its argument unset — the server sets each masked field to null and leaves fields not named in the mask untouched.
  • Parameters: guardrails – Runtime guardrail labels to set on the workflow. Fetches the current workflow first and merges these labels into its access configuration (an extra get request). Omit (None) to leave guardrails unchanged. Pass [] to clear all guardrails.

deploy()

Publish the current draft of a Modus workflow. See the sync deploy for argument details.

toggle()

Enable or disable a workflow. See the sync toggle for argument details.

delete()

Delete a Modus workflow. See the sync delete for argument details.

request_ownership_transfer()

Start transferring ownership of a workflow to another organisation member.

cancel_ownership_transfer()

Cancel a pending workflow ownership transfer.

accept_ownership_transfer()

Accept a pending workflow ownership transfer.

restore()

Restore a deleted workflow.

WorkflowInterfacesResource

Bases: object

list()

List interfaces attached to this workflow.

create()

Add an interface to this workflow.
  • Parameters: interface – Interface configuration to attach, as a DTO or plain mapping.

update()

Update an interface attached to this workflow.

delete()

Delete an interface from this workflow.

delete_all()

Delete every interface from this workflow.

AsyncWorkflowInterfacesResource

Bases: object

list()

List interfaces attached to this workflow.

create()

Add an interface to this workflow.
  • Parameters: interface – Interface configuration to attach, as a DTO or plain mapping.

update()

Update an interface attached to this workflow.
  • Parameters:
    • interface_id – Identifier of the interface to update.
    • interface – Updated interface values.
    • update_mask – Optional comma-separated list of fields to update.

delete()

Delete an interface from this workflow.
  • Parameters: interface_id – Identifier of the interface to delete.

delete_all()

Delete every interface from this workflow.