TOML reference

Workflow recipe schema.

A recipe declares setup inputs and one or more resources. Validation normalizes those resources into the same payloads used by Gent's sequence, work-route, and workflow APIs.

Top level

Required recipe fields.

FieldRequiredDescription
schema_versionYesCurrent public version is 2026-06-18.
kindYesMust be gent.workflow_recipe.
nameRecommendedHuman-readable recipe name shown in preview and review records.
descriptionNoShort explanation of the workflow the recipe describes.
categoryNoGrouping label for browsing or internal organization.
inputsNoSetup values that may be referenced with {{ inputs.name }}.
resourcesYesAt least one sequence, work_route, or workflow resource.

Inputs

Values supplied at validation or setup time.

Input example
Secret inputs may be declared, but the recipe file must not include a default or value for them.
[inputs.inbox_id]
type = "inbox"
required = true
label = "Agent inbox"

[inputs.webhook_url]
type = "url"
required = true
label = "Webhook URL"

[inputs.shared_secret]
type = "secret"
required = true
label = "Webhook signing secret"
PropertyDescription
typeUI hint. Common values are text, inbox, url, email, label, and secret.
requiredWhen true, validation returns missing_input until a value is supplied.
labelHuman-readable label for the dashboard input.
default or valueAllowed for non-secret inputs. For secret inputs, these are rejected with secret_in_recipe.

Resources

What a recipe can create.

Sequence resource
Creates a sequence through POST /v1/sequences/. Sequences are installed before workflows so later resources can reference their IDs.
[[resources.sequence]]
key = "lead_followup"
name = "Lead follow-up"
sender_inbox_id = "{{ inputs.inbox_id }}"
exit_on_reply = true
emails = [
  { delay_days = 2, subject = "Following up", body = "Checking whether this is useful." }
]
Work route resource
Creates a concrete email-based approval, acknowledgement, or text-response route through POST /v1/work-routes/. Include start = true only when the route should begin immediately.
[[resources.work_route]]
key = "finance_signoff"
creator_inbox_id = "{{ inputs.inbox_id }}"
title = "Approve invoice"
request_type = "approval"
routing_mode = "parallel"
completion = "required"
failure_mode = "block"
due_at = "{{ inputs.due_at }}"
start = false
recipients = [
  { kind = "email", email = "finance@example.com" }
]
Workflow resource
Creates a workflow rule through POST /v1/workflows/. Actions are validated against the current workflow reference for the user's plan and permission level.
[[resources.workflow]]
key = "start_followup"
name = "Start follow-up for leads"
inbox_id = "{{ inputs.inbox_id }}"
trigger = "email_received"
conditions = [
  { field = "from_domain", op = "eq", value = "example.com" }
]
writes = [
  { source = { from = "trigger.email" }, target = { type = "sequence.enroll", sequence_id = "{{ resources.lead_followup.sequence_id }}" } }
]

Placeholders

How values are resolved.

  • {{ inputs.name }} resolves from values supplied in the dashboard or validation request.
  • {{ resources.key.sequence_id }} resolves after a sequence resource with that key is created.
  • {{ resources.key.route_id }} resolves after a work-route resource with that key is created.
  • The validation response keeps resource ID placeholders such as {{ resources.key.sequence_id }} so an installer can replace them after creating earlier resources.
  • Resource placeholders should be used only by resources created later in the order: sequences, then work routes, then workflows.
  • Unresolved input placeholders return an unresolved_placeholder diagnostic and block safe setup.

Validation API

Preview without creating anything.

POST/v1/workflows/recipes/validate/

Requires workflows:read. The endpoint returns HTTP 200 with diagnostics, even when valid is false.

Request
{
  "toml": "schema_version = \"2026-06-18\"\nkind = \"gent.workflow_recipe\"\n...",
  "inputs": {
    "inbox_id": "inb_123",
    "webhook_url": "https://example.com/webhook"
  }
}
Response shape
{
  "valid": true,
  "recipe_hash": "sha256:...",
  "schema_version": "2026-06-18",
  "kind": "gent.workflow_recipe",
  "name": "Route leads",
  "inputs": {},
  "resources": {
    "sequence": [],
    "work_route": [],
    "workflow": []
  },
  "diagnostics": []
}

Diagnostics

Common validation codes.

CodeMeaning
invalid_tomlThe file could not be parsed as TOML.
invalid_kindkind is missing or not gent.workflow_recipe.
missing_schema_versionThe recipe does not declare schema_version.
missing_inputA required input was not supplied.
secret_in_recipeA secret input tried to store a value or default in the recipe file.
unresolved_placeholderA placeholder could not be resolved from inputs or created resources.
duplicate_resource_keyTwo resources of the same kind share the same key.
invalid_sequence_payloadThe normalized sequence payload failed sequence API validation.
invalid_work_route_payloadThe normalized work-route payload failed work-route API validation.
invalid_workflow_payloadThe normalized workflow payload failed workflow-rule API validation.
legacy_workflow_write_targetsThe recipe used old actions instead of current writes.
unavailable_write_targetThe write target is not available for the user's plan or permission level.
incompatible_write_targetThe write target cannot run for the selected trigger.
incompatible_sourceThe selected source cannot be satisfied by the selected trigger context.