Skip to content

RFD-based ACP HTTP and WS web transport implementation - #118

Open
federicociner wants to merge 1 commit into
agentclientprotocol:mainfrom
federicociner:feat/rfd-web-stransport-implementation
Open

RFD-based ACP HTTP and WS web transport implementation#118
federicociner wants to merge 1 commit into
agentclientprotocol:mainfrom
federicociner:feat/rfd-web-stransport-implementation

Conversation

@federicociner

Copy link
Copy Markdown

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 seam (_transport.py): message-level Transport protocol; stdio re-expressed as NdjsonTransport with zero behavior change. Connection and connect_to_agent now accept a Transport in addition to byte streams.
  • Streamable HTTP (http/): POST for client→server (202, except initialize which 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.
  • WebSocket (ws/): full-duplex upgrade on the same endpoint, multiplexing all server→client traffic onto one socket.
  • Client transports: create_http_stream() and create_websocket_stream().

Reliability hardening

  • Backpressure: OutboundStream awaits on a full buffer instead of silently
    dropping messages (a dropped response would hang the peer permanently).
  • SSE keepalive: idle streams emit periodic keepalive comments so intermediaries don't time out healthy connections.
  • Disconnect surfacing: HTTP client surfaces EOF when the connection-scoped SSE stream ends, so pending requests reject instead of hanging.
  • initialize cleanup: failed/timed-out initialize tears down the connection (504/500) instead of leaking it.
  • WebSocket cookies: client sends/stores affinity cookies.

@federicociner federicociner changed the title RFD-based ACP HTTP and WS web transport [WIP] RFD-based ACP HTTP and WS web transport implementation Jul 13, 2026
@federicociner

federicociner commented Jul 13, 2026

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

@federicociner federicociner changed the title [WIP] RFD-based ACP HTTP and WS web transport implementation RFD-based ACP HTTP and WS web transport implementation Jul 26, 2026
@federicociner

federicociner commented Jul 26, 2026

Copy link
Copy Markdown
Author

@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 😄

@federicociner
federicociner marked this pull request as ready for review July 26, 2026 23:36
@federicociner
federicociner force-pushed the feat/rfd-web-stransport-implementation branch from 7bd8fc2 to b165e2f Compare July 26, 2026 23:47
@PsiACE

PsiACE commented Jul 27, 2026

Copy link
Copy Markdown
Member

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

@federicociner

Copy link
Copy Markdown
Author

@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 1.0.0.

@PsiACE

PsiACE commented Jul 27, 2026

Copy link
Copy Markdown
Member

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.

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.

2 participants