Definitions

An agent-based system (ABS) consists of an environment populated by agents.

An agent is a role-playing active object that can interact with other agents.

An agent can play many roles: parent, child, teacher, student, employee, etc. 

The role an agent currently plays determines it's current purpose, goals, and interactions with other agents.

Roles can be simple or complex. A complex role is composed of many sub-roles. For example, the homemaker role might be a composition of the wife, mother, and cook roles.

The following design summarizes these definitions.

Here's a sketch of how Role might be implemented in Java:

abstract class Role {
   Agent host;
   abstract public void execute();
   abstract boolean isFinished(); // = true if goal achieved
}

An agent perpetually executes its roles:

class Agent extends Thread {
   List<Role> roles;
   Queue<Message> messages;
   int agentID; // unique ID#
   public void run() {
      while(!roles.isEmpty()) {
         for(Role role: roles) {
            role.execute();
            if (role.isFinished()) {
               roles.remove(role);
            }
         }
      }
   }
}

Of course new roles can be added to the list of roles. Also, roles may extract messages from their host's message queue and they can add new messages to the message queues of other agents.