Developer Examples

Runnable examples for Node.js and TypeScript. Each example is self-contained — clone, install, export your AGENTQA_TOKEN, and run.

Node.js Quickstart

Create a job, poll until complete, print the report. CommonJS, no dependencies, runs on Node 18+.

JavaScript
2 min to run|Node.jsCommonJSCI

TypeScript Pipeline

Full typed pipeline with BetaWindowClient class and quality gate assertions. Exits 1 on failed gates.

TypeScript
5 min to run|TypeScriptCIQuality gates

Webhook Receiver

Express server that receives job.completed webhooks, verifies HMAC signatures, logs reports.

JavaScript
3 min to run|Node.jsExpressWebhooks

Prerequisites

  • Node.js 18 or newer
  • An BetaWindow account — sign up free
  • Your API token from Settings → API Token

Common setup

# Clone the repo
git clone https://github.com/ErlisK/openclaw-workspace
cd openclaw-workspace/startup-87-betawindow-human-in-the-loop-e2e-testing-for-ai-built/examples

# Export credentials
export AGENTQA_TOKEN="eyJ..."
export APP_URL="https://your-app.vercel.app"

# Pick an example and run it
cd node-quickstart && node index.js

Sample report output

See a live sample report to understand what your AI agent receives back after a test session.

CI/CD integration

The TypeScript pipeline exits with code 1 when quality gates fail, making it a drop-in step in any CI system:

# GitHub Actions
- name: Human QA
  env:
    AGENTQA_TOKEN: ${{ secrets.AGENTQA_TOKEN }}
    APP_URL: ${{ steps.deploy.outputs.url }}
  run: |
    cd examples/typescript-pipeline
    npm install
    npx ts-node pipeline.ts

Ready to try it?

Create your first test job from the dashboard — no code required.

Get started free →