Add RFD: Streamable HTTP & WebSocket Transport#721
Add RFD: Streamable HTTP & WebSocket Transport#721alexhancock wants to merge 1 commit intoagentclientprotocol:mainfrom
Conversation
Co-authored-by: Jasper Hugo <jhugo@block.xyz>
|
A project has already been developed for this feature, and I believe it would be better to keep it as a separate project to avoid increasing code maintenance overhead. |
| │ ┌─────────────────────│ Server creates session, opens SSE stream | ||
| │ │ (SSE stream open) │ | ||
| │<─────────────│─ SSE event ─────────│ { id: 1, result: { capabilities } } | ||
| │ │ │ Response includes Acp-Session-Id header |
There was a problem hiding this comment.
From what I understand Acp-Session-Id here is a transport specific ID. It is a confusing name because ACP session ID is expected to be created later on session/new (https://agentclientprotocol.com/protocol/session-setup#session-id).
There was a problem hiding this comment.
This is a good point, thanks for catching.
Do you think it's sane to drop the transport specific id and have no Acp-Session-Id included in requests unless a session/new has been performed? Also interested in alternative resolutions.
There was a problem hiding this comment.
unless a session/new has been performed
session/prompt has a session_id parameter in its request, which seems to be a separate session ID (actual session ID, not tranport ID). It has to be different from Acp-Session-Id because the same Acp-Session-Id can call session/new multiple times, if I understand it correctly. I'm not sure how exactly Acp-Session-Id is supposed to be used in the proposal.
There was a problem hiding this comment.
Do you think it's sane to drop the transport specific id and have no Acp-Session-Id included in requests
This won't work, as capabilities defined during the initialize phase, so when the client sends their session/new request, the server should know which this Session id. But I agree that the name is confusing here.
|
@alexhancock do I understand it correctly that you suggest opening multiple SSE (first on |
Intent is to follow the request patterns of MCP's streamable http transport https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#sending-messages-to-the-server. From that spec: "Every JSON-RPC message sent from the client MUST be a new HTTP POST request to the MCP endpoint"
"After all JSON-RPC responses have been sent, the server SHOULD close the SSE stream."
I don't have a perfect answer to this off the top of my head, but it likely relates to the discussion here about session ids. Should there perhaps be a session id which only corresponds to the concept of ACP Session ID (nothing transport level) and then a request id to correspond to one client request within a session? Open to ideas! |
does it mean, that f.i. the first SSE stream that was opened for |
Adding an RFD for a streamable HTTP and websocket transport