Repository navigation
Description
🔴 Required Information
Describe the Bug:
A chat mode Agent (with include_contents='default') used as a static graph
node inside a Workflow does not retain conversation history across user turns.
Each turn the agent behaves as if it has never spoken to the user before.
Steps to Reproduce:
- Install
google-adk==2.1.0 - Create a
Workflowwith a chatAgentas a graph node:
qa_agent = Agent(name="qa_agent", model=model, instruction="You are a helpful assistant.")
workflow = Workflow(
name="root_workflow",
edges=[("START", qa_agent)],
)
adk = ADKAgent(adk_agent=workflow, use_thread_id_as_session_id=True, ...)- Turn 1: send message "my name is deepak" → agent responds "Nice to meet you, deepak!"
- Turn 2: send message ["what is my name?"]→ agent responds "I don't know your name"
Expected Behavior:
[Agent]( with include_contents='default' should receive prior session events as
conversation history on each turn, even when running as a Workflow graph node.
Turn 2 should respond: "Your name is deepak."
Observed Behavior:
The agent answers each turn as if it is a fresh conversation with no prior context.
Session storage is confirmed working (events are persisted in DB). The issue is
that the Workflow does not pass prior session history to the node Agent's LLM context.
Environment Details:
ADK Library Version: [google-adk==2.1.0]
Desktop OS: macOS
Python Version: 3.12
Model Information:
Are you using LiteLLM: Yes
Which model is being used: gpt-5.1 (via LiteLLM)
🟡 Optional Information
Regression:
N/A
Additional Context:
The ADK source _validate_no_task_mode_graph_nodes already documents a related issue
for [mode='task'] agents:
"The workflow scheduler currently overwrites node_input with the latest user message
on every re-entry, so the task brief is lost and the agent loses context."
The same scheduler behaviour appears to affect [mode='chat'] agents — the agent only
sees the current [node_input]without the accumulated session history, making it
stateless despite include_contents='default'.
This makes [Workflow] unsuitable as a root agent for any conversational use case
that requires memory across turns — which is the primary use case for chat agents.
Minimal Reproduction Code:
from google.adk.agents import Agent
from google.adk.workflow import Workflow
from ag_ui_adk import ADKAgent
qa_agent = Agent(
name="qa_agent",
model=model,
instruction="You are a helpful assistant. Remember what the user tells you.",
# include_contents defaults to 'default' — should receive history
)
workflow = Workflow(
name="root",
edges=[("START", qa_agent)],
)
adk = ADKAgent(
adk_agent=workflow,
session_service=session_service, # DB-backed, confirmed working
use_thread_id_as_session_id=True,
)
# Turn 1: "my name is deepak" → agent greets by name ✅
# Turn 2: "what is my name?" → agent says "I don't know" ❌
How often has this issue occurred?:
Always (100%)
Activity
deepakbatham572 commentedon May 28, 2026
HI @GWeale / @surajksharma07 could you please help here ?
llalitkumarrr commentedon May 29, 2026
Hello @deepakbatham572 ,
It looks like you are using
Workflowfor amulti-turn conversation. Because Workflow is a deterministic orchestration pipeline, it does not retain conversation history.For
multi-turn conversations, we recommend usingAgentin chat mode instead. You can find more details in the adk 2.0 docs. Please let us know if this resolves the issue.If the issue persists or if we have misunderstood your query, could you please share your complete code along with step by step reproduction steps? This will help us analyze the problem further.
boyangsvl commentedon May 29, 2026
Currently only single_turn agent can be put in the workflow. We are working on enabling more use cases.
deepakbatham572 commentedon May 30, 2026
HI @boyangsvl , thanks for letting us know , but this is the gap and we need this enhanced functionality, for tracking can't we not re open the issue once the feature or enchcement is there will close it .?
boyangsvl commentedon May 30, 2026
It makes sense. Reopening. Thanks!
GWeale commentedon Nov 17, 2026
inside a Workflow, an Agent runs as single_turn unless you set its mode, so it only saw the current message. setting mode='chat' on qa_agent, wired from START like your example, keeps the earlier turns, though a chat agent can only sit right after START for now. the workflow graph guide at docs/guides/workflow/graph covers this. thanks @deepakbatham572, please open a new issue if it still forgets the conversation with mode='chat'.
github-actions commentedon Nov 17, 2026
Are you satisfied with the resolution of your issue?
Yes
No