Skip to content

global/content-generate

Multi-variant social content generation — one card per variant.

Category: global
Source: workflows/content/generate.py

FieldTypeDefaultDescription
audiencestring"general"Target reader persona (e.g. ‘curious learners’).
channelsstring[]Distribution channels (e.g. [‘instagram’]). Shapes prompt guidance.
content_typesstring[]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’.
industrystring""Caller’s industry / vertical (e.g. ‘specialty coffee’).
keywordsstring[]Keywords / themes to weave into the content.
length_hintstring""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_charsobjectHard 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.
regenerateobjectWhen 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.
tonestring""Voice/tone hint (e.g. ‘warm’, ‘punchy’). Empty = let the model pick.
topicstring""Subject of the content to generate.
variantsinteger1Number of independent variant executions (1–10). When > 1, the engine runs the workflow N times with different sampling, producing N outputs.
FieldTypeDefaultDescription
contentstringrequiredPost body / caption.
evaluationobjectQuality evaluation envelope (scores, improvements, ready_to_publish).
kindobjectVariant 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.
tagsstring[]Hashtag-style labels (no leading ’#’).
titlestringrequiredPost title / headline.
analyze_topic → generate_content → evaluate_quality
TaskDescription
analyze_topicAnalyze the topic and pick this variant’s card kind.
generate_contentGenerate the post body in the format chosen by analyze_topic.
evaluate_qualityScore the generated post and emit the variant’s terminal output.

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:

Terminal window
fab-workflow --from-file my-run.yaml

Or submit over the wire — the same file is the request body:

Terminal window
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.yaml

Every 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.).