aws / aws/agentcore-cli

feat(gateway): session management knobs (timeout, max sessions)

Open
#1,353 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

### Description

AgentCore Gateway has session semantics on the data plane (each MCP client establishes a session), but `AWS::BedrockAgentCore::Gateway` does not expose any `SessionTimeout`, `MaxSessions`, or `SessionConfiguration` property. The full Gateway property list is `AuthorizerConfiguration`, `AuthorizerType`, `Description`, `ExceptionLevel`, `InterceptorConfigurations`, `KmsKeyArn`, `Name`, `PolicyEngineConfiguration`, `ProtocolConfiguration`, `ProtocolType`, `RoleArn`, `Tags` — nothing session-related ([CFN docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-gateway.html)).

The CLI also has no session knobs on `AgentCoreGatewaySchema` (`src/schema/schemas/mcp.ts`). Customers in long-running multi-tool sessions cannot set idle timeouts or max session counts.

### Acceptance Criteria

- [ ] Confirm with the AgentCore service team which session knobs (if any) are configurable today via the control-plane `CreateGateway` / `UpdateGateway` APIs.
- [ ] If knobs exist: extend `AgentCoreGatewaySchema` with a `sessionConfiguration` block (`sessionTimeoutSeconds?: number`, `maxConcurrentSessions?: number`, etc.) and apply them via imperative calls during deploy (same pattern used for things CFN doesn't yet support).
- [ ] Add `--session-timeout-seconds` and `--max-sessions` flags (or the actual subset of knobs supported).
- [ ] Surface session config in `agentcore status` and in the TUI wizard.
- [ ] When CFN catches up, deprecate the imperative path in favor of CFN.

### Additional Context

- CFN support: **NO** — Gateway has no session-related properties as of 2026-05-21.
- Control-plane: needs service-team confirmation on which session knobs are exposed; may currently be backend-only/non-configurable.
- This may collapse to "no-op until service exposes knobs" — but the schema slot should still be reserved so we don't break compatibility later.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.