The agents in COSINE are a collection of rules. Each agent has rules for design, redesign, conflict detection, and negotiation. Conflict indication, classification, negotiation strategy selection, and refinement are trivial and are included together with the other rules.
Rules in each group have different salience to control the sequencing of the various tasks. The salience of a rule is an indication of its importance. When there are multiple rules with their left hand sides satisfied, the one with the highest salience fires first. In general, design rules have the lowest salience, conflict detection rules have the next level of salience, then come the redesign rules, and the negotiation rules have the highest salience. This way of assigning salience guarantees that while design is going on, if there is a conflict it will be detected before any further design is done. It also assures that after conflict detection the negotiation will start, and that during negotiation no other conflicts will be detected until the current conflict is resolved.
After the rules for each agent have been loaded into CLIPS, the system does not differentiate between agents. So rules from any agent have the potential to fire at any moment. This means that the rules from different agents can work in an interlaced manner, simulating a distributed environment. One agent does not have to wait for another agent to finish its work. It starts working as soon as the preconditions for one of its rules are satisfied.
There is no explicit agenda to coordinate agents. The agenda mechanism built into CLIPS to control rule firings is used. Any time a rule's preconditions are satisfied or there is a modification of the facts on which the rule's preconditions match, the rule has the potential to fire. This is especially suitable for conflict indication and detection. Any time there is a potential conflict, the preconditions of the detection rule are satisfied and the rule fires.