The ending, with Alvy and Annie meeting as friends, as "Seems Like Old Times" is sung by Annie on the soundtrack. He narrates that he ran into Annie several years later and had a good time catching up as old friends. Alvy closes by recounting that, like the punchline to an old joke, we need these irrational things called relationships because "we still need the eggs". Then, a montage of Alvy and Annie's relationship plays while she sings.
Alvy: After that it got pretty late, and we both had to go, but it was great seeing Annie again. I... I realized what a terrific person she was, and... and how much fun it was just knowing her; and I... I, I thought of that old joke, y'know, the, this... this guy goes to a psychiatrist and says, "Doc, uh, my brother's crazy; he thinks he's a chicken." And, uh, the doctor says, "Well, why don't you turn him in?" The guy says, "I would, but I need the eggs." Well, I guess that's pretty much now how I feel about relationships; y'know, they're totally irrational, and crazy, and absurd, and... but, uh, I guess we keep goin' through it because, uh, most of us... need the eggs.