Agent service discovery

—
It's so the `defer func` below can introspect the error.