Collaboration between humans and agents based on causal relationships