Skip to content

feat: migrate direct actor tools to canonical RunResponse shape #852

@jirispilka

Description

@jirispilka

Problem

Direct actor tools (e.g. apify--rag-web-browser) still use the old execution path (callActorGetDatasetbuildActorResponseContent) which returns items inline with the pre-v4 { runId, datasetId, items, instructions } shape. PR #825 (branch feat/async-call-actor) ships the canonical RunResponse for call-actor and get-actor-run but explicitly defers this migration. The result: two different response shapes depending on which tool the LLM uses.

Proposed solution

Replace defaultActorExecutor to call actor.start() then fetchActorRunData() — the same path call-actor already uses — and return buildGetActorRunSuccessResponse(). Items are no longer inlined; the LLM follows the nextStep hint to get-dataset-items.

Internal repo: update any tests/code reading items / instructions / top-level datasetId from direct actor tool responses.

Blocked by: PR #825


⚠️ Schema gotcha: outputSchema.storages.datasets.default.itemsSchema.properties declares per-Actor row shape (e.g. { url: { type: 'string' } }). LLMs may read this as "url is returned in structuredContent" — it isn't. Rows live in the referenced dataset; fetch with get-dataset-items. Mitigated by itemsSchema.description. Fallback if LLMs misread: move the hint to tool description / _meta.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-aiIssues owned by the AI 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