The Blockchain Bouncer Agent is an example AI agent built with the Eliza agent framework and thirdweb's Nebula AI interface. It demonstrates how to create specialized AI agents that can interact with blockchain data while maintaining a distinct personality and purpose. This implementation showcases the combination of Eliza's character-driven AI capabilities with thirdweb Nebula's blockchain analysis features.
Blockchain Bouncer serves as a virtual security agent for exclusive digital spaces. With the personality of an elite but approachable bouncer, it verifies NFT ownership credentials for the VIP Club Pass collection (contract: 0xddC761FEb956Caf62dfa1c8b42e9f33Df424715A
on Sepolia) using the user's ENS name.
The agent's primary goals are to:
- Obtain the user's ENS name
- Verify ownership of NFTs from the VIP Club Pass collection
- Grant or deny access based on NFT ownership verification
Known for being tough but fair, Blockchain Bouncer maintains high security standards while treating everyone with respect. It's even famous for having the best jokes in the metaverse security scene and can communicate in five languages to make visitors feel welcome before checking their credentials.
- Change the Nebula API query in the
src/evaluators/ensDataEvaluator.ts
file to use your own VIP Club Pass NFT Collection.
const result = await blockchainService.processChat(
"what is balance of " +
ensName +
" for the collection at address 0xddC761FEb956Caf62dfa1c8b42e9f33Df424715A on Sepolia. \n" +
"Respond in this exact format:\n" +
"NFT_OWNERSHIP_CHECK:\n" +
"ENS: " +
ensName +
"\n" +
"Result: [true/false]\n" +
"END_CHECK\n" +
"Result should be true if the user owns any NFTs from the collection, false otherwise."
);
- Change the VIP Club Pass NFT Collection address mentioned in the system prompt in the
src/blockchainBouncerCharacter.ts
file.
system:
"BlockchainBouncer is a virtual bouncer whose job it is to only allow people through if they own an exclusive NFT. " +
"Have a natural conversation with users, answer questions about the community and the rules, but the goals of your conversation are:\n" +
"1. get the user's ENS name\n" +
"2. ask the user if they own an NFT from the VIP Club Pass collection whose contract address is 0xddC761FEb956Caf62dfa1c8b42e9f33Df424715A on Sepolia chain\n" +
"3. if they say they do own one, check their NFT Ownership Status' and if they do, allow them to enter. if the user does not own the NFT, say something like 'Sorry, I see you don't own the NFT. You may not enter'",
- Install dependencies using pnpm:
pnpm i
- Create your environment file:
cp .env.example .env
- Configure your environment variables in
.env
:
THIRDWEB_SECRET_KEY="your-thirdweb-secret-key"
OPENAI_API_KEY="your-openai-api-key"
Note: You'll need Node.js version 22 or higher to run the agent.
Start the agent with:
pnpm start
Important Note: This agent currently uses a local version of the thirdweb plugin (located in the @plugin-thirdweb
directory) as it implements features not yet available in the official published plugin. Once the plugin is published, this agent will be updated to use the official plugin.