Skip to content

Improve apify actors start output for async workflows #1137

@patrikbraborec

Description

@patrikbraborec

Summary

Improve apify actors start output for async agentic workflows.

Problem

apify actors start intentionally returns immediately after starting a run. This is useful, but the output should make it clear that the run has not finished yet and should include concrete next commands.

It is not enough to say apify runs wait <runId> in documentation-style text. The command should print the actual run ID returned by the platform.

Desired human-readable output

Run started.

Actor: test-broken-actor (M4wKY3jNvHeoT87xA)
Run ID: abcdef123456789
Status: RUNNING

This command does not wait for the run to finish.

To wait for the final status:
  apify runs wait abcdef123456789 --json

To stream or inspect logs:
  apify runs log abcdef123456789

To inspect run metadata:
  apify runs info abcdef123456789 --json

Desired JSON output

{
  "ok": true,
  "operation": "actors.start",
  "waited": false,
  "actor": {
    "id": "M4wKY3jNvHeoT87xA",
    "name": "test-broken-actor"
  },
  "run": {
    "id": "abcdef123456789",
    "status": "RUNNING",
    "url": "https://console.apify.com/actors/M4wKY3jNvHeoT87xA/runs/abcdef123456789"
  },
  "next": {
    "wait": "apify runs wait abcdef123456789 --json",
    "log": "apify runs log abcdef123456789",
    "info": "apify runs info abcdef123456789 --json"
  }
}

Optional follow-up

Consider adding:

apify actors start --wait --json

This overlaps with apify call, so it may be optional. The more important improvement is that the default async output includes concrete IDs and next commands.

Acceptance criteria

  • apify actors start output includes the concrete run ID.
  • Human-readable output says clearly that the command does not wait for completion.
  • Human-readable output includes copy-pasteable wait/log/info commands.
  • --json output includes ok, operation, waited, run.id, run.status, and next.

Metadata

Metadata

Assignees

Labels

t-dxIssues owned by the DX team.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions