Connect an existing app
You do not restructure the app. You register it, set four environment variables, install agent-control-panel, and wait for the first heartbeat.
Create the app and agents
Register the app and create its agents in the dashboard. Copy the agent ID into ACP_AGENT_ID. Each SDK client represents one agent; create a client for each agent you want to report.
Set four environment variables
createClient throws at startup if url, apiKey, agentId or webhookSecret is missing; it refuses to accept unsigned control commands. Everything after startup is fail-open.
Install the SDK and mount one route
Save the generated file as acp.ts. The webhook handler reads the raw body to verify the HMAC, so it must not sit behind express.json().
The long-form generated client is still available for apps that cannot add a dependency. It is the same protocol written out by hand.
Confirm the first heartbeat
The client sends one heartbeat immediately, then every 30 seconds. The dashboard marks the app connected on the first accepted beat.