The Fountains of Paradise by Arthur C. Clarke (Wikipedia, ISFDb) features Starglider, a craft that enters our solar system.
That is a background story to the story of the construction of the first space elevator.
The power of the signal was no longer surprising; its source was already well inside the solar system, and moving sunward at six hundred kilometres a second. The long-awaited, long-feared visitors from space had arrived at last.
The Fountains of Paradise, chapter 12, "Starglider"
It's flying rapidly through the solar system and is just on a course to utilize the gravity of the sun to be flung off somewhere else.
And since - like our own early Pioneers and Voyagers - it employs the gravitational fields of the heavenly bodies to deflect it from star to star, it will operate indefinitely, unless mechanical failure or cosmic accident terminates its career. Centaurus was its eleventh port of call; after it had rounded our sun like a comet, its new course was aimed precisely at Tau Ceti, twelve light years away. If there is anyone there, it will be ready to start its next conversation soon after AD 8100.
The Fountains of Paradise, chapter 14, "The Education of Starglider"
The story ends with something like the AI giving the location from where it was sent, and (maybe?) noting that it has sent a signal there, [...]
For Starglider combines the functions both of ambassador and explorer. When, at the end of one of its millennial journeys, it discovers a technological culture, it makes friends with the natives and starts to trade information, in the only form of interstellar commerce that may ever be possible. And before it departs again on its endless voyage, after its brief transit of their solar system, Starglider gives the location of its home world - already awaiting a direct call from the newest member of the galactic telephone exchange.
But not as far, since it is noted that
Now we have only to wait 104 years for an answer. How incredibly lucky we are, to have neighbours so close at hand.
[...] it doesn't even know if the alien civilization who sent it still exists.
That doesn't match. It ends its conversation in a different way.
Starholme informed me 456 years ago that the origin of the universe has been discovered but that I do not have the appropriate circuits to comprehend it. You must communicate direct for further information.
I am now switching to cruise mode and must break contact. Goodbye.
The Fountains of Paradise, chapter 16, "Conversations with Starglider"