Skip to content

Per-repo overrides

Blueprints can configure per-repository settings that override platform defaults. For how model_id is layered against the platform default, per-task overrides, and the IAM invoke allowlist — plus the cost tradeoffs of picking a different model — see Model configuration.

SettingDescriptionDefault
compute_typeCompute strategy (agentcore or ecs)agentcore
runtime_arnAgentCore runtime ARN overridePlatform default
model_idBedrock inference-profile ID (us.-prefixed)us.anthropic.claude-opus-4-8
max_turnsDefault turn limit for tasks100
max_budget_usdDefault cost budget in USD per task, 0.01100 (Blueprint agent.maxBudgetUsd)None (unlimited)
system_prompt_overridesAdditional system prompt instructionsNone
github_token_secret_arnPer-repo GitHub token (Secrets Manager ARN)Platform default
poll_interval_msPoll interval for awaiting completion (5000–300000)30000

When you specify --max-turns (CLI) or max_turns (API) on a task, your value takes precedence over the Blueprint default. If neither is specified, the platform default (100) is used. The same override pattern applies to --max-budget / max_budget_usd, except there is no platform default - if neither the task nor the Blueprint specifies a budget, no cost limit is applied.

Every place a cost budget can come from, and nowhere else:

SurfaceHowScopeNotes
Per task, CLIbgagent submit --max-budget <dollars>One taskRange 0.01100; rejected client-side before the request is sent
Per task, RESTmax_budget_usd in the POST /v1/tasks bodyOne taskSame 0.01100 range, validated server-side
Per repo, Blueprintagent.maxBudgetUsd on the repo’s Blueprint constructEvery task on that repoPersisted to RepoTable.max_budget_usd; same 0.01100 range, enforced at CDK synth so an out-of-range value cannot deploy
Local batch runsMAX_BUDGET_USD shell envOne local runLocal entrypoint.py batch mode only. The deployed AgentCore server mode ignores this variable — it reads the budget from the /invocations request body, so setting it on the runtime has no effect
Platform-wide defaultNone exists. Unset means unlimited (see below)

The two that apply to a deployed task resolve in this order: per-task value wins, then the repo’s Blueprint default, then no budget at all. A mid-task Blueprint edit does not move a running task’s budget.

Administrators set the Blueprint default in the CDK stack:

new Blueprint(this, 'MyRepo', {
repo: 'my-org/my-repo',
repoTable,
agent: { maxBudgetUsd: 5.0 }, // every task on this repo caps at $5 unless overridden
});

Run bgagent repo show <owner/repo> to see which value is in effect; the max_budget_usd line reads (per-blueprint override) when the repo pins one and (platform default) unlimited when it does not.

There is intentionally no platform-wide budget ceiling. A hard global cap would kill long-running tasks mid-change — the failure mode is a half-finished branch and no PR, which is worse than a task that costs more than expected. The intended controls are the per-repo Blueprint default above (opt in where you want a ceiling), the per-task flag, and max_turns.

The documented escape hatch for cost is choosing a lighter-token model rather than relying on a cap:

  • Per repo: Blueprint agent.modelId — no code change and no agent redeploy
  • Per task: model_id in the task payload

The model you pick must be in the platform’s Bedrock IAM grant list, or the task fails at turn 0 with AccessDenied — the grant is the gate, so a lighter model is only reachable if it has been granted. For how the model layers resolve, the grant list, and the measured cost comparison, see Model configuration.

Note that the reported cost_usd is a client-side estimate, not authoritative billing — see Cost attribution.