Step
Step wraps a callable and turns it into a traceable, optionally validated unit of work.
Construction
Execution
Step is callable:
- Validates input/output (if schemas are provided)
- Emits step lifecycle events (
start,end,error) - Tracks invocation context (run ID, step ID, invocation ID, group hash)
Key attributes
name: human-readable step namestep_id: stable hash of function source + metadata (useful for grouping)annotations: metadata such askind="llm"|"tool"|"agent"
step decorator
Use the step(...) decorator to create Steps with metadata more ergonomically.