feat: add HTTP/WebSocket transport for remote ACP agents#68
Open
3coins wants to merge 2 commits intoagentclientprotocol:mainfrom
Open
feat: add HTTP/WebSocket transport for remote ACP agents#683coins wants to merge 2 commits intoagentclientprotocol:mainfrom
3coins wants to merge 2 commits intoagentclientprotocol:mainfrom
Conversation
- Update README.md to mention HTTP/WebSocket transport and examples - Add HTTP/WebSocket section to docs/quickstart.md with usage examples - Add dedicated docs/http-transport.md with architecture, API reference, and server/client examples - Add http-transport.md to mkdocs.yml navigation - Add tests/test_http_transport.py with 13 tests covering: - WebSocketStreamAdapter lifecycle (start, close, double-start) - Bidirectional message flow (receive → reader, writer → send) - EOF handling on WebSocket disconnect - StarletteWebSocketWrapper delegation - End-to-end agent ↔ client communication over WebSocket adapters
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.
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.