fix a problem with repository cache for AgentRelation entities