Nodes
Reference for all node types available in Specrun workflows.
Nodes are the building blocks of a flow. Each node performs a specific function in your workflow.
StartNode
The entry point of a flow. Defines the expected inputs.
- name: start
type: StartNode
inputs:
- query: string
- max_results: integerEndNode
The exit point of a flow. Can define named branches for multi-branch flows.
- name: end
type: EndNodeAgentNode
An LLM-powered agent that can call tools autonomously. The agent runs a tool-calling loop — it sends a prompt to the LLM, the LLM decides which tools to call, the tools execute, and the results feed back to the LLM until the task is complete.
- name: researcher
type: AgentNode
agent:
systemPrompt: |
You are a research assistant.
Search the web and summarize findings.
tools:
- web_search
- calculator
llm:
type: OpenAiConfig
model: gpt-4oThe agent runs up to 10 rounds of tool calling by default.
LlmNode
Runs a prompt template through an LLM. Supports {{variable}} substitution from input data.
- name: summarizer
type: LlmNode
prompt: |
Summarize the following text in 3 bullet points:
{{text}}
llm:
type: OpenAiConfig
model: gpt-4oToolNode
Executes an external tool directly without an LLM.
- name: fetch_data
type: ToolNode
tool:
name: fetch_api
inputs:
- url: stringBranchingNode
Routes execution to different branches based on input values.
- name: router
type: BranchingNode
branches:
- name: positive
condition:
field: sentiment
value: positive
- name: negative
condition:
field: sentiment
value: negative