feat: add HTTP/WebSocket transport for remote ACP agents #68
+1,676
−2
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.
Summary
Adds an HTTP/WebSocket transport layer (
acp.http) that enables ACP agents and clients to communicate over WebSocket instead of stdio, unlocking remote agent deployments (e.g., cloud-hosted agents accessed by any ACP client over standard WebSocket connections).Related issues
N/A — new feature. Validated via acp-agentcore-poc, a proof-of-concept integrating DeepAgents with AWS Bedrock AgentCore using this transport. Also validated via jai-remote-acp-persona, that integrates this with Jupyter as the client.
Testing
uv run python -m pytest tests/test_http_transport.py -v— 13 tests, all passing:WebSocketStreamAdapterlifecycle (start, close, double-start, idempotent close)StarletteWebSocketWrapperdelegation (recv, send text/bytes, close)uv run python -m pytestpasses)Docs & screenshots
Demo of AgentCore agent with a test client
agentcore-acp-demo.mp4
Demo of AgentCore agent with Jupyter client
jai-remote-acp-demo.mp4
Documentation updates included in this PR:
README.md— Updated "At a glance" and "Project layout" to mention HTTP/WebSocket transportdocs/quickstart.md— New "HTTP/WebSocket (remote agents)" section with server setup, client connection, and programmatic usage examplesdocs/http-transport.md— Dedicated doc page covering architecture (4-queue design), component APIs (WebSocketStreamAdapter,connect_http_agent,WebSocketLike,StarletteWebSocketWrapper), server/client examples, dependencies, and limitationsmkdocs.yml— Added nav entry for the new doc pageexamples/http_echo_agent.py(server) andexamples/http_client.py(client)Checklist
feat:,fix:).make gen-all) are called out if applicable. — N/A, no schema changes.