AI steps run inside a logic block, with full access to entity data and workspace isolation. The workhorse is ai_call.
ai_call
A single provider call for classification, extraction, summarization, generation, scoring, or translation. You give it context fields, an intent, and an output format; you get a typed result.
{
"type": "ai_call",
"intent": "classify",
"contextFields": [{ "label": "review", "value": "{{input.reviewText}}" }],
"outputFormat": "category",
"categories": ["positive", "negative", "neutral"]
} The output shape follows outputFormat:
- text →
response(string). - json → a flat object with your declared
outputFields. - score →
score(0–100). - category →
categorymatched against yourcategories. - boolean →
decision(true/false).
Every result also reports tokensUsed. For json, list the fields you want extracted:
{
"intent": "extract",
"contextFields": [{ "label": "email_body", "value": "{{input.emailText}}" }],
"outputFormat": "json",
"outputFields": [
{ "name": "sender_name", "description": "full name of the sender" },
{ "name": "requested_date", "description": "meeting date in ISO format" },
{ "name": "topic", "description": "one-line meeting topic" }
]
} query_entity — RAG & memory
query_entity pulls entity records into the block so you can feed them to a model as grounded context, or load and save conversation state. Combine a search query with a generate step that's instructed to answer only from the retrieved documents.
s1: query_entity mode=search entity=policy search={{input.question}} limit=3
s2: ai_call intent=generate
contextFields=[{ label: documents, value: {{s1.items}} },
{ label: question, value: {{input.question}} }]
instructions="Answer only using the provided documents."
outputFormat=text ai_compare
Send the same prompt to several providers in parallel and get back an array with each provider's response, latency, and token count. Failures are isolated — one provider erroring doesn't abort the others.
{
"type": "ai_compare",
"providers": ["anthropic", "openai", "gemini"],
"userPrompt": "Summarize: {{input.articleText}}",
"responseVariable": "comparison"
} Persist the comparison
Follow an ai_compare with a create_entity step to store the ranked results — a simple multi-model product in two steps.