-
Notifications
You must be signed in to change notification settings - Fork 706
Open
Description
Hi All,
The loop_agent example which is available in below link is throwing error "'Context variable not found: initial_topic.'" on execution from adk web.
https://google.github.io/adk-docs/agents/workflow-agents/loop-agents/
I am wondering if this is because we are trying to access initial_topic variable in sub_agent under root_agent. I tried something as shown below and it seems to work. I am wondering if there is a better way to fix the same.
state_initializer_agent = LlmAgent(
name="StateInitializer",
model=Gemini(
model=GEMINI_MODEL,
retry_options=retry_config
),
instruction="Output the user's request verbatim.",
description="Captures the initial user topic and saves it to the session state.",
output_key=STATE_INITIAL_TOPIC # <--- This is the key that was missing!
)
Metadata
Metadata
Assignees
Labels
No labels