Eventually, you'll come across a talking weapon companion in Pathfinder Wrath of the Righteous. The character's name is Finnean and they act as both a nonparty companion and as a powerful weapon that can level up as the player levels them up through their story quests.
But to equip Finnean, you must first find them during a quest called the Stolen Moon, which we covered in our guide on how to find the Tiefling Traitor.
During this quest, you will be taken to a ransacked magic shop, and inside the shop, if you interact with a certain fallen-over bookcase, you will find Finnean.
The fallen bookcase can be found by interacting with the bookcase shown below, and interacting with it will soon start a dialogue with Finnean. Talk with them and choose the option to get Finnean and take him with you.
After this, you will be able to equip and use Finnean by opening up your inventory. Inside your inventory, click the small tab to the right of your screen that is labeled as the character's name "Finnean." This will open another tab, and if you click the middle purple tab, you can change the type of weapon Finnean can be.
Choose the one you want to use Finnean as, and then click and drag the weapon icon below into your equipped weapon slot. Doing so will allow you to equip Finnean as your current weapon.
Check out our other Pathfinder guides for more help with the Pathfinder series!