pipedog is an unofficial community port of Pipecat, not affiliated with Daily.
pipedog

Context strategies

Choose whether a node keeps, resets or summarizes the conversation history on entry.

When the conversation enters a node, its context strategy decides what the LLM remembers.

StrategyEffect
ContextStrategy.APPENDKeep the history and add the node's messages. The default.
ContextStrategy.RESETDrop the history; the LLM sees only the new node's messages (and the role message).
ContextStrategy.RESET_WITH_SUMMARYReset, but include an LLM-written summary of the earlier conversation. Needs a summaryPrompt. Deprecated upstream: it still works and logs a warning once.

Set one on a node, or give the FlowManager a default for nodes that do not:

const resetNode: NodeConfig = {
  taskMessages: [{ role: "developer", content: "Start the payment step." }],
  // Drop the earlier conversation; keep only this node's messages.
  contextStrategy: new ContextStrategyConfig({ strategy: ContextStrategy.RESET }),
};

const managerWithDefault = new FlowManager({
  worker,
  llm,
  contextAggregator: aggregators,
  // The default for nodes that do not set their own.
  contextStrategy: new ContextStrategyConfig({ strategy: ContextStrategy.APPEND }),
});

Reset when an earlier phase no longer matters (and would only cost tokens or confuse the model), such as moving from small talk to a payment step. Keep the history when the later steps need what the user said. In a flow config, write context_strategy: reset on the node.

State in flowManager.state is never reset by a context strategy, so values the conversation learned stay available to handlers and placeholders.

pipedog is an unofficial community TypeScript port of Pipecat. It is not affiliated with or endorsed by Daily or the Pipecat project.

Portions adapted from the Pipecat documentation, Copyright (c) 2024–2025 Daily, BSD-2-Clause (see apps/docs/LICENSE-pipecat-docs).