Interactive demo

The opt-in interactive demo lets anonymous visitors use the real ACP console and API against a fictional company with 16 simulated agents, each visitor in a private, short-lived workspace. Nothing in a normal installation enables it. It is tested locally (in-memory store) but not yet deployed or load-tested on AWS.

Simulated agents are synthetic event producers sending the same controlled requests a real workload would; current policy, suspension, budgets and approvals decide every action. For model calls they request permits and report synthetic usage against them: no model exists in the demo, and nothing calls one. There is no real inference, email, IAM change, Bedrock invocation log, external call or customer data, and the scenario driver executes no code, prompts or workflows (see design decisions). Simulated IAM, deployment verification and providers are labelled as such and are never evidence of AWS enforcement.

The console header shows a persistent "Demo" marker (the full notice is its tooltip and accessible text), the role selector (CEO by default), the simulation clock with pause, step and 1×/5×/20× speed (5× by default), an activity feed, an optional tour and a reset.

Run it locally

pnpm --filter @acp/console build
pnpm dev -- --interactive-demo

The server listens on http://127.0.0.1:8787/ (--port to change). pnpm dev -- --interactive-demo --base-path /demo emulates path-prefix hosting; the interactive-demo and interactive-demo-prefix Playwright projects test both.

How it works

The demo code is packages/demo (same handlers, RBAC, policy engine and services as the product), the fictional enterprise is config/demo (ScenarioProfile documents are rejected outside demo installations), and one services/demo-api Lambda serves all visitors with that content embedded at build time. The stack is a separate CDK app (infra/cdk/bin/demo.ts, infra/cdk/lib/demo-stack.ts) that the customer app never references.

A visitor's browser reaches CloudFront, which serves the console build from a private S3 bucket and sends /api/* and /demo/* to an HTTP API with no authorizer; one demo-api Lambda serves every visitor and keeps each visitor's workspace in DynamoDB and S3.

  • Isolation. One shared installation, no per-visitor stacks, roles or processes. The storage layer prefixes every key, index and pagination cursor with the visitor's workspace scope, so every data path is scoped.
  • Sessions. An opaque high-entropy token in an HttpOnly; Secure; SameSite=Strict cookie; only its SHA-256 is stored, and workspace and role are resolved server-side per request. Mutations need a CSRF header token and an allowed Origin. Sessions end after 30 minutes idle or 2 hours in total; DynamoDB TTL and an S3 lifecycle rule then delete the data.
  • Roles. Visitors switch between four fictional users (CEO, CFO, CTO, Compliance); switches are audited and no one can become an administrator. Product installations have no role switching or anonymous endpoints: demo routes are not in the product route table.
  • Simulation. The browser requests a tick every few seconds while visible and playing. The server computes elapsed time from its own clock (capped, no background catch-up) and processes at most 50 events per tick; a per-workspace lease and deterministic idempotency keys stop parallel tabs or retries duplicating anything.

Deploy a demo installation

Use a separate AWS account, or at least a stack name separate from any real installation. Prerequisites match the source install (Node.js 22+, pnpm, CDK bootstrap; see getting started).

pnpm install --frozen-lockfile
pnpm build:lambdas                       # builds dist/lambdas/demo-api with config/demo embedded
pnpm --filter @acp/console build
pnpm --filter @acp/infra-cdk exec cdk deploy --app "npx tsx bin/demo.ts" \
  -c installationName=acp \
  -c sourceCommit=$(git rev-parse HEAD) \
  -c demoAllowedOrigins=https://demo.example.org \
  --region us-east-1 --profile my-aws-profile

demoAllowedOrigins is required in practice: without it every browser mutation is refused (fail closed). Optional context: domainName + certificateArn (ACM, us-east-1), demoReservedConcurrency (default 20), demoRateLimit/demoBurstLimit (API stage throttling, defaults 50/100), demoDisabled=true, demoAlarmTopicArn. Synthesise without deploying: pnpm --filter @acp/infra-cdk synth:demo.

The stack is <name>-demo-app; resources follow acp-<installation>-* with installation <name>-demo: tables acp-<name>-demo-<table>, Lambda acp-<name>-demo-api, blob bucket acp-<name>-demo-blobs-<account>-<region>.

Serve under a path of an existing site

For example https://www.example.org/demo/ from an existing CloudFront distribution (not yet deployed on AWS):

  • Deploy with -c publicBasePath=/demo -c publicOrigin=https://www.example.org and include that origin in demoAllowedOrigins. The stack rewrites the console's <base href="/" /> to <base href="/demo/" />, sets the console API base (config.json apiUrl) to /demo and scopes the session cookie to Path=/demo (ACP_DEMO_COOKIE_PATH). Without publicBasePath nothing changes; the console build itself is path-agnostic.
  • On the existing distribution, route /demo and /demo/* to the stack output DemoOriginDomainName (HTTPS only, all methods, caching disabled, forward all viewer headers except Host, cookies and query strings) with a viewer-request function that redirects /demo to /demo/ and strips the /demo prefix from every other path. Do not attach the site's response-headers policy to these behaviours, so the demo's security headers pass through.

Operate it

  • Kill switch. Put {"pk": "DEMOCONTROL", "sk": "META", "disabled": true} into the acp-<name>-demo-registry table (effective within 30 seconds) or redeploy with -c demoDisabled=true. New sessions and ticks then return 503; the static site stays up.
  • Limits (defaults, configurable via ACP_DEMO_LIMITS): 50 active workspaces, 100 new sessions per hour, 6 ticks and 120 other requests per minute per workspace, 50 events per tick, 5,000 events per workspace. Protection is per-workspace and global; add per-IP limits or AWS WAF in front of CloudFront if needed.
  • Alarms. Lambda errors, throttles, p95 duration; API 5xx and 4xx spikes. Visible in CloudWatch, or notify a topic you own with -c demoAlarmTopicArn=<existing SNS topic ARN>.
  • Teardown. cdk destroy --app "npx tsx bin/demo.ts" -c installationName=<name>. Tables go with the stack; the blob bucket must be empty (objects expire after one day).

Cost drivers

Measured locally with npx tsx services/demo-api/scripts/measure-ops.ts (in-memory store, not AWS); measure before relying on these.

OperationStorage operations
New workspace (clone of the baseline)~2,550 writes (2,544 items) + 50 S3 objects
Tick at 5× (10 s of real time)mean ~160, p95 ~410
Tick at 20×mean ~560, p95 ~850
CEO dashboard view~75 reads

DynamoDB on-demand requests dominate (transactional writes bill per item, twice), then Lambda duration, API Gateway requests and CloudFront transfer. No idle simulator processes, no model charges. Use current regional prices; this page quotes none.

Docs version: 2abf6af98023 · Source: docs/demo.md · Edit on GitHub