Skip to main content
This example shows how to use input schema validation in workflows to enforce type safety and data structure validation. By defining an input_schema with a Pydantic model, you can ensure that your workflow receives properly structured and validated data before execution begins.

Key Features:

  • Type Safety: Automatic validation of input data against Pydantic models
  • Structure Validation: Ensure all required fields are present and correctly typed
  • Clear Contracts: Define exactly what data your workflow expects
  • Error Prevention: Catch invalid inputs before workflow execution begins
  • Multiple Input Formats: Support for Pydantic models and matching dictionaries
workflow_with_input_schema.py