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