while not stopping_condition: observation = receive_input() tool = choose_tool() # e.g., an LLM output = tool.process(observation) evaluate(output)