Repository navigation
feat(server): serve the AgentCore relay envelope - #22
Merged
yash-kark merged 1 commit intoOct 28, 2026
Merged
Conversation
Merged
yash-kark
force-pushed
the
feat/p1-sdk-12-agentcore-relay
branch
8 times, most recently
from
October 28, 2026 17:20
2e1cd15 to
0032b1d
Compare
Base automatically changed from
feat/p1-sdk-11-app-server
to
feat/p1-sdk-2-remove-events-sink
October 28, 2026 17:20
The app server also answers AgentCore: GET /ping (Healthy / HealthyBusy while
a turn runs) and POST /invocations, relay envelope v1 dispatched in-process to
its own routes. Streamed answers start with the `: ca-relay` head frame; other
answers return as {relay, instance, status, headers, body | bodyBase64}; a
malformed envelope is status 400 AGENTCORE_RELAY_REQUEST_INVALID. The
instance id is minted on the first invocation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yash-kark
force-pushed
the
feat/p1-sdk-12-agentcore-relay
branch
from
October 28, 2026 17:20
0032b1d to
236871d
Compare
yash-kark
merged commit Oct 28, 2026
1da8eca
into
feat/p1-sdk-2-remove-events-sink
1 of 5 checks passed
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.
Stack: 12 of 12 (base #21). Plan:
.claude/plans/p1-sdk-egress-routes.mdphase 12 (C4; D24).What changes
computeragent.server.relay, mounted on the same app, as a port of CAS'sruntime-agentcore/src/invocations.tsandrelay.ts:GET /ping→{status: Healthy | HealthyBusy, time_of_last_update}; busy while any turn runs.POST /invocationstakes relay envelope v1 and dispatches it in-process to the app's own routes (an ASGI call, answer read as it's produced).text/event-stream, with the first frame: ca-relay {"instance","status"}.{relay: 1, instance, status, headers, body | bodyBase64}, skipping the same headers the reference skips./invocationsor/ping) answersstatus: 400 AGENTCORE_RELAY_REQUEST_INVALID.instanceis minted on the first invocation, not at process start, as in the reference (snapshot-restored microVMs).linux/arm64for AgentCore.Tests
ruffclean;mypyat 18 (baseline);pytest -m "not integration": 662 passed.tests/test_server_relay.py(cases mirrorrelay.test.ts): ping idle/busy/idle, JSON round trip with an inner 404, an SSE head frame plus exactly the direct route's frames, binary bodies both ways, 8 malformed envelopes, and a stable per-appinstance.cas-e2e-dummy,IMAGE_APP=sdk ./run_cas_e2e.sh): real CAS → fake AWS →python -m computeragent.server→ the real egress proxy → the fake gateway. 12/12 checks pass on Lambda MicroVM and AgentCore, with real usage on both.🤖 Generated with Claude Code