global/content-generate
Multi-variant social content generation — one card per variant.
Category: global
Source: workflows/content/generate.py
Input Schema
Section titled “Input Schema”| Field | Type | Default | Description |
|---|---|---|---|
audience | string | "general" | Target reader persona (e.g. ‘curious learners’). |
channels | string[] | — | Distribution channels (e.g. [‘instagram’]). Shapes prompt guidance. |
content_types | string[] | — | Card kinds to distribute across variants. Each variant picks content_types[variant_index % len(content_types)]. Valid values: ‘video’ | ‘carousel’ | ‘image’ | ‘text’. Unrecognised entries are ignored; an empty list falls back to ‘text’. |
industry | string | "" | Caller’s industry / vertical (e.g. ‘specialty coffee’). |
keywords | string[] | — | Keywords / themes to weave into the content. |
length_hint | string | "" | Free-form length / format guidance appended to the body prompt. Use this to steer concise output (e.g. ‘tweet-thread style, under 8 short paragraphs’). |
max_chars | object | — | Hard cap on the generated body length, in characters. When set, the prompt instructs the model to keep the post under this limit and the post-processor truncates if the model overshoots. |
regenerate | object | — | When set, this run is a regeneration. Workflows may read direction / keep / extra_instructions to modulate prompts; the engine persists parent_run_id and parent_variant_index as run lineage columns. |
tone | string | "" | Voice/tone hint (e.g. ‘warm’, ‘punchy’). Empty = let the model pick. |
topic | string | "" | Subject of the content to generate. |
variants | integer | 1 | Number of independent variant executions (1–10). When > 1, the engine runs the workflow N times with different sampling, producing N outputs. |
Output Schema
Section titled “Output Schema”| Field | Type | Default | Description |
|---|---|---|---|
content | string | required | Post body / caption. |
evaluation | object | — | Quality evaluation envelope (scores, improvements, ready_to_publish). |
kind | object | — | Variant card shape: video / carousel / image / text. Surfaced on the per-variant entry of the run-output API and used by gallery UIs to pick the right layout. |
tags | string[] | — | Hashtag-style labels (no leading ’#’). |
title | string | required | Post title / headline. |
Task Pipeline
Section titled “Task Pipeline”analyze_topic → generate_content → evaluate_quality| Task | Description |
|---|---|
analyze_topic | Analyze the topic and pick this variant’s card kind. |
generate_content | Generate the post body in the format chosen by analyze_topic. |
evaluate_quality | Score the generated post and emit the variant’s terminal output. |
Run-spec example
Section titled “Run-spec example”Save the YAML below as my-run.yaml, edit the values, and run with the CLI or POST it to the API. Required fields are uncommented; optional knobs are documented above the input: block — copy any line under input: and uncomment to set.
workflow: global/content-generate
# Optional fields — copy any line(s) under `input:` and uncomment to set:# Target reader persona (e.g. 'curious learners').# audience: general## Distribution channels (e.g. ['instagram']). Shapes prompt guidance.# channels: []## Card kinds to distribute across variants. Each variant picks ``content_types[variant_index % len(content_types)]``. Valid values: 'video' | 'carousel' | 'image' | 'text'. Unrecognised entries are ignored; an empty list falls back to 'text'.# content_types: []## Caller's industry / vertical (e.g. 'specialty coffee').# industry: ""## Keywords / themes to weave into the content.# keywords: []## Free-form length / format guidance appended to the body prompt. Use this to steer concise output (e.g. 'tweet-thread style, under 8 short paragraphs').# length_hint: ""## Hard cap on the generated body length, in characters. When set, the prompt instructs the model to keep the post under this limit and the post-processor truncates if the model overshoots.# max_chars: null## Voice/tone hint (e.g. 'warm', 'punchy'). Empty = let the model pick.# tone: ""## Subject of the content to generate.# topic: ""#
input: {}Run it locally:
fab-workflow --from-file my-run.yamlOr submit over the wire — the same file is the request body:
curl -X POST 'https://gofabric.dev/v1/workflows/runs?name=global/content-generate' \ -H 'Authorization: Bearer fab_xxx' \ -H 'content-type: application/yaml' \ --data-binary @my-run.yamlEvery workflow also accepts the universal WorkflowInput fields — variants (1–10 fan-out) and regenerate (creative-direction hints with run lineage). See Run-specs (YAML / TOML / JSON) for the full top-level shape (metadata, priority, bundle, parent, etc.).