Remote Agent
Transport Behavior
Understand the HTTP and RPC transport behavior used by RemoteAgent
Transport Behavior
RemoteAgent supports two transport shapes:
http://.../https://...: calls the SDK routes mounted by the Downcity Agent HTTP gatewayrpc://...: connects directly to the local Agent RPC server
Regular requests
For example:
- create session
- list sessions
prompthistoryfork
Those use normal JSON request-response exchanges.
Event subscription requests
Over HTTP, events uses an NDJSON-style long-lived response.
Over RPC, the same session events are delivered through the RPC connection.
For HTTP callers, the client receives JSON events one line at a time.
Each line can be treated as an independent session event.
What this means for callers
- if you only care about one turn result, wait for
turn.finished - if you are building a real-time UI, use
subscribe()
If you want to show tool activity, progressive output, or real-time chat UI, subscribe() is usually the right fit.