Agents may be run using the run command. The stop-soar command stops any running Soar agents. It sets a flag in the Soar kernel so that Soar will stop running at a "safe" point and return control to the user. This operates exactly as if the user had issued a control-C (SIGINT) interrupt to the Soar process.
This command is usually not issued at the command line prompt. A more common use of this command is as a side-effect of pressing a button on a Graphical User Interface (GUI), or as a monitor to be executed at a specific Soar Event. For example, a user may wish to examine an agent's "matches" after the Soar Decision Phase. In order to do this in Soar 8, the user must register a monitor, or callback, to issue the "stop-soar -self" command for the event, after-decision-phase-cycle.
This example shows how to stop Soar8 after this decision phase using stop-soar -self in a monitor to stop after the decision phase so that memory can be examined.
monitor -add {stop-soar -self "after decision phase"} \ after-decision-phase-cycle