Skip to main content
This example lives in the monorepo, but it intentionally uses the published npm package:
This example is also compatible with OpenClaw-style integrations.
It demonstrates how an external TypeScript app can consume Agent Control without using local workspace linking. Use an agent-control npm version compatible with your server version (this example currently pins 0.2.0).

Prerequisites

  1. Node.js 20+
  2. Agent Control server running (from repo root):
  3. Optional API key (if server auth is enabled). This example creates, updates, and deletes controls, so it must be an admin key:
If you started the full local stack with the repo-root docker-compose.yml, the default admin key is 29af8554a1fe4311977b7ce360b20cc3.

Run

If your server requires auth:

What It Does

The script in src/quickstart.ts performs:
  1. SDK init with server URL and optional admin API key
  2. health check request
  3. list controls request
  4. create control request
  5. set/get control data requests (regex evaluator example)
  6. cleanup delete of the created control

Validate Types

Source Code

View the complete example with all scripts and setup instructions: TypeScript SDK Example