class OutText(BaseModel): output: str agent = client.create_agent( instructions="You are a good assistant.", name="assistant", default_options={ "response_format": OutText }, ) async def main(): result1 = await agent.run( "How many kilometers is the highway from Wuhan to Beijing?", thread=thread, ) print(result1.text)