diff --git a/frontend/src/lib/components/flows/agentFormFields.ts b/frontend/src/lib/components/flows/agentFormFields.ts index ee99282a93..38cabd1bd3 100644 --- a/frontend/src/lib/components/flows/agentFormFields.ts +++ b/frontend/src/lib/components/flows/agentFormFields.ts @@ -140,7 +140,7 @@ export const AGENT_FIELDS: AgentFieldSpec[] = [ group: 'messages', label: 'Memory id', tooltip: - 'Conversation history id: runs with the same id share their history. Inherited uses the chat conversation id in chat mode, or the memory_id passed when the flow is run. Without either, each run starts fresh. Custom sets the id on the step: a fixed id shares one history across all runs, an expression keeps one history per value.', + 'Conversation history id: runs with the same id share their history. Inherited uses the memory_id the run was started with: the conversation id in chat mode, or the memory_id query parameter otherwise. Without either, each run starts fresh. Custom sets the id on the step: a fixed id shares one history across all runs, an expression keeps one history per value.', implicit: '', defaultHint: 'Default: inherited from the run', textOnly: true diff --git a/frontend/src/lib/components/flows/content/AiAgentStepInputs.svelte b/frontend/src/lib/components/flows/content/AiAgentStepInputs.svelte index 787a390874..e620943eb3 100644 --- a/frontend/src/lib/components/flows/content/AiAgentStepInputs.svelte +++ b/frontend/src/lib/components/flows/content/AiAgentStepInputs.svelte @@ -302,8 +302,13 @@ }) }) + // A history input's row follows its key rather than `visible`, so the run form is told about one + // only while the step holds the key: an inherited memory id has nothing a test run could inherit. $effect(() => { - const keys = [...visible] + const keys = [ + ...[...visible].filter((key) => !isHistoryKey(key)), + ...AGENT_HISTORY_KEYS.filter((key) => args?.[key] != undefined) + ] untrack(() => rememberOpenFields(visibilityKey, keys)) }) @@ -558,8 +563,8 @@ )} {#if args?.memory_id == undefined}

- Uses the chat conversation id or the memory_id passed to the - run. + Uses the memory_id the run was started with: the conversation + id in chat mode, or the memory_id query parameter otherwise.