Track F: Static product

Track F provisions a static-site chat product: admin setup, knowledge ingest, workflow publish, Relay-backed browser client, and origin enforcement.

Goal

Create an admin site, ingest knowledge, publish a workflow, embed the static SDK, and run the chat widget from a browser. Verify origin enforcement blocks disallowed origins.

Prerequisites

ItemRequired
Server + Relaydocker compose -f docker/docker-compose.server.yml up -d
Node.js18+ for Vite example
Operator scripts or dashboardSite, ingest, publish
Primary examplesstatic-chat-widget, relay-byo-deployment
AppStatic chat widget walkthrough
Track BHelpful for understanding server admin APIs

Frontend developers do not define agents in browser code in production. Dashboard or admin API owns workflow shape.

Step 1: Provision site and ingest knowledge

bash
docker compose -f docker/docker-compose.server.yml up -d
bash scripts/static-provision-site.sh
export SITE_ID=... # from output
export TEXT_FILE=examples/static/chat-rag/kb.txt
bash scripts/static-ingest-knowledge.sh
bash scripts/static-publish-chat.sh

Record relay URL, site token, and allowed origins from site configuration.

Alternative: ArcFlow Dashboard Sites, Knowledge, and Chat tabs when available in your deployment.

Step 2: Configure frontend env

bash
cd examples/static/chat-rag
# set VITE_ARCFLOW_RELAY_URL and VITE_ARCFLOW_SITE_TOKEN
npm install
npm run dev

Open http://localhost:5173 and send a chat message.

Step 3: Verify successful run from allowed origin

Browser network panel should show POST to Relay /v1/sites/{id}/runs returning 201 with run_id. Poll or client callback receives assistant reply.

Optional test:

bash
pytest examples/static/chat-rag/test_static.py -q

Step 4: Verify origin enforcement

Temporarily remove http://localhost:5173 from allowed origins (or test from an unlisted origin tool). Retry chat request. Relay should reject before upstream execution.

Re-add origin and confirm chat works again.

Pass criteria:

CheckExpected
Allowed origin chatSuccess
Disallowed originBlocked at Relay
BundleNo LLM or server runtime keys, only site token
Published nameClient calls runPublished("chat", "^1.0.0",...)

Step 5: Optional BYO Relay

Deploy self-hosted Relay per relay-byo-deployment and point env vars at port 8090.

Expected output

Working chat UI with answers grounded in ingested kb.txt content. Operator scripts print site id and tokens once during provision.

Trace events you should see

Operators fetch trace via Relay or server:

Event kindWhen
WorkflowStartedPublished chat run
MemoryRetrievedKnowledge hit on question
StepCompletedChat agent step
WorkflowCompletedSuccessful reply

Troubleshooting

SymptomLikely causeFix
CORS errorOrigin not listedUpdate site allowed origins
401 on RelayInvalid site tokenRe-copy token from provision output
Empty answersKnowledge not ingestedRe-run ingest script
Inline Agent in bundleWrong dev pathUse publish flow; avoid shipping main-dev-direct.ts

What you learned

Track F splits responsibilities: operators own knowledge and publish records; frontend developers ship env vars and UI; Relay enforces browser trust boundaries.

Next tracks

TrackFocus
GMigrations, readiness, CLI trace export
Level 3 certFull stack deployment project