from pydantic import BaseModel class PersonInfo(BaseModel): """Information about a person.""" name: str | None = None age: int | None = None occupation: str | None = None response = await agent.run( "Please provide information about John Smith, who is a 35-year-old software engineer.", options={ "response_format": PersonInfo }, )