Skip to main content
Workflows are named session-backed surfaces registered on App.

app.workflow(...)

Arguments: The returned Workflow object registers handlers.

@workflow.ui()

Registers an optional launcher UI. The function must return cpsl.ui.WorkflowShell.
If no launcher UI is registered, the workflow opens a plain chat composer.

@workflow.start()

Registers the handler called when a workflow run starts.

@workflow.action(name)

Registers a named structured action.

@workflow.message()

Registers the freeform chat handler for an active workflow session.

WorkflowInput

WorkflowInput wraps submitted launcher or action data.
It behaves like a dict and also supports attribute access.

Launcher widgets

Workflow launcher UIs use the same cpsl.ui namespace. Common workflow widgets:

See also