Framework / Decorators
Wrap typed functions without hiding control
Decorators provide a compact authoring layer over the same nodes, schemas, tools, and controlled execution model.Use function_calling for one extraction
A SchemaNode predicts a Pydantic parameter model, validates it, and only then calls your Python function. This path does not use tools.
Pythonpython
@function_calling(
prompt="Extract the order id and requested refund amount.",
input_schema=CustomerRequest,
client=client,
)
def quote_refund(params: RefundParams) -> dict:
return {"order_id": params.order_id, "approved": params.amount <= 100}Use workflow when evidence comes first
Declare ordered ReasoningSteps with tool allowlists, then finish with a SchemaStep that predicts the typed function arguments from the gathered evidence.