Fleet test

pnpm fleet puts a disposable Agent Control Plane installation through its paces on real AWS. It installs ACP, releases a fleet of test agents through the full governed flow, lets them make real Amazon Bedrock calls for at most ten minutes, and then checks that what the agents did, what ACP recorded and what Bedrock logged all agree. The console stays up afterwards so you can look around, until you tear everything down.

Not yet run on AWS. The driver, the fleet agents and the opt-in automation client are tested locally against simulated AWS only. Treat the first run as the real test, and read the report.

What happens

Five steps: pnpm fleet up, pnpm fleet start (ten minutes at most), pnpm fleet report --wait, look around the console, pnpm fleet down.

  1. up installs ACP with an extra Cognito app client for scripted test users (--automation-client), turns on Bedrock invocation logging (metadata only), switches to live inference with a real model and small confirmed budgets, and creates three test users (agent owner, CTO reviewer, administrator) with TOTP MFA. Then, for each of 20 agents (fleet-01 to fleet-20), it follows the real release flow: register the Agent Card, create the workload roles, bind deployer roles, create and test version 1.0.0, submit evaluation evidence, submit, have an independent reviewer approve it, deploy the Lambda function, submit deployment evidence and activate.
  2. start schedules each agent. Agent i runs every 1 to 5 minutes, and each run makes 1 to 3 model calls, so the agents have slightly different rhythms. Every agent also runs once straight away. For 20 agents that is roughly 100 runs and 200 model calls.
  3. Each run is one ACP run. For every call the agent asks ACP for a model permit, calls Bedrock itself with its own role and the permit ID in requestMetadata, and reports the tokens used. It asks short, benign questions and logs one JSON line per call, including a preview of the answer.
  4. report compares three independent records: the agents' own log lines, ACP's runs, permits and usage, and Bedrock's invocation logs as reconciled by ACP.

The ten-minute limit

Several things stop the agents, so a mistake in one doesn't leave them running:

  • the schedules have an end date and delete themselves when it passes;
  • each invocation carries a deadline, and the agent won't start a run or a model call after it;
  • the Lambda aliases drop events older than two minutes and never retry;
  • ACP's per-run limits and the fleet's monthly budgets (5 USD for each production agent, 50 USD for the installation) still apply.

pnpm fleet stop is a kill switch: it deletes the schedules and sets the functions' reserved concurrency to zero.

Before you start

  • A separate AWS account is best. Bedrock invocation logging is one setting per account and Region, and the fleet points it at its own bucket. In an AWS Organization, pnpm fleet account can create a member account for you (see below).
  • Credentials: an administrator role or SSO session in that account, not the root user. The driver installs ACP, creates IAM roles, Cognito users and schedules, and reads CloudWatch Logs.
  • Tools: Node.js 22.13 or later and pnpm, from a checkout of this repository (pnpm install). The CDK CLI comes with the repository.
  • Lambda concurrency: new accounts often have a limit of 10 concurrent executions, which is too low. up warns you; request at least 100 under Service Quotas → AWS Lambda → Concurrent executions, which can take hours.
  • Region and model. Pick the Region explicitly with --region. The default model is Amazon Nova Micro:
--modelNotes
nova-micro (default)Amazon's own model: available by default, no sign-up or Marketplace subscription. Cheapest.
nova-liteAlso an Amazon model; somewhat more capable.
haiku-4.5Anthropic. Before the first run, complete Anthropic's first-time-use form and invoke the model once in the Bedrock console playground; the agents' roles can't subscribe on first use. Not in the AWS Price List, so pass --input-price-per-mtok and --output-price-per-mtok.
any model IDBring your own prices, as above, if the Price List doesn't have them.

Prices for the Amazon models are read from the public AWS Price List for your Region.

  • Cross-Region inference. In some Regions a model is only offered through a cross-Region inference profile. In ap-southeast-1, for example, Nova and Haiku are both reached this way, with requests served in other Asia Pacific Regions (Haiku through a global profile). up shows the destination Regions and refuses unless you pass --allow-cross-region. It then narrows the baseline policy's cross-Region rule so that it exempts only the fleet model.

Running it

pnpm fleet up --profile fleet --region ap-southeast-1 --admin-email you@example.com --allow-cross-region
pnpm fleet start --profile fleet
pnpm fleet status --profile fleet          # while it runs
pnpm fleet report --profile fleet --wait   # after the ten minutes; waits for Bedrock's logs (up to ~20 minutes)

up shows its plan and a cost note and asks before changing anything (--yes skips the question). It takes a while, mostly for the CloudFront distribution. Every step is recorded in .acp/fleet/<name>.json, so if anything fails you can fix the cause and run the same command again. That file holds the test users' passwords and TOTP secrets; it is created with mode 0600 and is not committed.

To look at the console, sign in as the --admin-email user. The installer emails you a temporary password; on first sign-in you choose a new password and set up TOTP MFA. up adds you to the CTO and CFO groups, so you see the dashboards, agents, runs, model spend and audit trail.

start can be run again later for another burst of at most ten minutes.

Reading the report

report writes .acp/fleet/<name>-report.json and -report.md, prints a table per agent and ends with PASS or FAIL. It fails if:

  • an agent recorded no activity, or the number of runs is outside what the schedules allow;
  • a successful call has no ACP permit, or its usage was never reported;
  • Bedrock's logs show different token counts from the agent's report, or a call without a permit;
  • a model circuit breaker tripped, or spend exceeded the budget;
  • anything ran after the deadline.

Warnings (not failures) cover runs left open, policy or budget denials, model errors and Bedrock log records that had not been reconciled yet. Bedrock delivers invocation logs some minutes after the calls, which is why --wait exists.

Tearing it down

pnpm fleet down --profile fleet

down asks you to type the installation name (--yes --confirm-name <name> for scripts). It then:

  1. stops the agents;
  2. deletes the fleet stack and the IAM roles it tagged acp:fleet=<name>;
  3. removes the Region's Bedrock logging setting if it still points at the installation;
  4. uninstalls ACP with --purge (tables, configuration and log buckets) and deletes its Cognito user pool;
  5. deletes the local state.

It lists anything it left behind, such as CloudWatch log groups that expire on their own. If you used --replace-logging to take over an existing logging setting, restore that setting yourself.

Creating a separate account

pnpm fleet account --profile org-management --email aws-fleet@example.com --account-name acp-fleet-test

This runs from your Organization's management account, asks you to type CREATE <account-name>, creates a member account and prints a profile that assumes OrganizationAccountAccessRole in it. The account is real and down does not delete it; close it from AWS Organizations when you no longer need it. Each account needs its own email address.

Costs

The model calls cost very little: a ten-minute run with Nova Micro is well under one US cent of tokens, and up prints a worst case. The installation itself is serverless and mostly pay-per-use while idle, with small fixed charges such as CloudWatch alarms. Check Cost Explorer, and run down when you have finished looking.

Docs version: 2abf6af98023 · Source: docs/fleet-test.md · Edit on GitHub