agent: API change of agent_key_from_file.