Skip to main content
Start the funded-company starter from a TypeScript script. You will save its run ID and read its status. This lesson uses a maintained Play, so you do not need to author or publish one.

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:
Check the effective workspace from this folder:
Authentication reports connected: true for the intended workspace. The maintained Play accepts target_count: 3 and days: 30.
If this folder does not resolve the intended authorization, complete workspace setup before continuing.

2. Save the script

Create first-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

You should see a Run ID and a Status. The status is a snapshot. It can still be 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.
If the script fails, inspect the receipt before doing anything else. A saved 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:
Repeat this inspection command while the run is processing. Do not rerun the launch script to check progress. Exiting the local script does not cancel the remote execution. When the run completes, ask your agent to show its result dataset. Review the funding evidence, founder identity, and email verification as in the first lesson. Compare 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 printed running and exited. Should you launch it again to get the result?
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.
In your next session, locate the receipt and explain how you would resume inspection. Ask your agent to check your reasoning before another submission.

Continue