Skip to content

Session setup

Prepare your tools before the workshop, then complete the temporary-account and deployed-starter steps with the hosts. They will give you an event code live in the session. Your first working result is a browser page that says pong.

Cloudflare provides a separate temporary account with the workshop’s Workers AI and Containers access already enabled. Use this account for the entire workshop. No paid-plan signup, account entitlement checks, or model API keys are needed.

One setup, two ways to follow it

Already comfortable with your tools? Run the commands and compare the results. Open any help you need.

0 of 3 checks confirmedYour finish line ↓
Tick each check after it succeeds. Your place is saved in this browser.

Use Git Bash on Windows, Terminal (zsh) on macOS, or Bash on Ubuntu. Call this window Terminal A.

Terminal window
node --version
npm --version
git --version
curl --version

Look for: Node 24.11+ within Node 24 (recommended), or 22.19+ within Node 22; the other commands each print a version. Missing something? Install only the missing tools.

Help me choose a terminal and Node version

On Windows, open Git Bash from Start; in VS Code choose the Git Bash terminal profile. The commands in this guide use Bash-style syntax, not PowerShell. On macOS use the default Terminal app; on Ubuntu use Terminal.

Already have a supported Node version? Keep it. Volta is the recommended installer if you need Node, not an extra requirement for an existing setup. Node 23 and other major versions are not supported for this workshop. Run one command block at a time and wait for the terminal prompt to return.

In Terminal A, first use cd to open the parent folder where you want the lab folder created. For example, this can be a workspace folder you already use. The commands below clone into that current folder; they do not move you to $HOME:

Terminal window
pwd
git clone --branch main https://github.com/omkarkhair/field-trip-agent.git
cd field-trip-agent
npm ci && npm run typecheck && npm run build
git status --short

Look for: pwd prints the parent folder you chose; installation, typecheck, and build finish successfully; git status --short prints nothing. Open the field-trip-agent folder inside that parent folder in a code editor, such as VS Code.

In VS Code, choose File → Open Folder and select field-trip-agent in your chosen parent folder. You’ll create and edit the workshop files in this editor. Use your terminal for command blocks, such as npm run deploy.

What am I installing, and where do I run commands?

npm ci installs the exact lab dependencies, including Wrangler 4.143.0. The initial event-account deployment uses npx wrangler@latest so it has the latest temporary-account support. After claiming the account, use the lab’s normal npm run deploy and project-local npx wrangler commands. No global Wrangler installation is needed. Audit notices do not require changing the workshop’s lockfile or pinned versions.

Run the remaining terminal commands from the field-trip-agent folder. If that folder already exists, ask a facilitator to check it is a clean main starter before reusing it.

2. Create and claim your temporary workshop account

Section titled “2. Create and claim your temporary workshop account”

Wait for the hosts to share the event code. In Terminal A, in the field-trip-agent folder you built in step 1, prepare Wrangler for temporary account creation:

Terminal window
unset CLOUDFLARE_ACCOUNT_ID
npx wrangler@latest logout

This signs the Wrangler CLI out; you can stay signed in to the dashboard in your browser. If you use an API token on this computer, open the help below first.

Replace XXXX-XXXX-XXXX with the event code the hosts give you, then run:

Terminal window
npx wrangler@latest deploy --temporary --event-code XXXX-XXXX-XXXX

If npm asks to install the latest Wrangler, accept the installation. Read the Cloudflare Terms of Service and Privacy Policy prompt, then type yes to continue if you agree. Wrangler creates your temporary account and deploys the starter you built in step 1.

Look for: Temporary account ready, a Claim URL, and the deployed field-trip-agent URL. For example:

Temporary account ready:
Account: Frosted Sailboat (created)
Claim within: 7 days
Claim URL: https://dash.cloudflare.com/claim-preview?claimToken=<your-claim-token>
...
Deployed field-trip-agent triggers
https://field-trip-agent.frosted-sailboat.workers.dev

Your account name and URLs will be different. Open the full Claim URL from your own terminal in your browser. Sign in with your Cloudflare user (or create a login), then complete the claim prompts. Claim it now, before moving on; the Claim within line is the claim deadline, not a step to postpone.

In the Cloudflare dashboard, you should now see a new account attached to your Cloudflare user, with the name printed by Wrangler (for example, Frosted Sailboat). Select that new account and use it for every checkpoint and dashboard visit in this workshop.

Now reconnect the CLI to the Cloudflare user that claimed the account. In Terminal A:

Terminal window
npx wrangler@latest login

Authorize Wrangler in the browser with the same Cloudflare login used to claim the temporary account. Then save the new account’s ID below.

Run this block after saving your account ID:

Terminal window
export CLOUDFLARE_ACCOUNT_ID="<your-account-id>"

Saving the ID personalizes the guide’s copy buttons. Running the export selects the temporary account in this terminal. Repeat it in each terminal you use for the workshop.

Help with temporary-account creation and claiming
  • Already authenticated / cached account error: temporary creation requires Wrangler to be signed out. If environment credentials override the logout, clear them in this terminal, then retry the event-code deployment:
Terminal window
unset CLOUDFLARE_ACCOUNT_ID CLOUDFLARE_API_TOKEN CLOUDFLARE_API_KEY CLOUDFLARE_EMAIL
unset CF_ACCOUNT_ID CF_API_TOKEN CF_API_KEY CF_EMAIL
npx wrangler@latest logout
  • Missing or rejected event code: copy the exact code from the hosts, with its hyphens. If Wrangler says the event is inactive or has no accounts left, ask a host for help.
  • Claim URL: use the full URL printed for your own account, including its claimToken. If it is expired or cannot be claimed, ask a host for help.
  • New account not visible: finish the claim prompts, refresh the dashboard, and check you are signed in with the user that claimed it.
  • Previously saved settings: replace both the account ID and workers.dev value in this guide with the new temporary account’s values.

3. Save your temporary account’s URL and see pong

Section titled “3. Save your temporary account’s URL and see pong”
Your deployment URL

Set your workers.dev subdomain once

Select your new temporary account and find Your subdomain in Workers & Pages. Save the part before .workers.dev, or paste the full Worker URL printed by your temporary deployment.

No workers.dev subdomain shown yet?

Check that you completed the claim and selected the newly created account in Workers & Pages. You can also paste the full Worker URL from the temporary deployment. If neither is available, ask a host for help.

Saving a name on this workshop page fills the guide's commands and browser-test links; it does not register that name with Cloudflare.

https://field-trip-agent.<subdomain>.workers.dev

Help me find my URL and open the second terminal

Select the newly claimed account in the dashboard and open Workers & Pages. Copy its Your subdomain value, or paste the full deployed Worker URL from the temporary deployment. In the example above, the subdomain is frosted-sailboat and the Worker URL is https://field-trip-agent.frosted-sailboat.workers.dev. The subdomain is different from the 32-character account ID. Use your own account’s values, then click Use this URL.

Open a second window with the same shell. In VS Code use Terminal → New Terminal. Call it Terminal B: it runs deployment and verification commands. Terminal A runs the local server when you use Local dev. Keeping these two windows is useful throughout the workshop.

With field-trip-agent open in VS Code, choose Terminal → New Terminal and call it Terminal B. It should open in the same lab folder regardless of where you cloned it. Confirm the repository path, then select your workshop account:

Terminal window
git rev-parse --show-toplevel
export CLOUDFLARE_ACCOUNT_ID="<your-account-id>"

Look for: the first command prints the field-trip-agent folder you chose in step 1. If it prints an error, use cd to open that folder before continuing.

Keep using this same temporary account for the whole workshop. From checkpoint 1 onward, use the normal npm run deploy commands with this account ID exported. The event-code command above was the initial account-creation step.

The starter was already deployed in step 2. In Terminal B, test that deployment:

Terminal window
sleep 5
curl https://field-trip-agent.<subdomain>.workers.dev/api/ping

Look for: pong in the terminal and at this browser link:

Save your workers.dev subdomain to open this test ↗https://field-trip-agent.<subdomain>.workers.dev/api/ping

If your temporary deployment printed a different URL, save that full URL above and rerun the curl command with the updated address.

The chat UI gets its agent in checkpoint 1. For now, pong is the goal.

If a step fails, keep the output visible and contact a host. Share your operating system, failing command, and error; for account issues include the temporary account name and ID. Keep your claim URL and any credential values out of shared error reports.

Find the fix for a common error
What you see What to do next
command not found or wrong Node version Install the missing tool, reopen the correct terminal, and rerun its check.
field-trip-agent already exists Ask a facilitator to confirm it is a clean main starter.
Wrangler’s browser does not open Open the authorization URL printed by Wrangler in your Cloudflare browser.
--temporary says you are already authenticated or an account is cached Open temporary-account help, sign the CLI out, and clear environment credentials before retrying.
Event code rejected or no event accounts left Ask a host to confirm the code and event availability.
Wrong account, missing account, or 401 after claiming Run npx wrangler@latest login with the user that claimed the account, then export the saved temporary account ID in this terminal.
403, upgrade prompt, or product disabled Make sure you selected the newly claimed temporary account and exported its ID. If it still fails, ask a host; the workshop entitlements are provided.
Quota or rate-limit error Wait and retry for a temporary rate limit; ask a host if the workshop account remains blocked.
Use port 5180 if 5173 is busy

In Terminal A, stop the server with Ctrl+C, then run:

Terminal window
npm run dev -- --port 5180

In Terminal B:

Terminal window
curl http://localhost:5180/api/ping

Use http://localhost:5180 in the browser and in later local smoke-test commands.

Prefer to read ahead? Download the workshop deck →

Open installation instructions for Windows, macOS, or Ubuntu

Choose one operating-system tab. Install only the tools you are missing; run each block in order and wait for its prompts to finish. Return to step 1 after Node, npm, Git, and curl are ready. VS Code is optional if you already have an editor.

On a managed computer where installation is blocked, show the output to a facilitator for the session’s installation path. Installers may request an administrator password.

Use Windows PowerShell (5.1 or 7) on a supported Windows 11 x64 computer. The installation commands below are PowerShell commands; the rest of the guide uses Git Bash, which comes with Git for Windows.

1. Install Volta. If winget is missing, install or update App Installer from the Microsoft Store.

Terminal window
winget install --id Volta.Volta --exact --source winget --accept-source-agreements --accept-package-agreements

Close PowerShell, open a new PowerShell window, and install the tested Node release:

Terminal window
volta install node@24.19.0

2. Install Git:

Terminal window
winget install --id Git.Git --exact --source winget --accept-source-agreements --accept-package-agreements

Close PowerShell and open Git Bash from Start. Return to step 1 to check Node, npm, Git, and curl.

Optional: install VS Code if you need an editor. In PowerShell:

Terminal window
winget install --id Microsoft.VisualStudioCode --exact --source winget --accept-source-agreements --accept-package-agreements

After installation, reopen the shell listed in step 1 and rerun the failed check. Return to step 1 for Node, npm, Git, and curl.

Finish these three setup steps with the hosts

Use the checkboxes above to track your results. This page cannot inspect your computer or account.

Next: 1. Hello agent →