Summary
agentcore invoke always calls a runtime's DEFAULT endpoint. There is no way to invoke a specific named runtime endpoint (version alias) created with agentcore add runtime-endpoint. Please add a flag (e.g. --endpoint <name>) to agentcore invoke to target a specific endpoint.
Current behavior
agentcore add runtime-endpoint --runtime MyAgent --endpoint control --version 1 creates named endpoints, but agentcore invoke provides no way to call them.
agentcore invoke exposes --runtime, --target, --gateway, and --gateway-target-name, but no --endpoint.
--target is easy to mistake for endpoint selection — it actually selects the deployment target (account/region). For example, agentcore invoke --runtime MyAgent --target control fails with Target 'control' not found. Available: default.
- The data-plane invoke helper already accepts an endpoint qualifier (it defaults to
DEFAULT), so the underlying call supports this — invoke just never passes a non-default value through.
Requested behavior
Add an endpoint selector to agentcore invoke, for example:
agentcore invoke --runtime MyAgent --endpoint control --prompt "..."
Ideally mirroring the precedent already set by agentcore run eval, which supports:
--endpoint <name> Runtime endpoint name (e.g. PROMPT_V1).
Defaults to AGENTCORE_RUNTIME_ENDPOINT env var, then DEFAULT
i.e. --endpoint plus an AGENTCORE_RUNTIME_ENDPOINT environment-variable fallback would make invoke consistent with run eval.
Use case
Validating multiple runtime versions before/during an A/B test. After creating control (v1) and treatment (v2) endpoints, you can't smoke-test each one directly with agentcore invoke — today the only way to exercise a non-default endpoint is to route traffic through a gateway. Direct per-endpoint invocation would make it much easier to sanity-check each variant before sending live traffic.
Workaround today
Send traffic to the test's gateway invocation URL (the gateway splits across endpoints), or invoke the DEFAULT endpoint only.
Summary
agentcore invokealways calls a runtime'sDEFAULTendpoint. There is no way to invoke a specific named runtime endpoint (version alias) created withagentcore add runtime-endpoint. Please add a flag (e.g.--endpoint <name>) toagentcore invoketo target a specific endpoint.Current behavior
agentcore add runtime-endpoint --runtime MyAgent --endpoint control --version 1creates named endpoints, butagentcore invokeprovides no way to call them.agentcore invokeexposes--runtime,--target,--gateway, and--gateway-target-name, but no--endpoint.--targetis easy to mistake for endpoint selection — it actually selects the deployment target (account/region). For example,agentcore invoke --runtime MyAgent --target controlfails withTarget 'control' not found. Available: default.DEFAULT), so the underlying call supports this —invokejust never passes a non-default value through.Requested behavior
Add an endpoint selector to
agentcore invoke, for example:agentcore invoke --runtime MyAgent --endpoint control --prompt "..."Ideally mirroring the precedent already set by
agentcore run eval, which supports:i.e.
--endpointplus anAGENTCORE_RUNTIME_ENDPOINTenvironment-variable fallback would makeinvokeconsistent withrun eval.Use case
Validating multiple runtime versions before/during an A/B test. After creating
control(v1) andtreatment(v2) endpoints, you can't smoke-test each one directly withagentcore invoke— today the only way to exercise a non-default endpoint is to route traffic through a gateway. Direct per-endpoint invocation would make it much easier to sanity-check each variant before sending live traffic.Workaround today
Send traffic to the test's gateway invocation URL (the gateway splits across endpoints), or invoke the
DEFAULTendpoint only.