Skip to content

Add RFD: Streamable HTTP & WebSocket Transport#721

Open
alexhancock wants to merge 1 commit intoagentclientprotocol:mainfrom
alexhancock:rfd/streamable-http-websocket-transport
Open

Add RFD: Streamable HTTP & WebSocket Transport#721
alexhancock wants to merge 1 commit intoagentclientprotocol:mainfrom
alexhancock:rfd/streamable-http-websocket-transport

Conversation

@alexhancock
Copy link
Contributor

Adding an RFD for a streamable HTTP and websocket transport

Co-authored-by: Jasper Hugo <jhugo@block.xyz>
@alexhancock alexhancock requested a review from a team as a code owner March 10, 2026 19:15
@alexhancock
Copy link
Contributor Author

cc @jh-block @benbrandt

@alpgul
Copy link

alpgul commented Mar 14, 2026

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
Copy link

@agentcooper agentcooper Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@anna239
Copy link
Contributor

anna239 commented Mar 26, 2026

@alexhancock do I understand it correctly that you suggest opening multiple SSE (first on initialize request, then on session/new and then on session/prompt)? When are those streams closed and how does the agent decide which stream does some update belong to?

@alexhancock
Copy link
Contributor Author

@alexhancock do I understand it correctly that you suggest opening multiple SSE (first on initialize request, then on session/new and then on session/prompt)?

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"

When are those streams closed

"After all JSON-RPC responses have been sent, the server SHOULD close the SSE stream."

how does the agent decide which stream does some update belong to?

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!

@anna239
Copy link
Contributor

anna239 commented Mar 27, 2026

@alexhancock

"After all JSON-RPC responses have been sent, the server SHOULD close the SSE stream."

does it mean, that f.i. the first SSE stream that was opened for initialize request will be closed once initialize response is streamed? I think this won't work as the agent can send some data to the client after initialize response but before session/new is called

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants