Let $\mathsf{Idem}$ be the category of sets that come with an idempotent endomorphism, i.e. the objects are pairs $(A,e)$ where $A$ is a set and $e:A \to A$ is an idempotent. The morphisms $f:(A,e) \to (B,d)$ are morphisms $f: A \to B$ in $\mathsf{Set}$ such that $df = fe$. Let $U\colon \mathsf{Idem} \to \mathsf{Set}$ be the forgetful functor.
I would like to find a left adjoint $F$ for this functor. I tried the functor $F$ where $F (A) = (A , 1_A)$ on objects, and $F( f\colon A \to B ) = f: (A, 1_A) \to (B, 1_B)$, on morphisms, but I can see no isomorphism $\mathsf{Idem} ((A,1_A), (B,e)) \cong \mathsf{Set}(A,B).$ I initially thought to send a map $f\colon (A,1_A) \to (B,e)$ to $ef\colon A \to B$, and a map $g\colon A\to B$ to $g\colon (A, 1_A) \to (B, 1_B)$ but this doesn't seem to be right.
Does anyone have any advice about how to find such a left adjoint? I am not sure how to spot one. It seems that the functor has to incorporate some information about all the idempotents because we need $\mathsf{Idem} \left( FA, (B,e) \right) \cong \mathsf{Idem} \left( FA, (B,e') \right) \cong \mathsf{Set}(A,B),$ if $e, e'$ are two different idempotents. Any help would be appreciated.