Skip to content

AI Node

The AI node runs each prompt through the default AI Node Agent (or an agent and model you choose). Calls use the same messaging runtime as Flow chat, so usage and cost land in platform AI accounting.

  • Agent first – Default agent is system/agents/ai-node-agent. You can override agent and model on the Prompt tab.
  • Entry mode – One LLM call per input row, with bounded parallel batches.
  • Payload mode – One LLM call for the whole row set the operation receives.
  • Run on – Limit workflow LLM calls to Test Only, 1, 10, 20, 100, or ALL rows (default Test Only). Output keeps every input row; unprocessed rows leave schema fields undefined.
  • Template variables – Use {{ row }}, {{ row.property }}, {{ rowIndex }}, {{ inputs }}, {{ numRows }} in entry mode, or {{ rows }} in payload mode. {{ inputs }} holds the node’s incoming wires as named tables, keyed by each wire’s handle (Wires and named tables).
  • Structured output – When you set an output schema (response: json), the model must call a dynamic submit_structured_output tool. Missing tool calls fail closed.
  • Unstructured output – With response: text, the assistant text is returned as { result: "<text>" }.
  • Last-run cost – USD cost for the node run is stored on the output port summary (lastRunCostUsd) and shown in the editor.
  • Inline test – Run a selected row or payload from the Prompt tab. Results preview in the editor (no AI Chat handoff).

The AI call is an opaque step: the model returns a row and Fontana cannot see which cell came from which, so every cell of an output row carries the union of that input row’s data styles.

Tabs: Prompt (input/output grids plus prompt settings), Explore, and Settings. The Explore tab also lists this node’s operations, so you can add a formula, a query or a script before or after the AI call. On the Prompt tab, Run on is highlighted when it is not ALL so limited runs are obvious.

{
"custom": {
"execution": {
"operations": [
{
"id": "ai",
"kind": "ai",
"params": {
"prompt": "summarise this row: {{row}}",
"mode": "entry",
"runOn": "test",
"agentId": "system/agents/ai-node-agent",
"modelId": "openai/gpt-4o",
"outputSchema": {
"type": "object",
"properties": {
"summary": { "type": "string" }
},
"required": ["summary"]
}
}
}
]
}
}
}

modelId and outputSchema are optional. Omit modelId to use the agent default model. runOn accepts test, 1, 10, 20, 100, or all.

  • Template – Template-based transformation
  • Script – Custom JavaScript or Python
  • BYOK – Gateway keys for workflow AI calls
  • Workflow schema – Full schema reference