fix bad dependency by moving api.AgentVariables to core