Skip to main content

Overview

Use task(name: str, method_name: Optional[str] = None) to mark a task inside a workflow. Tasks can wrap LLM calls, tool executions, or custom steps.

Function usage

Class usage

Parameters

  • name: task display name
  • method_name (optional): required when decorating a class method to indicate the entrypoint

Tips

  • Keep tasks small and focused
  • Use task names to reflect intent, not implementation details