A role, r, consists of a specification of an agent's internal and external behaviors. The conditions and arguments of any behavior can depend on the agent's current role, which is a function of its internal state. At the extreme, a top-level behavior could be a switch, calling an entirely different behavior graph for each possible role. However, the role can affect the agent's overall behavior at any level of its complete behavior graph. Notice that roles need not be rigid: by specifying ranges of parameters or behavior options, the agent filling role r can be given an arbitrary amount of flexibility.
For example, a role in the robotic soccer domain, can be a position such as a midfielder. In the hospital maintenance domain, a role could specify the wing of the hospital whose floors the appropriate agent should keep clean, while in the web search domain, it could specify a server to search.