(If you are a frequent visitor, keep an eye on the →News.)
Welcome to Kappa
Kappa is a rule-based language for modeling systems of interacting agents. While its current development is primarily motivated by molecular systems biology, its range of applications is quite broad.
What does rule-based mean?
Consider a patch of the world that acts as a unit of interaction. Such a patch could be a single agent or a combination of agents. In systems biology applications, an agent would be a protein and a combination of agents would be a complex of non-covalently bound proteins; in chemistry, an agent would be an atom and a combination of agents would be a molecule.
Imagine further that the context relevant to the interaction (green in the Figure) is smaller than the patch itself (brown). This splits the patch into regions: a context that is irrelevant to the action, one that is required for the action (also known as the pre-condition), a further context that is altered by the action (the post-condition), and the part of the required context that remains invariant.
It then makes sense to separate the action and its necessary conditions from the event that results if the action were to occur in the broader context that is the patch. This separation gives rise to the concept of a rule. The green context on the left of a rule only specifies those aspects of a patch that are necessary for interaction.
A rule might therefore apply to many patches, and a patch might be acted upon by many rules. The spirit of this approach is analogous to organic chemistry, which makes a distinction between a rule specifying the transformation of molecular parts and the reaction induced by it in the context of a complete molecular arrangement.
Since Kappa entities are graphical structures, rules are graph-rewrite directives. In a dynamical setting where rules cause state transitions in a population of patches, rules fire stochastically based on their activity as determined by standard continuous-time Monte Carlo (as in stochastic chemical kinetics).
By separating a rule from a patch on which it acts we gain a much clearer approach to mechanistic causality. If causal analysis were to proceed at the level of patches, it would obfuscate the causal structure of a system by dragging along context irrelevant to an event. In addition to simulation and static analysis, the Kappa platform also extracts the causal structure of a rule system from its simulation traces.
Is this different from agent-based modeling?
The term "agent-based" is often used informally to refer to a modeling style in which discrete units of interaction (the agents) are defined ad hoc, without a systematic internal structure. In such a setting, the complex of a kinase and a substrate would be considered an agent. This is not the setting Kappa is meant for (although it could be used that way). Rather, in Kappa, an agent is an atomic entity with a minimal signature (a set of resources for interaction) and a complex explicitly reveals—by a graphical representation—its composition and connectivity in terms of atoms. Because of this structure, the patterns that appear in rules select the configurations to which they apply through graph matching. To avoid confusion with the informal meaning of "agent-based", we refer to Kappa as a "rule-based" modeling approach.
Kappa is an ongoing open-source development supported by several partners and involving researchers from several institutions. Most standalone Kappa tools are software agents (web services) that communicate through REST protocols. You can use them individually and interactively, locally on your computer or remotely through the internet; you can script over them (there is a Python wrapper), or you can use a browser-based User Interface as well as a standalone app that integrates them.