Generate an agent draft from a task, streaming progress
Expand a natural-language task into a complete agent draft — a structured prompt with placeholders, a name and icon, typed output fields and sample test cases — streamed as Server-Sent Events: ‘status’ beats while the model works, then a final ‘result’ with the draft. Errors arrive as an ‘error’ event (the stream has already responded 200).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
A natural-language task to expand into a full agent draft.
Response
A stream of Server-Sent Events; the final result frame's data is the generated draft.
The AI-built agent draft the editor seeds itself from.
The inputs the generated prompt declares — the editor seeds its Inputs section from this, never by parsing the prompt.
The fields-mode output shape: repeatable named typed fields.
The default is Clay's: one text field named response.
- EnrichmentOutputFields
- EnrichmentOutputRawSchema
A saved agent's prompt: literal text with references between the runs.
The same convention every other stored prompt in the product uses
(EnrichmentPromptTemplate for columns, template segments for
sequences): identity-keyed segments, so renaming what a reference points
at never rewrites the prompt. Structurally parallel to the enrichment
template rather than importing it — an agent prompt references INPUTS,
an enrichment prompt references COLUMNS, and the import hierarchy keeps
the two domains apart.