agent: guard against empty keyring json