RFD-based ACP HTTP and WS web transport implementation - #118
RFD-based ACP HTTP and WS web transport implementation#118federicociner wants to merge 1 commit into
Conversation
|
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. |
|
@PsiACE @benbrandt we've done preliminary E2E testing using the Python SDK in Atlassian and everything seems to be working as expected. @benbrandt I'm not allow to share video/screenshots on GH of the testing results for confidentiality reasons but I can probably share them in our private Slack channel. If you want I can do that, otherwise this PR should be ready for review now 😄 |
7bd8fc2 to
b165e2f
Compare
|
Thanks @federicociner for this. So happy to see this RFD implemented! I'll review it, and maybe we should prepare a release for this feature. 🤗 |
|
@PsiACE yes sounds good. Did you want to bump minor or major versions? I see some of the other SDKs like the TS one are on |
|
I’ve released the current main branch as 0.11.1. Once this is merged, I’ll consider releasing 0.12.0, possibly together w/wo #117. |
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.