Integrate

SDK, paste-to-AI, or manual

The SDK is the preferred path. ACP also generates a deterministic long-form client plus an instruction prompt you can paste into a coding agent, or you can wire the pieces yourself.

Wrap the call you already have

wrapAgentRun refuses to run while the agent is paused or stopped, times the call, extracts token counts from OpenAI- or Anthropic-shaped responses, and reports the run. Errors are reported and rethrown.

agent-control-panel · run wrapper

          
Batching

Runs buffer and flush every 5 seconds, or immediately at 50 buffered. The buffer is capped at 200; excess drops oldest first.

Retries

A failed flush retries four times with jittered backoff, then drops the batch and logs the count. Reporting never throws into your code.

Shutdown

The client flushes on beforeExit and on acp.stop(), so the last runs of a process still arrive.