Session setup
Session setup
Section titled “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.
1. Get the lab running
Section titled “1. Get the lab running”Use Git Bash on Windows, Terminal (zsh) on macOS, or Bash on Ubuntu. Call this window Terminal A.
node --versionnpm --versiongit --versioncurl --versionLook 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:
pwdgit clone --branch main https://github.com/omkarkhair/field-trip-agent.gitcd field-trip-agentnpm ci && npm run typecheck && npm run buildgit status --shortLook 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:
unset CLOUDFLARE_ACCOUNT_IDnpx wrangler@latest logoutThis 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:
npx wrangler@latest deploy --temporary --event-code XXXX-XXXX-XXXXIf 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.devYour 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:
npx wrangler@latest loginAuthorize Wrangler in the browser with the same Cloudflare login used to claim the temporary account. Then save the new account’s ID below.
Save your Cloudflare account ID
In the Cloudflare dashboard, select the new temporary account you just claimed. Open Workers & Pages → Account Details and copy its 32-character Account ID. Save it here to fill the guide's commands.
Find the account ID with Wrangler instead
After claiming the account and logging Wrangler back in, run npx wrangler whoami in your field-trip-agent folder. Find the temporary account's name in the table and copy the ID from that same row.
Example only — copy the ID from your own terminal, not this example.
| Account Name | Account ID |
|---|---|
| Frosted Sailboat (example) | 0123456789abcdef0123456789abcdef |
Find the account ID in the Cloudflare dashboard
- Open the Cloudflare dashboard and select the new temporary account you claimed for this workshop.
- Open Search (or press ⌘K on macOS / Ctrl+K on Windows or Linux). Type
Copy account IDand select that result to copy the ID. - Return to this page, paste the ID below, and click Use this account.
You can also open Workers & Pages → Account Details and click the copy button next to Account ID.
Run this block after saving your account ID:
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:
unset CLOUDFLARE_ACCOUNT_ID CLOUDFLARE_API_TOKEN CLOUDFLARE_API_KEY CLOUDFLARE_EMAILunset CF_ACCOUNT_ID CF_API_TOKEN CF_API_KEY CF_EMAILnpx 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”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.
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:
git rev-parse --show-toplevelexport 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:
sleep 5curl https://field-trip-agent.<subdomain>.workers.dev/api/pingLook 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.
In Terminal A, start the server and leave it running:
npm run devWait for VITE ... ready and http://localhost:5173/. In Terminal B:
curl http://localhost:5173/api/pingLook for: pong. Local dev is useful for troubleshooting;
complete Live deploy too to open the starter in your temporary account.
Open the local starter ping in your browser ↗http://localhost:5173/api/ping
The chat UI gets its agent in checkpoint 1. For now, pong is the goal.
Stuck? Get help with the failed check
Section titled “Stuck? Get help with the failed check”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:
npm run dev -- --port 5180In Terminal B:
curl http://localhost:5180/api/pingUse http://localhost:5180 in the browser and in later local smoke-test commands.
Prefer to read ahead? Download the workshop deck →
Install missing tools
Section titled “Install missing tools”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.
winget install --id Volta.Volta --exact --source winget --accept-source-agreements --accept-package-agreementsClose PowerShell, open a new PowerShell window, and install the tested Node release:
volta install node@24.19.02. Install Git:
winget install --id Git.Git --exact --source winget --accept-source-agreements --accept-package-agreementsClose 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:
winget install --id Microsoft.VisualStudioCode --exact --source winget --accept-source-agreements --accept-package-agreementsUse Terminal with zsh, the macOS default shell. This route uses Homebrew; check its supported macOS versions if your computer is running an older release.
1. Install Homebrew if brew --version does not work:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Finish any Command Line Tools installation and run the Next steps printed
by Homebrew to add brew to your shell. Confirm brew --version works before
continuing; the instructions differ between Apple Silicon and Intel Macs.
2. Install Git, then install Volta and the tested Node release:
brew install gitcurl https://get.volta.sh | bashexport VOLTA_HOME="$HOME/.volta"export PATH="$VOLTA_HOME/bin:$PATH"volta install node@24.19.0The Volta installer updates your zsh startup configuration. The two export
commands make Volta available immediately in the current terminal. Return to
step 1 to check Node, npm,
Git, and curl.
Optional: install VS Code if you need an editor:
brew install --cask visual-studio-codeUse Bash on Ubuntu 22.04 or 24.04, with sudo access, on x86-64 or ARM64.
1. Install Git, then install Volta and the tested Node release. The Volta
installer updates ~/.bashrc; this command also activates Volta in the current
Bash terminal.
sudo apt-get updatesudo apt-get install -y ca-certificates curl git(set -o pipefail; curl https://get.volta.sh | bash)export VOLTA_HOME="$HOME/.volta"export PATH="$VOLTA_HOME/bin:$PATH"volta install node@24.19.0Return to step 1 to check Node, npm, Git, and curl.
Optional: install VS Code if you need an editor. On Ubuntu Desktop with Snap enabled:
sudo snap install code --classicIf Snap is unavailable, use the official VS Code Linux package.
After installation, reopen the shell listed in step 1 and rerun the failed check. Return to step 1 for Node, npm, Git, and curl.
Use the checkboxes above to track your results. This page cannot inspect your computer or account.
Next: 1. Hello agent →