For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
BlogLog InRequest Demo
HomeProductDevelopersSelf-HostingChangelog
HomeProductDevelopersSelf-HostingChangelog
  • Getting Started
    • Overview
  • Workflows SDK
    • Introduction
    • Installation
    • Core Concepts
    • Defining Control Flow
    • Configuration
    • Custom Docker Images
      • Displayable Nodes
        • Agent Node
        • Inline Prompt Node
        • Inline Subworkflow Node
        • Prompt Deployment Node
        • Search Node
        • Subworkflow Deployment Node
        • API Node
        • Code Execution Node
        • Templating Node
        • Guardrail Node
        • Map Node
        • Conditional Node
        • Merge Node
        • Error Node
        • Final Output Node
      • Datasets
      • CLI
  • Client SDK
    • Introduction
    • Authentication
    • API Versioning
LogoLogo
BlogLog InRequest Demo
Workflows SDKAPI ReferenceDisplayable Nodes

Subworkflow Deployment Node

Example Usage
1from vellum import ChatMessage, WorkflowExpandMetaRequest
2from vellum.workflows.nodes import SubworkflowDeploymentNode
3
4class MySubworkflowNode(SubworkflowDeploymentNode):
5 deployment = "customer_support_workflow" # or UUID("...")
6 subworkflow_inputs = {
7 "user_query": "How do I reset my password?",
8 "chat_history": [
9 ChatMessage(role="USER", text="Hi there"),
10 ChatMessage(role="ASSISTANT", text="Hello! How can I help?")
11 ],
12 "user_metadata": {
13 "user_id": "123",
14 "account_type": "premium"
15 },
16 "priority_score": 0.8
17 }
18 release_tag = "production"
19 external_id = "support-ticket-456"
20 expand_meta = WorkflowExpandMetaRequest(
21 include_inputs=True,
22 include_outputs=True
23 )
24 metadata = {
25 "source": "mobile_app",
26 "region": "us-west"
27 }
1# Outputs are streamed as they're generated by the workflow
2for output in node.run():
3 if output.is_streaming:
4 print(f"Received partial output for {output.name}: {output.delta}")
5 elif output.is_fulfilled:
6 print(f"Received final output for {output.name}: {output.value}")
Was this page helpful?
Previous

API Node

Next
Built with

vellum.workflows.nodes.SubworkflowDeploymentNode

Used to execute a deployed Workflow as a subworkflow within another workflow. This allows you to compose workflows from other deployed workflows.

Attributes

deployment
Union[UUID, str]Required

Either the Workflow Deployment’s UUID or its name

subworkflow_inputs
Dict[str, Any]Required

The inputs for the Subworkflow. Supports:

  • Strings
  • Numbers (float)
  • Chat History (List[ChatMessage])
  • JSON objects (Dict[str, Any])
release_tag
strDefaults to LATEST

The release tag to use for the Workflow Execution

external_id
Optional[str]

The external ID to use for the Workflow Execution

expand_meta
Optional[WorkflowExpandMetaRequest]

An optionally specified configuration used to opt in to including additional metadata about this workflow execution in the API response. Corresponding values will be returned under the execution_meta key within NODE events in the response stream. See Execute Workflow: Expand Meta.

metadata
Optional[Dict[str, Optional[Any]]]

The metadata to use for the Workflow Execution

request_options
Optional[RequestOptions]

The request options to use for the Workflow Execution

Outputs

The outputs of this node are determined by the outputs defined in the deployed workflow. Each output from the workflow will be streamed through this node.