MCPcopy Index your code
hub / github.com/google/adk-python / _create_empty_state

Function _create_empty_state

src/google/adk/cli/utils/state.py:25–35  ·  view source on GitHub ↗
(agent: BaseAgent, all_state: dict[str, Any])

Source from the content-addressed store, hash-verified

23
24
25def _create_empty_state(agent: BaseAgent, all_state: dict[str, Any]):
26 for sub_agent in agent.sub_agents:
27 _create_empty_state(sub_agent, all_state)
28
29 if (
30 isinstance(agent, LlmAgent)
31 and agent.instruction
32 and isinstance(agent.instruction, str)
33 ):
34 for key in re.findall(r'{([\w]+)}', agent.instruction):
35 all_state[key] = ''
36
37
38def create_empty_state(

Callers 1

create_empty_stateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected