Before you start
Complete Start with your agent through its connection and Play inspection steps. This lesson starts a new provider-backed run and can incur usage, even if you already completed the agent lesson. Use Node.js 24.12 or later and npm. This example uses Node’s built-in TypeScript support. The.mts extension makes the script an ES module.
1. Prepare a project
In your terminal, create a new folder and install the SDK:Authentication reports
connected: true for the intended workspace. The
maintained Play accepts target_count: 3 and days: 30.2. Save the script
Createfirst-run.mts in that folder:
Deepline.connect() uses SDK configuration, including supported CLI credentials.
It constructs the client. It does not by itself prove that a request is authorized.
The script creates a receipt before submission. The exclusive wx flag prevents
another launch when that file already exists. After submission, the script saves
job.id before reading status.
3. Start the run once
queued or running when the script exits.
first-run-receipt.json contains the same run ID printed in your terminal.
You now have the identity needed to inspect this execution.runId means you can inspect that run. A null runId means this script
has no confirmed execution identity. Investigate the submission before starting
new work. Do not delete the receipt merely to bypass the guard.
4. Inspect the same execution
Replace<run-id> with the value in your receipt:
count with
requested_count and shortfall_count. Completion does not guarantee three
accepted rows. A failure needs diagnosis rather than an invented result.
You started a maintained Play from the SDK, saved job.id, and used that ID
to observe the same work.
Check your understanding
The script printedrunning and exited. Should you launch it again to get the result?
Show the answer
Show the answer
No. The remote run can continue after the script exits. Inspect the ID saved
in the receipt. Starting another run creates separate work and can incur
usage.
Continue
- Call Plays covers other supported callers.
- Production integration covers durable submission and recovery.
- Write Plays covers your own workflow logic.