fixed function ``create_agent()`` signature