[Feature]: Stop new intents (platform-wide or per space) and limit concurrent intents per space

Open
#708 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
api, backend

Research direction

Start with handleStartIntent, max_parallel_units, and the cited admin setting in #619; the issue also points to scripts/check-active-executions.mjs and docs/concepts/architecture.md. First trace how start refusals and platform defaults with per-space overrides work. Done means implementing both opt-in controls, their API and user-facing reason, tests, and the two requested documentation updates; maintainers still need to resolve the listed behavior questions.

Written by the indexing model from the issue text.

Description

area/backend topic/admin topic/intents
Description

There is currently no way to stop new intents from starting, either across the platform or in one space, or to bound how many intents a space runs at once.

The rollout steps for the runtime-grants work (#616, and docs/concepts/architecture.md on that branch) ask operators to "stop starting intents until the deployment has succeeded, let running executions park or finish, and cancel the parked and queued ones". Today that has to be coordinated by hand. scripts/check-active-executions.mjs refuses the deploy while executions are active, but nothing stops someone starting a new intent while the operator is draining.

The same control is useful outside deployments: during an incident, while credentials are rotated, or when a space has reached a spend limit set by the organization's own cost tooling.

Separately, the only concurrency limit today applies within one intent (max_parallel_units). A space can start any number of intents at once, and each runs many stages and model calls over minutes or hours.

Use case
  • An operator rolling out #614 to #616 needs to stop new intents platform-wide before each apply and let work resume afterwards, without relying on every user to hold off.
  • A platform admin needs to stop new work in one space (incident, credential rotation, spend limit reached) without affecting other spaces or interrupting stages already in progress.
  • An organization's cost tooling needs a clean lever. Today the only external option is denying model access, which makes agents fail mid-stage.
  • A script with a bug starts intents in a loop, or one space uses up shared capacity such as account-wide Bedrock throughput. A per-space limit caps the impact.
Proposed scope

Both opt-in and off by default, so existing deployments are unchanged.

  • Stop new work: a platform-admin setting, platform-wide (maintenance mode) and per space. New intent starts are refused with the admin's reason; intents already running continue. Shown as a banner in the app, and settable through the API so an operator script or external system can use it.
  • Concurrent intent limit per space: a platform default for the maximum number of active intents per space (0 = unlimited), with an optional per-space override. A start beyond the limit is refused with a specific error.
  • Follows existing patterns: handleStartIntent's 409 refusals with a specific code (as quorum_edit_active), the stage-skipping platform default plus per-space override captured at intent creation, the platform-admin setting from #619, and max_parallel_units.
Acceptance criteria
  • With neither setting configured, behavior is unchanged.
  • A platform admin can stop and resume new work platform-wide and for a single space, with a reason shown to users.
  • While stopped, starting an intent is refused with a specific error code and the reason; running intents continue to completion.
  • A space at its active-intent limit refuses further starts with a specific error code; the limit uses the platform default unless the space overrides it.
  • The settings can be read and changed through the API by a platform admin.
  • Docs: admin guide for both settings, and the rollout steps for #614 to #616 updated to use the stop setting.
Area

Backend (APIs, orchestration)

Additional context

Complements #481 (confirmation before construction fan-out) and the measured usage and pricing in #669.

Questions for the maintainers:

  • When a limit is reached, should a start be refused or queued until a slot frees? Queuing seems closer to the direction of #415.
  • Should intents waiting for a human answer count towards the limit?
  • Should "stop new work" also hold new stages of running intents, or only new intents?
  • Is a per-user limit wanted, and should it wait for the roles in #595?
  • Should per-space budgets live in the platform, or stay with external cost tooling that uses this control? We'd lean towards outside, since billing data and organizational policy usually live there.
Dominant language
JavaScript
Stars
128
Forks
62
Avg merge
3d 16h
Merged PRs (30d)
102

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-samples/sample-collaborative-ai-dlc

All issues in aws-samples/sample-collaborative-ai-dlc

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.