An electronic device comprising: a microphone ; a wireless communication circuit ; at least one processor ; and a memory configured to store an application program supporting a task and a database including a first path rule for performing the task, wherein the first path rule includes a plurality of first states of the electronic device, wherein the memory stores instructions that, when executed, cause the at least one processor to: receive a voice command making a request for performing the task via the microphone ; transmit the voice command to an external server via the wireless communication circuit ; receive a second path rule including a plurality of second states of the electronic device for performing the task from the external server via the wireless communication circuit ; execute a first application corresponding to the second path rule; execute a second application via a plug-in installed in the first application and execute the plurality of second states included in the second path rule, in response to the reception of the second path rule; and when an error occurs during the execution of the plurality of second states, execute at least part of the plurality of first states included in the first path rule. a microphone ; a wireless communication circuit ; at least one processor ; and a memory configured to store an application program supporting a task and a database including a first path rule for performing the task, wherein the first path rule includes a plurality of first states of the electronic device, wherein the memory stores instructions that, when executed, cause the at least one processor to: receive a voice command making a request for performing the task via the microphone ; transmit the voice command to an external server via the wireless communication circuit ; receive a second path rule including a plurality of second states of the electronic device for performing the task from the external server via the wireless communication circuit ; execute a first application corresponding to the second path rule; execute a second application via a plug-in installed in the first application and execute the plurality of second states included in the second path rule, in response to the reception of the second path rule; and when an error occurs during the execution of the plurality of second states, execute at least part of the plurality of first states included in the first path rule. receive a voice command making a request for performing the task via the microphone ; transmit the voice command to an external server via the wireless communication circuit ; receive a second path rule including a plurality of second states of the electronic device for performing the task from the external server via the wireless communication circuit ; execute a first application corresponding to the second path rule; execute a second application via a plug-in installed in the first application and execute the plurality of second states included in the second path rule, in response to the reception of the second path rule; and when an error occurs during the execution of the plurality of second states, execute at least part of the plurality of first states included in the first path rule. <EOS>