agent: reuse eventsource encoder in supervisor