Connectors › AI steps

AI compose

A model writes the step's declared fields from a template over the record's fields, in batches, with fetched fields fenced as data.

Connectorai/compose
Rolecompose
Recordsany type
Tierbuilt in
Credentialnone
Optional: ANTHROPIC_API_KEY, ANTHROPIC_WORKSPACE_ID
Costunset in the manifest; gtme plan prints what the step declares at run time
Sourceinternal/adapters

Use it

It ships inside the binary. In a pipeline file:

steps:
  - id: compose
    use: ai/compose
    with:
      template: TEMPLATE

Replace the placeholder:

gtme plan pipeline.yaml checks the credential is set and that every field this step needs is provided by a step before it, without calling anyone.

Needs

Whatever fields the step's uses: line names. The runner checks them at plan time.

Provides

first_line, ps_line

Config

KeyTypeWhat it does
template requiredstringThe operator's text (ADR-057): a template rendered once per step over config.* — the shared block the records follow (SPEC §10.3). The runner loads {file:} and renders before OPEN; the adapter receives text.
batch_sizeinteger
modelstring
max_tokensinteger
fieldsarray of stringRestrict what the model sees to these fields (default: everything known)
fencebooleanADR-035: wrap externally fetched fields in a delimiter labelled as subject-supplied data (default true); false opts out
deferredbooleanADR-038: submit the batch to the engine's batch surface (the Message Batches API, half price) and end the run in flight; the next gtme run of the pipeline collects. Valid only on the pipeline's last step.

On this page, connector means what gtme calls an adapter. This one is a process adapter compiled into the binary. Two adapter tiers explains the difference.