Skip to main content

Documentation Index

Fetch the complete documentation index at: https://launchpad.datalumina.com/llms.txt

Use this file to discover all available pages before exploring further.

Now we’ll define an empty Workflow schema that serves as the container for your workflow logic. This is where you’ll specify which event schema to use and how nodes connect together.

Creating the Workflow Class

Your own workflows live in their own packages under app/launchpad/workflows/<name>/, with schema.py, workflow.py, and a nodes/ directory. The shipped reference workflows are grouped under app/launchpad/workflows/examples/ so it’s clear they’re demos you can replace — the quickstart lives at app/launchpad/workflows/examples/quickstart/workflow.py:
from launchpad.core.schema import WorkflowSchema, NodeConfig
from launchpad.core.workflow import Workflow
from launchpad.workflows.examples.quickstart.schema import CustomerCareEventSchema


class CustomerCareWorkflow(Workflow):
    workflow_schema = WorkflowSchema(
        description="",
        event_schema=CustomerCareEventSchema,
        start=...,
        nodes=[],
    )
At this point, the workflow is just a skeleton. We’ll add the actual node implementations and connections in the next steps.

Workflow Schema Components

  • description: A human-readable description of what the workflow does
  • event_schema: The Pydantic schema that defines the expected input data structure
  • start: The name of the first node to execute in the workflow
  • nodes: List of all nodes that will be part of this workflow

Registering the Workflow

To make your workflow available to the system, you need to register it in the WorkflowRegistry. Add a new entry to app/launchpad/workflows/workflow_registry.py. The Launchpad ships with five reference workflows under workflows/examples/ already registered:
from enum import Enum

from launchpad.workflows.examples.streaming.workflow import ExampleStreamingWorkflow
from launchpad.workflows.examples.quickstart.workflow import CustomerCareWorkflow
from launchpad.workflows.examples.langfuse_tracing.workflow import (
    LangfuseTracingWorkflow,
)
from launchpad.workflows.examples.nested_workflow.workflow import (
    NestedWorkflow,
)
from launchpad.workflows.examples.pgvector_rag.workflow import RagExampleWorkflow


class WorkflowRegistry(Enum):
    STREAMING = ExampleStreamingWorkflow
    QUICKSTART = CustomerCareWorkflow
    LANGFUSE_TRACING = LangfuseTracingWorkflow
    PGVECTOR_RAG = RagExampleWorkflow
    NESTED_WORKFLOW = NestedWorkflow
Important: The workflow registry enum name (e.g., QUICKSTART) is how the rest of the system — for example, the generic /events endpoint and Celery worker — looks a workflow up. Choose a descriptive name that clearly indicates the workflow’s purpose.

Why Use a Registry?

The WorkflowRegistry enum provides several benefits:

Centralized Management

All workflows are registered in one place, making it easy to see what workflows are available in your system.

Type Safety

Using an enum ensures you can only reference workflows that actually exist, preventing typos and runtime errors.

Easy Discovery

IDEs can autocomplete workflow names, making development faster and reducing errors.

Dynamic Loading

The system can dynamically load and execute workflows based on the registry entry. Tip: Keep your workflow names consistent with their purpose. For example, use CUSTOMER_CARE for customer support workflows, ORDER_PROCESSING for e-commerce workflows, etc.