ai/compose
Built-in compose adapter for records of any type: its manifest, needs, provides, config keys, cost, and an example step
What you'll learn
You're about to put ai/compose in a step and want its keys, fields, credentials, and cost before plan tells you.
- what the adapter needs and provides
- every
with:key it accepts - what it costs and which credential it demands
A built-in compose adapter for records of any type: it needs the step's uses: fields and provides 2 fields. It publishes no per-record estimate, so plan prints ?, and it runs without a key, though ANTHROPIC_API_KEY and ANTHROPIC_WORKSPACE_ID are optional.
Manifest
| Key | Value |
|---|---|
| id | ai/compose |
| version | 1 |
| role | compose |
| entity type | any type |
| credentials | ANTHROPIC_API_KEY (optional), ANTHROPIC_WORKSPACE_ID (optional) |
| cost estimate per record | not published |
Needs
The fields the step's uses: line names, and nothing else.
Provides
{
"additionalProperties": false,
"properties": {
"first_line": {
"type": "string"
},
"ps_line": {
"type": "string"
}
},
"type": "object"
}
Config keys
The keys with: accepts. Plan rejects any other key.
| Key | Type | Required | What it sets |
|---|---|---|---|
batch_size | integer | ||
deferred | boolean | ADR-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. | |
fence | boolean | ADR-035: wrap externally fetched fields in a delimiter labelled as subject-supplied data (default true); false opts out | |
fetched | array of string | The batch's externally fetched fields (ADR-035). Injected by the runner from provenance — never authored inside with:. | |
fields | array of string | Restrict what the model sees to these fields (default: everything known) | |
max_tokens | integer | ||
model | string | ||
of | string | The referent (ADR-048): the field whose value this step is about, presented to the model as the subject. Injected by the runner from the step-level of: key — never authored inside with:. | |
provides | object | The step's derived provides schema (ADR-033). Injected by the runner from the step-level provides: key — never authored inside with:. | |
template | string | yes | The 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. |
Example
From See it run:
- id: lines
use: ai/compose
when: fit.passed
uses: [full_name, title, company_name]
with:
template: >
Write first_line and ps_line for a short, honest intro email.
Used in
- The
full-funnel-with-usesexample ingtme help --agent - The
human-review-then-cronexample ingtme help --agent - The
csv-sourced-compose-with-usesexample ingtme help --agent - The
persona-file-and-text-composeexample ingtme help --agent