Agent Handoff Packager avatar

Agent Handoff Packager

Pricing

$0.0015 / actor start

Go to Apify Store
Agent Handoff Packager

Agent Handoff Packager

Package the state one AI agent hands to another: goal, progress, files and open questions in one structured bundle with a hash, plus a report of missing fields. $0.0015 per run.

Pricing

$0.0015 / actor start

Rating

0.0

(0)

Developer

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Features

Limited permissions

Share

Create a portable task handoff bundle with a deterministic hash, missing-field report and explicit artifact-reference verification labels.

This Actor runs Agent Handoff Packager only. Supply its native JSON object directly; no utility selector or dispatcher wrapper is accepted. Core computation is deterministic and offline: no LLM calls, remote schema retrieval or target-site requests. Apify runtime storage is used to save the result.

Behavior and limits

Primary fields: task_state, decisions, artifacts and blockers. Missing fields yield fail. References accept POSIX local paths, file URLs and HTTP(S), checked statically. Unsupported schemes, Windows drive-letter paths, credentials, malformed ports/brackets, controls and protocol-relative references fail checks. Registry matches are labeled caller_supplied; other references are unverified. No artifact is opened or fetched. Array limits are 10,000; hashes identify caller data, not attestation.

Every request is limited to 2,000,000 bytes of canonical UTF-8 JSON. Runtime validation uses the bundled exact input_schema.json. The Console form is a supported Apify schemaVersion 1 presentation: root fields/types are retained, while nested and cross-field constraints run inside the Actor. Inputs containing arbitrary JSON or boolean schemas stay native JSON, without string encoding or forced object conversion. Schema evaluation is intended for bounded trusted workloads; it is not an adversarial multi-tenant sandbox.

Input

FieldRequiredJSON typeMeaning
task_stateno"object"Native utility field; exact nested shape is in input_schema.json.
decisionsno"array"Native utility field; exact nested shape is in input_schema.json.
artifactsno"array"Native utility field; exact nested shape is in input_schema.json.
blockersno"array"Native utility field; exact nested shape is in input_schema.json.
artifact_registryno"object"Native utility field; exact nested shape is in input_schema.json.

Example input (example-input.json):

{
"task_state": {
"task": "inspect"
},
"decisions": [],
"artifacts": [],
"blockers": []
}

Output and status

The Actor stores one result envelope in the default dataset and the same envelope under key OUTPUT in the default key-value store. Data fields for this utility: bundle, bundle_hash, missing_fields, errors.

  • status: pass: execution completed and the result/check passed.
  • status: fail: execution completed and found a failed check, policy or retention constraint. This is a completed Actor run, not a runtime crash.
  • status: error: execution could not complete, with stable errors[].code, message and JSON Pointer path; the local process exits 2.

The envelope also contains utility, version, request_id, data, errors, warnings and provenance. See the output_schema.json, .actor/dataset_schema.json, and .actor/output_schema.json. Fields named errors inside data are check findings; envelope errors describe execution failures. Do not treat a platform run's success flag alone as a passing policy/check.

Actual core output for the example (example-output.json):

{
"utility": "agent-handoff-packager",
"version": "1.0.0",
"request_id": "documented-example",
"status": "pass",
"data": {
"bundle": {
"task_state": {
"task": "inspect"
},
"decisions": [],
"blockers": [],
"artifacts": []
},
"bundle_hash": "sha256:2a352927acd86c9f9ddc1bae21045d061c6288fae1a2030afda7373f09ff858e",
"missing_fields": [],
"errors": []
},
"errors": [],
"warnings": [
"Artifact existence is not independently verified; supplied registry is caller evidence"
],
"provenance": {
"engine": "deterministic-python",
"network_access": false,
"input_hash": "sha256:2a352927acd86c9f9ddc1bae21045d061c6288fae1a2030afda7373f09ff858e"
}
}

The request ID above is fixed for illustration; actual Actor runs generate their own request IDs. Runtime provenance additionally identifies local or Apify storage; the example shows the utility's computed envelope before that storage annotation. Hashes identify supplied data, not independently verified facts.

Run through the API

Replace YOUR_APIFY_USERNAME with the namespace of this Actor's published listing. The fixed Actor name is agent-handoff-packager. This example assumes the Actor has been built and made accessible in that namespace; this README does not itself establish deployment or publication.

curl --fail-with-body --request POST \
--header "Authorization: Bearer $APIFY_TOKEN" \
--header 'Content-Type: application/json' \
--data-binary @example-input.json \
'https://api.apify.com/v2/acts/YOUR_APIFY_USERNAME~agent-handoff-packager/run-sync-get-dataset-items?format=json'

The response is an array containing the result envelope. Inspect its status and findings before consuming data. For asynchronous integrations, start a run, wait for completion and retrieve the default dataset or key-value-store OUTPUT. API authorization credentials belong in your client environment, never in utility input or captured fixtures.

Run locally

From this self-contained Actor directory, with Python 3.11 or newer:

python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python -m app --input example-input.json --storage-dir ./storage

This executes the fixed utility using real local SDK filesystem storage. It does not start another Actor or dispatch to another portfolio utility. A completed finding has envelope status fail while completing the storage run normally; execution errors exit 2. Inspect the stored envelope rather than assuming that a zero process exit means a check passed.

Compose with other utilities

Include Token Budget Packer selections and omissions in task_state or artifacts, and supply known decisions/blockers. Downstream agents must independently retrieve artifacts and assess freshness.

Composition is explicit caller orchestration: this Actor does not invoke other Actors. Pass only documented data fields between contracts and check every envelope status. Offline core tests use supplied fixtures; the Actor does not fabricate evidence or verify that supplied events, usage or artifact references occurred.