[WIP] RFD-based ACP HTTP and WS web transport implementation#118
Draft
federicociner wants to merge 1 commit into
Draft
[WIP] RFD-based ACP HTTP and WS web transport implementation#118federicociner wants to merge 1 commit into
federicociner wants to merge 1 commit into
Conversation
Author
|
I am marking this PR as WIP until I have been able to do E2E testing on our internal infrastructure; we have an agentic runtime platform internally within at Atlassian that exposes an ACP over HTTP endpoint, so we can stress test the Python SDK implementation against this server. I will update the PR once I've done E2E testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the remote transport from the RFD (Streamable HTTP + WebSocket), giving ACP a standard remote transport alongside the existing stdio path. Based on the RFD for web transport and reference implementations that already exist in the Rust and TypeScript SDKs.
What's included
_transport.py): message-levelTransportprotocol; stdio re-expressed asNdjsonTransportwith zero behavior change.Connectionandconnect_to_agentnow accept aTransportin addition to byte streams.http/): POST for client→server (202, exceptinitializewhich returns 200 +Acp-Connection-Id), long-lived SSE GET streams for server→client (connection- and session-scoped), DELETE to terminate. Framework-agnostic core + thin ASGI adapter.ws/): full-duplex upgrade on the same endpoint, multiplexing all server→client traffic onto one socket.create_http_stream()andcreate_websocket_stream().Reliability hardening
OutboundStreamawaits on a full buffer instead of silentlydropping messages (a dropped response would hang the peer permanently).
initializecleanup: failed/timed-out initialize tears down the connection (504/500) instead of leaking it.