Skip to content

Support invoking a specific runtime endpoint with agentcore invoke --endpoint <name> #1554

@jariy17

Description

@jariy17

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions