Given a one-dimensional Cohen-Macaulay local ring $$(R,{\mathfrak {m}},k)$$ , we prove that it is almost Gorenstein if and only if $${\mathfrak {m}}$$ is a canonical module of the ring $${\mathfrak {m}}:{\mathfrak {m}}$$ . Then, we generalize this result by introducing the notions of almost canonical ideal and gAGL ring and by proving that R is gAGL if and only if $${\mathfrak {m}}$$ is an almost canonical ideal of $${\mathfrak {m}}:{\mathfrak {m}}$$ . We use this fact to characterize when the ring $${\mathfrak {m}}:{\mathfrak {m}}$$ is almost Gorenstein, provided that R has minimal multiplicity. This is a generalization of a result proved by Chau, Goto, Kumashiro, and Matsuoka in the case in which $${\mathfrak {m}}:{\mathfrak {m}}$$ is local and its residue field is isomorphic to k.