ANTIGEN_API_KEY and works only
with approved targets.
Two ordering rules make every one of these programs recoverable: write the Run ID as soon as
creation succeeds, and write an event sequence only after that event has been processed.
Create, observe, and act on a finding
Reads approved targets, creates a Run with explicit Guardrails, persists the Run ID and event checkpoint, then turns the first finding’s remediation into a next action.Recover after a local interruption or timeout
Restores the saved Run and event position, reads its status, and resumes only the events that follow the saved checkpoint. Run this after any interruption of the program above.run.wait only when you are not consuming events, and treat its AntigenWaitTimeoutError
as a local deadline rather than a result:
Create and recover through the HTTP API
Use this when the application owns its own HTTP client and persistence.curl, jq, and
ANTIGEN_API_KEY are the only prerequisites. Confirm the target is approved, create the Run, and
save its ID:
GET /v1/runs/{runId} and resume events after the saved sequence. Do not resend the creation
request because the caller did not receive a conclusive response.
List and read a prior assessment
runs.list reads an organization-visible page; runs.get reads a record you already saved. The
continuation cursor is opaque and must be returned unchanged.
Send guidance, then choose a lifecycle action
Reads the stored Run before sending guidance inside its approved scope, then decides an action from the observed status rather than assuming one is valid.run.stop() requests a reviewable pause, run.resume() applies only to a stopped Run, and
run.cancel() is terminal. Use each one to express a decision about the assessment. A local timeout
is not a lifecycle action.
These programs produce technical evidence. Turning it into accountable work, and handing an
assessment to another operator, is covered in Guides.
Related pages: TypeScript SDK for method and option details, Guides
for evidence and recovery decisions, HTTP API reference for the direct contract, and
Reliability and security for credential expectations.