sales_agent = Agent(name="Sales Agent") def talk_to_sales(): print("Hello, World!") return Result( value="Done", agent=sales_agent, context_variables={"department": "sales"} ) agent = Agent(functions=[talk_to_sales]) response = client.run( agent=agent, messages=[{"role": "user", "content": "Transfer me to sales"}], context_variables={"user_name": "John"} ) print(response.agent.name) print(response.context_variables)