Skip to content

Set up aws agentcore compute config commands under worker deployment version tree - #1261

Open
mani-j9 wants to merge 2 commits into
mainfrom
mani/cli-agentcore
Open

mani-j9 wants to merge 2 commits into
mainfrom
mani/cli-agentcore

Conversation

@mani-j9

@mani-j9 mani-j9 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Related issues

Follows #1235.

What changed?

Adds aws-agentcore to the experimental temporal worker deployment version compute-config tree from #1235, for AWS Bedrock Agentcore Runtimes. The existing commands are unchanged.

temporal worker deployment version
├── create | describe | delete
└── compute-config
    ├── describe
    ├── remove [--scaling-group KEY] [--yes]
    ├── aws-lambda
    │   └── create | update
    ├── aws-agentcore      (new)
    │   └── create | update
    └── modal-function
        └── create | update

Existing commands and their new equivalents

Existing New What's different
create-version --aws-agentcore-* version compute-config aws-agentcore create Same request for the same inputs. New: --scaling-group and the scaler flags. If the Version exists, the error points to update.
update-version-compute-config --aws-agentcore-* version compute-config aws-agentcore update Same request when the provider flags are passed, including the scaler reset. New: --scaling-group, and the scaler flags on their own change only the scaler settings. If the Version is missing, the error points to create.

describe, remove and delete are the shared commands from #1235.

The Agentcore commands work like the aws-lambda ones:

  • The provider prefix is dropped: --endpoint-arn, plus the role flags shared with aws-lambda: --assume-role-arn, --assume-role-external-id, --skip-role-and-external-id.
  • --scaling-group (default default) names the scaling group to create or update.
  • Agentcore uses the same no-sync scaler as Lambda, so the same scaler flags apply, such as --scale-up-backlog-threshold and --max-worker-lifetime-ms. Only the ones passed are sent.

Checklist

Design

  • This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server)
  • New commands follow temporal <noun> <verb> structure (e.g. temporal workflow start)
  • New flags are named after the API concept, not the implementation mechanism (good: --search-attribute, bad: --index-field)
  • New flags don't duplicate an existing flag that serves the same purpose
  • New flags do not have short aliases without strong justification
  • Experimental features are marked with (Experimental) in commands.yaml

Help text (see style guide at the top of commands.yaml)

  • All flags shown in help text and examples are implemented and functional
  • Summaries use sentence case and have no trailing period
  • Long descriptions end with a period and include at least one example invocation
  • Examples use long flags (--namespace, not -n), one flag per line
  • Placeholder values use YourXxx form (YourWorkflowId, YourNamespace)

Behavior

  • Results go to stdout; errors and warnings go to stderr
  • Error messages are lowercase with no trailing punctuation

Tests

  • Added functional test(s) (SharedServerSuite)

Manual tests

I ran 11 scenarios against a Temporal Cloud test cell with a real AWS Bedrock Agentcore Runtime, running the existing and new commands side by side. The new commands behaved as expected: for the same inputs they succeeded or failed like the existing ones, and version describe printed the same output as describe-version in text and JSON. On each create and update, the server checked the runtime endpoint and IAM role with AWS before accepting them.

Setup: a Worker Deployment YourDeploymentName, an Agentcore Runtime endpoint, and an IAM role that the Temporal server can assume.

Happy path

$ temporal worker deployment version compute-config aws-agentcore create \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID \
    --endpoint-arn YourAgentcoreRuntimeEndpointARN \
    --assume-role-arn YourAssumeRoleARN \
    --assume-role-external-id YourExternalID
Successfully created worker deployment version

$ temporal worker deployment version compute-config describe \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID
Compute Config Scaling Groups:
  ScalingGroup  default
  Provider      aws-agentcore
  Scaler        no-sync

$ temporal worker deployment version compute-config aws-agentcore update \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID \
    --endpoint-arn YourAgentcoreRuntimeEndpointARN \
    --assume-role-arn YourAssumeRoleARN \
    --assume-role-external-id YourExternalID \
    --scale-up-backlog-threshold 2 \
    --max-worker-lifetime-ms 300000
Successfully updated worker deployment version compute config

$ temporal worker deployment version compute-config describe \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID
Compute Config Scaling Groups:
  ScalingGroup  default
  Provider      aws-agentcore
  Scaler        no-sync (scale_up_backlog_threshold 2, max_worker_lifetime_ms 300000)

Scaler flags on their own replace the scaler settings and keep the provider:

$ temporal worker deployment version compute-config aws-agentcore update \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID \
    --scale-up-cooloff-ms 500
Successfully updated worker deployment version compute config

$ temporal worker deployment version compute-config describe \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID
Compute Config Scaling Groups:
  ScalingGroup  default
  Provider      aws-agentcore
  Scaler        no-sync (scale_up_cooloff_ms 500)

Passing the provider flags again resets the scaler settings:

$ temporal worker deployment version compute-config aws-agentcore update \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID \
    --endpoint-arn YourAgentcoreRuntimeEndpointARN \
    --assume-role-arn YourAssumeRoleARN \
    --assume-role-external-id YourExternalID
Successfully updated worker deployment version compute config

$ temporal worker deployment version compute-config describe \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID
Compute Config Scaling Groups:
  ScalingGroup  default
  Provider      aws-agentcore
  Scaler        no-sync

Error cases

$ temporal worker deployment version compute-config aws-agentcore create \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID \
    --endpoint-arn YourAgentcoreRuntimeEndpointARN \
    --assume-role-arn YourAssumeRoleARN \
    --assume-role-external-id YourExternalID
Error: error creating worker deployment version: Worker Deployment Version "YourDeploymentName.YourBuildID" already exists; to set its compute config, use `temporal worker deployment version compute-config aws-agentcore update`

$ temporal worker deployment version compute-config aws-agentcore update \
    --deployment-name YourDeploymentName \
    --build-id YourMissingBuildID \
    --endpoint-arn YourAgentcoreRuntimeEndpointARN \
    --assume-role-arn YourAssumeRoleARN \
    --assume-role-external-id YourExternalID
Error: error updating worker deployment version compute config: build ID 'YourMissingBuildID' not found in Worker Deployment 'YourDeploymentName'; to create it, use `temporal worker deployment version compute-config aws-agentcore create`

$ temporal worker deployment version compute-config aws-agentcore update \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID
Error: no compute configuration provided to update

$ temporal worker deployment version compute-config aws-agentcore update \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID \
    --assume-role-arn YourAssumeRoleARN \
    --assume-role-external-id YourExternalID
Error: --endpoint-arn is required when changing the provider

$ temporal worker deployment version compute-config aws-agentcore create \
    --deployment-name YourDeploymentName \
    --build-id YourOtherBuildID \
    --endpoint-arn YourAgentcoreRuntimeEndpointARN
Error: --assume-role-arn and --assume-role-external-id are required unless --skip-role-and-external-id is passed

$ temporal worker deployment version compute-config aws-agentcore update \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID \
    --endpoint-arn YourAgentcoreRuntimeEndpointARN \
    --assume-role-arn YourAssumeRoleARN \
    --assume-role-external-id YourExternalID \
    --metrics-poll-interval-ms 5000
Error: error updating worker deployment version compute config: default: metrics_poll_interval_ms must be at least 10000

The existing commands rejected the same inputs. Only the wording differs where the CLI validates the flags, e.g. missing required AWS Agentcore provider detail: endpoint_arn for --endpoint-arn is required when changing the provider.

compute-config remove asks before removing every scaling group:

$ temporal worker deployment version compute-config remove \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID
Remove scaling group "default" from Worker Deployment Version "YourDeploymentName" with Build ID "YourBuildID"? y/N y
Successfully removed worker deployment version compute config

$ temporal worker deployment version compute-config describe \
    --deployment-name YourDeploymentName \
    --build-id YourBuildID
Worker deployment version has no compute config

Risks

None known.

@mani-j9
mani-j9 requested review from justinschoeff and a balanced review from Copilot November 10, 2026 19:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the experimental AWS Agentcore compute-config command additions.

No open issues 🎉

What changed in this PR

Adds experimental AWS Agentcore compute-config commands to the Worker Deployment Version tree introduced in #1235, while leaving existing commands unchanged.

Changes:

  • Adds aws-agentcore create and update with endpoint, role, scaling-group, and no-sync scaler options.
  • Reuses shared helpers for version creation and targeted scaling-group updates.
  • Adds command help and tests covering request payloads, partial updates, and validation errors.
File Description
internal/​temporalcli/​commands.yaml Defines Agentcore commands, options, help, and examples.
internal/​temporalcli/​commands.worker.deployment.version.aws_agentcore.go Implements command handlers and provider configuration validation.
internal/​temporalcli/​commands.worker.deployment.version.aws_agentcore_test.go Tests creation, updates, scaler resets, and error handling.
internal/​temporalcli/​commands.gen.go Registers generated Agentcore commands and flag bindings.

Review effort: Balanced

@mani-j9
mani-j9 marked this pull request as ready for review November 10, 2026 19:52
@mani-j9
mani-j9 requested a review from a team as a code owner November 10, 2026 19:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T19:39:55.264513Z c753b1c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ks-temporal ks-temporal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Approving with two suggestions - (1) I added some comment in 1262, which are related to difference between agentcore and gcp-run, so you may want to check that first before merging this. (2) Naming "AWS Bedrock Agentcore" vs. "Amazon Bedrock Agent[c=>C]ore" in description and help text.

@mani-j9
mani-j9 requested a review from ks-temporal November 30, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants