Queuety
Features

Artifacts

Artifacts let you store durable workflow outputs without inflating the main workflow state payload.

They are a good fit for draft documents, extracted JSON plans, citations, source manifests, generated file paths, or prompt and response snapshots that you want to inspect later. This is especially useful for agent workflows, where the final state should stay small and readable even though each run may generate large intermediate outputs.

Why artifacts instead of workflow state

Workflow state is ideal for the small public data the next step needs immediately.

Artifacts are better when the output is larger than normal state values, mostly for later inspection, useful across review or export surfaces, or simply better modeled as a named output than as one large state blob.

Store an artifact for the current workflow step

When code is already running inside a workflow step, use Queuety::put_current_artifact():

use Queuety\Queuety;
use Queuety\Step;

final class DraftBriefStep implements Step
{
    public function handle(array $state): array
    {
        $draft = [
            'title' => 'Pricing brief',
            'body' => '...',
        ];

        Queuety::put_current_artifact(
            'draft',
            $draft,
            'json',
            [ 'source' => 'planner' ],
        );

        return [ 'draft_ready' => true ];
    }

    public function config(): array
    {
        return [];
    }
}

Queuety automatically attaches the current workflow ID and step index.

Store an artifact from outside the workflow

If you already know the workflow ID, use Queuety::put_artifact():

Queuety::put_artifact(
    $workflow_id,
    'research_brief',
    "# Research Brief\n\nDone.",
    'markdown',
    metadata: [ 'reviewed_by' => 'editor@example.com' ],
);

Read artifacts back

$artifact = Queuety::workflow_artifact( $workflow_id, 'draft' );

$artifacts = Queuety::workflow_artifacts( $workflow_id );

Each artifact record includes its key, kind, content, metadata, step_index, created_at, and updated_at fields.

Workflow status integration

Queuety::workflow_status() now includes a small artifact summary:

$status = Queuety::workflow_status( $workflow_id );

echo $status->artifact_count; // 2
print_r( $status->artifact_keys ); // ['draft', 'citations']

That keeps artifacts visible without pulling their full content into status output.

CLI

List artifacts for a workflow:

wp queuety workflow artifacts 42

Show one artifact with content:

wp queuety workflow artifact 42 draft

See CLI for the full command reference.

Exports and replay

Artifacts are included in workflow exports and copied into replayed workflows.

That means artifact-backed agent runs stay inspectable even when you move them between environments or recreate a run from its exported execution history.

On this page