envoyd: refactor run_agent
envoyd: refactor and rename agent_by_uid
envoyd: simplify default agent handling