Marketplace to create and trade characters, stories, and much more.
Personatokens.ai is an AI character NFT marketplace that leverages Langchain, Pinecone, Upstash, Vercel's AI SDK, and OpenAI's GPT APIs to generate AI characters with memory. These characters can be minted and traded as NFTs on the blockchain. Once an NFT is minted, users can engage in conversations with the AI character. As the character accumulates more conversations, the data becomes context for subsequent interactions, resulting in higher quality conversations.
Users also have the option to list their NFTs for sale. To initiate a conversation with the AI character, other users must purchase the corresponding NFT. As more users engage in conversations, buy, and sell these NFTs, the value and demand for the NFTs increase over time. This is due to the AI character becoming "smarter" as it gathers a vast amount of context from numerous interactions, fostering an active and competitive marketplace environment.
Project Inspiration: https://github.com/a16z-infra/companion-app
Users are onboarded to the marketplace by connecting their Web3 wallet (such as Metamask or Coinbase wallet) with the dApp. Once the user's wallet is connected, the dApp identifies the user by their wallet address. Users can then create their Character NFT by providing information about the character, including:
Upon completing these details, users can proceed to create the character. Clicking the "Create Character" button triggers automatic minting of the NFT for the character. The NFT metadata includes the character's name, description, and image, while other information is stored in the Planetscale database.
When users engage in conversations with the character, Now using Langchain the stored character backstory and sample conversations are used as context. As the AI responds to message. the messages (both the user message and the AI response), are stored in Redis database and are indexed on Pinecone vector database. For subsequent conversations, a similarity search is performed in the Pinecone DB using OpenAI Embeddings. If similar conversations are found, the corresponding dialogue is retrieved from Redis DB and used as context for model using langchain. Once the response is generated, it is then streamed to the frontend after a bit of prompt engineering.
Users have the option to list these characters for sale on the NFT marketplace, which is currently deployed on the Base goerli testnet (it also support Optimism and Zora testnets). Other users can purchase these listed NFTs, interact with them, and subsequently sell them, creating a dynamic cycle within the marketplace.