Modeling State Dependency in Agent Based Systems