output_schema parameter.
Structured Outputs (Default if supported)
If the model class supports it, Agno agents use Structured Outputs by default. The schema (Pydantic or JSON Schema) is passed to the model provider’s API. For successfully completed, non-refusal responses, providers that support strict Structured Outputs validate the response against that schema. Handle refusals, incomplete generations, and provider errors separately.User object instead of free-form text. Structured Outputs are a good fit for tasks where the output shape has to be right, like entity extraction or generating content for UI rendering.
JSON Mode
Some model classes do not support Structured Outputs, and sometimes you want to bypass it even when they do. Setuse_json_mode=True to enable JSON mode.