Skip to content

Node reference (Python)

One constructor per node kind the Studio draws — all twenty-six. Every field name below is the field name the engine deserialises, and every default is that struct’s default.

Required arguments are the fields the engine declares without a default. Everything else is omitted from the payload when left alone, so the server’s default is the one that applies — this package deliberately does not become a second place that decides them.

Every constructor also takes label= (defaults to the node’s id). Nodes that can fail take on_error= and on_fail=; nodes with sweepable fields take exposes=. See Defining a graph.

ConstructorArgumentsNotes
Input(id="input")—Where a run’s material arrives. An experiment seeds it from the dataset row’s input column.
Output(id="output")—The end of the flow.
Merge(id, ...)strategyconcatenate, json_object, first, zip.
Template(id, template=...)templateRenders {{…}} over the run’s context, no model.
Condition(id, ...)modeA tagged union: {"type": "regex", "pattern": …}, {"type": "json_path", "path": …, "expected": …}, {"type": "llm_judge", "prompt": …, "model": …}.
Loop(id, ...)max_iterations, until_condition, body_node_ids, end_node_ids, flatten, sampleThe body and the exit are named by node id.
Human(id, ...)prompt_textPauses the run for a person.
Accumulator(id, ...)key, modeGathers values across iterations under one key.
History(id, ...)max_messages, format, roles, summarize, summary_modelConversation history, optionally summarised. Takes exposes=.
ConstructorArgumentsNotes
Llm(id, ...)model, prompt, system, temperature, max_tokens, reasoning_effort, output_schemaprompt is prompt_template and system is system_prompt — the two fields anyone reaches for first, spelled the short way here.
StructuredOutput(id, ...)model, prompt, output_schema, max_retriesA JSON Schema the answer has to fit. The way to stop a good answer scoring zero for a formatting reason.
Agent(id, ...)definitionA reference to an agent definition. Inert when executed — it exists to be convened. Pass it in members=, never in a chain.
SubAgent(id, ...)definition, input_mapping, output_mapping, timeout_secsOne agent, run on data. This is the one that goes in a chain.
SubGraph(id, ...)graph_idAnother graph, run as a step.
Panel(id, ...)model, members, max_rounds, moderator_promptRound-table debate. model moderates; members is the roster. Takes exposes=.
Orchestrator(id, ...)model, members, max_delegations, planning_prompt, adaptiveHierarchical delegation over a roster. Takes exposes=.
AgentComm(id, ...)target, message_template, timeout_secs, conversation_turnsOne agent talking to another.
ConstructorArgumentsNotes
Tool(id, ...)tool_name, paramsA tool from the Library.
VectorDbQuery(id, ...)query_template, collection, top_k, thresholdRetrieval. Takes exposes=.
FileRead(id, ...)path_template, format, delimiter, has_headers, batch
FileWrite(id, ...)path_template, format, delimiter, append, headers
DatasetRead(id, ...)version_id, dataset_id, with_item_idA version of a dataset, not the live table — a run exists so a number can be attributed to it, and reading the live table would give a number over rows nobody can name afterwards.
DatasetWrite(id, ...)dataset_id, branch, messageMints a dataset version from what arrives. The version’s verb is always from_run, and the server sets it.
DataFrame(id, ...)sql_query, output_mode, preview_rowsSQL over what came in.
Flatten(id, ...)mode, explode_field, depth
ConstructorArgumentsNotes
Eval(id, ...)metrics, prediction_var, reference_var, top_k, prediction_column, reference_column, nan_policymetrics are the names the engine accepts — exact_match, f1, rouge_l and the rest. The live list is served at GET /api/eval-metrics.
Dashboard(id, ...)tab_name, view_type, vega_spec, echarts_specA plot in the results tab.
from chatty_lab import Retry, expose

Retry(times=0, *, continue_on_fail=False, timeout_secs=120) builds a node’s error policy. expose(field, *, label=None, param_type=None) builds one exposed parameter when the shorthand exposes=["model"] guesses the control wrong.