Starting with the conceit that you meant sapient instead of sentient - here's my idea.
First, it depends on the physical properties of your world. This will probably only work on a planet of many small islands, separated by a greater distance than can be easily flown by most birds/flying reptiles/squirrels what-have-you.
This all starts with a small herbivore who builds nests out of small branches/logs and mud or self expressed resin. Could be beavers or bugs, doesn't particularly matter. But because of the makeup of the world - there aren't many large lakes for them to make their nests in, so they evolve to anchor their nests to rocks exposed by low tides, slightly off the coast of the islands. Maybe they build conically up from the rocks, maybe they use a biological mechanism to secure the nests so they are anchored, maybe they just build them up big enough that they stick up out of the water.
Regardless, these nests happen. I personally like to envision them as conical beaver lodges, because I like beavers.
So, these nests are built up around the islands that the creatures are native to. There are birds that can fly between islands, spreading flora and whatnot in their droppings. But not all the birds can do so. So the birds only capable of shorter flights begin to colonize the larger nests, building their nests on top of the beaver nests. This keeps them safe from carnivores, and is a benevolent sort of parasitism. Well, these birds are seed eaters. They feed from various plants and in the fullness of time, a particularly broad leafed tree gets it's seeds mixed in. The birds deposit some of those seeds while nest building on one of the island nests, and what do you know, the tree takes root. As it grows, the prevailing winds break it's bonds to the rocks - sending nest and tree off into the unknown.
The colony of beavers is stuck, the birds are stuck, and the tree is pretty obviously stuck. So the winds take this makeshift boat over time onto virgin shores, where the beavers are wildly successful, the birds are wildly successful, and the trees... well they do okay too. Eventually through self selection we develop a subrace of beavers who build weaker bonds, then eventually no bonds, because these birds are now widespread enough that their floating nests will be colonized and en-sailed. This allows new colonies to constantly form and drift around until they hit land, feast, and rebuild.