Documentation/Start hereDownload prototype ↓

START HERE / DESIGN PARTNER PREVIEW

Run the working prototype.

Install the pinned dependencies, start local emulation, and exercise the full lifecycle.

1. Get the source

Download the self-contained prototype bundle. It includes the application, migrations, test drivers, pinned dependency lockfile, and the narrower engine portability probe. Credentials and deployment state are excluded.

Download prototype ↓

2. Install and start

You’ll need Bun and Python 3. Extract the archive, then run these commands inside the extracted directory:

bun install --frozen-lockfile
bun run typecheck
python3 scripts/alchemy.py dev --stage repro-local

The wrapper generates two bearer tokens in a local .env file. The application listens on port 18741. Leave this terminal running.

3. Exercise the lifecycle

In a second terminal in the same directory:

bun scripts/exercise.ts http://localhost:18741 local

The driver runs 14 checks covering authentication, schema validation, tenant separation, optimistic updates, tool execution, tool upgrades, outbound networking and revocation. Results are written to results/local.json.

4. Check persistence

Stop the dev server and start it again with the same stage. Then:

bun scripts/persistence.ts local local-persistence

This checks that an earlier record and revoked-tool status survived the restart.

What the source contains

FileRole
src/research.tsD1 resource, Effect service and binding Layer
src/api.tsTrusted host and Dynamic Worker execution
alchemy.run.tsInfrastructure composition
probes/portable.tsWorker-hosted infrastructure lifecycle experiment

Live deployment

For your own Cloudflare account, authenticate with Wrangler and set your account ID. Cloud resources can incur charges. The prototype database is disposable; teardown deletes its data.

bunx wrangler login
export CLOUDFLARE_ACCOUNT_ID="your-account-id"
python3 scripts/alchemy.py deploy --stage repro --yes
# Use the printed Worker URL with scripts/exercise.ts.
python3 scripts/alchemy.py destroy --stage repro --yes

Keep the local .alchemy/state directory until teardown. The included README covers engine-probe execution separately.

Version compatibility

The validated baseline pins Alchemy 2.0.0-beta.79 and Effect 4.0.0-rc.117. The app uses Cloudflare compatibility date 2026-09-08 to match the bundled local runtime. Do not replace these with unrelated latest versions when reproducing the result.