don't really need nonblocking io here
cleanup envoyd
rework lookup_agent_info to be more concise