Event-Action Modules in Logical Agents