Run loop

Tag 5: the client sends a prompt; the server opens the proxy’s /agent/run and relays the chunks of the loop as channel responses, an error last when there was no loop or it did not finish, and the channel response finish.

The client opens this channel to run one loop of the agent. The server opens /agent/run on the proxy with the prompt and relays the loop.

  • The request. The tag byte 5 followed by the prompt as JSON. Request states its form.
  • The response. One channel response per chunk, an error last when the proxy sent one, and the channel response finish when the proxy closes. Response states the sequence.
  • One at a time. The server opens /agent/run for every run-loop channel the client opens; a loop asked for while one runs is answered as the proxy answers it, with an error as the first channel response.