Skip to main content

Purpose

The Respond node produces a response value and stores it in the variable store for later steps (or for the End node to return). It runs in one of two modes:
  • Template mode — pure string interpolation with {{path}} placeholders. No LLM is called, so it is instant, deterministic, and free. Use it to format data you already have into a message.
  • DSPy mode — an LLM generates typed, structured output against an output_schema. Use it when you need the model to summarize, rewrite, or compose prose from upstream data.
Where the Agent node gives an LLM tools, knowledge bases, and multi-step reasoning, the Respond node is a single, focused generation (or no generation at all). Reach for Respond when you just need to shape the final answer; reach for Agent when the step needs to reason, call tools, or decide.
A Respond node requires either a template or an output_schema. Supplying neither is a configuration error. If a template is present, the node runs in template mode and no LLM is called, even if other DSPy fields are set.

How it works

1

Workflow reaches the Respond node

Execution arrives with the outputs of previous steps available in the variable store, plus the execution input under input.
2

Mode is selected

If template is set, the node runs in template mode. Otherwise it runs in DSPy mode against the output_schema.
3

Template mode: placeholders are filled

Each {{path}} in the template is resolved against the variable store. Unresolved paths are left in place as literal {{path}} text rather than failing the node.
4

DSPy mode: the LLM generates output

Input fields are resolved from their sources, an agent’s persona instructions are optionally applied, and the configured DSPy module (typed_predict or chain_of_thought) generates output matching the schema.
5

Result is stored

The result is written to the variable store under output_variable (default response), where downstream nodes and the End node can read it.

Configuration

Set template to a string with {{path}} placeholders. Paths resolve against the variable store, and the execution input is available under input.
Template mode never calls an LLM. A placeholder that doesn’t resolve is kept verbatim as {{path}} in the output, so a typo shows up in the text rather than crashing the node.

Input field sources (DSPy mode)

Each entry in input_fields resolves in one of three ways:
  • source — a dotted path. input.<field> reads from the execution input; variables.<name> (or a bare activity path like search.results) reads from the variable store.
  • value — a literal value injected directly.
  • default — a fallback value used when neither source nor value is set.

Respond vs Agent

Use a Respond node when

  • You only need to format data you already have (template mode).
  • You need one structured LLM generation (summary, rewrite, classification) with no tools.
  • You want a deterministic, no-LLM final message.
  • You want to shape the value the End node returns.

Use an Agent node when

  • The step needs to call tools or MCP servers.
  • The step needs knowledge-base retrieval (RAG).
  • The step requires multi-step reasoning or decisions.
  • You want guardrails, a full persona, and agent-level configuration.

Use cases

Format a final message without an LLM

Scenario: A search step produced results; you just need to present them.

Summarize upstream data with structured output

Scenario: Condense a long extraction into a short, typed summary before the End node returns it.

Best practices

If every value already exists in the variable store, template mode formats it instantly with no LLM cost and fully deterministic output.
In DSPy mode, the description on each schema property guides the model. Precise descriptions produce more reliable structured output.
The Respond node has no tools and no knowledge-base retrieval. If the step needs either, use an Agent node instead.
Set output_variable to something descriptive so later nodes and the End node can reference it clearly, e.g. {{summarize.summary_result}}.

Next steps

Agent node

Use a full agent when the step needs tools, knowledge, or reasoning

Workflow overview

See how the End node returns the final output

Memory system

Understand the variable store that templates and inputs read from

Condition node

Branch on a response before returning it