Workflow Nodes¶
A Tryll workflow is a graph of nodes, each responsible for one step of the per-turn loop. Eight node types ship in the box; together they cover the common patterns of conversational inference (generation, retrieval, intent classification, instructions, detection, fallback, guardrails).
Nodes are referenced by their NodeType name on the
wire protocol:
| Node | NodeType |
Exit routes | Use for |
|---|---|---|---|
| Generate | Generate |
default |
Language-model inference. The workhorse. |
| Instruction | Instruction |
default |
Attach a named instruction string to the current interaction; rendered by downstream Generate via Mustache. |
| Retrieve | Retrieve |
found, not_found |
Vector search over an embedded string storage — the R in RAG. |
| Classify Intent | ClassifyIntent |
found, not_found |
Top-1 embedding similarity against a labelled KB; attaches an IntentionComponent for downstream routing. |
| Intent to Instruction | IntentToInstruction |
default |
Look up the detected intent in a Map string storage and attach the matching InstructionComponent. |
| Tool Call | ToolCall |
tool_called, no_tool_called |
Detect whether the model wants to call an external tool. |
| Canned Response | CannedResponse |
default |
Emit a fixed reply from a string storage without calling the model. |
| Human Message Guardrail | HumanMessageGuardrail |
triggered, not_triggered |
Regex-match the user message; branch the graph on pattern hits. |
Exit-route legend¶
Every node's reference page lists its named exits. Each exit is a typed
string field on the node's params object (e.g. default_exit,
triggered_exit). An empty string routes the turn to END (the default);
a non-empty string must name another node in the graph. The server rejects
graphs where an exit field names a missing node with error
3008 InvalidExitTarget.
Common patterns:
- Straight line. Generate →
default→END. Minimal single-turn agent. - Branch on guardrail. Guardrail →
triggered→ CannedResponse →END; Guardrail →not_triggered→ Generate →default→END. - Instruction then generate. Instruction →
default→ Generate. The instruction's text is exposed as{{instruction_<name>}}and{{#instructions}}in the Generate node's Mustache template. - Retrieve then generate. Retrieve →
found→ Generate; Retrieve →not_found→ Generate (same target). Thenot_foundpath is fine — the projection drops to the user message alone. - Tool-call detection. ToolCall →
tool_called→END(client handles the tool); ToolCall →no_tool_called→ Generate. - Intent classification. ClassifyIntent →
found→ IntentToInstruction →default→ Generate; ClassifyIntent →not_found→ Generate (general answer, no instruction override). See How to build an intent-driven NPC.
Params¶
Every node carries a list of (key, value) string pairs
(NodeParam). Each node's reference page lists the keys it accepts.
Unknown keys are currently silent; standardising on strict validation
is planned.
Diagnostics¶
When the agent is created with enable_diagnostics = true, every node
contributes to TurnComplete.debug_info. See
agent parameters — diagnostics.
Related¶
- Concept: Workflows, graphs, and nodes
- Agent Parameters — how the graph is carried on the wire.
- Glossary