fixed add_agent