(agent: BaseAgent, all_state: dict[str, Any])
| 23 | |
| 24 | |
| 25 | def _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 | |
| 38 | def create_empty_state( |
no outgoing calls
no test coverage detected