Inspiration

College life can feel overwhelmingโ€”assignments, deadlines, and constant stress. We wanted to create something simple, calming, and engaging that blends productivity with emotional relief. CampusPup was inspired by the idea of a digital companion that resolves the emotional distress of students with irresistible cuteness of speakable puppy.

What it does

CampusPup is an AI-powered campus companion where users can:

๐Ÿถ Interact with a 3D virtual pet (pet, walk, play)

๐Ÿ“Š Track happiness and engagement through gameplay

๐Ÿค– Chat with an AI assistant tied to their identity

๐Ÿง  Ask questions like: โ€œWhat did I ask before?โ€ โ€œShow my activityโ€

๐Ÿ” Access personalized AI responses powered by secure authentication

The experience blends game + AI + personalization into one unified platform.

How we built it

Frontend

Next.js + React Three.js (@react-three/fiber, drei) for 3D campus + dog

Backend

Next.js API routes MongoDB for persistent chat history and user data

AI

Gemma (via @langchain/google-genai) LangChain tools for structured data access

Auth & Security

Auth0 for authentication User-scoped data using userSub AI only accesses data belonging to the authenticated user

๐Ÿ† MLH Track - Best use of Auth0 AI Agent

We implemented an identity-aware AI agent using the @auth0/ai-langchain SDK to securely connect user authentication with AI-driven tool execution. By combining Auth0 with a LangChain-based agent loop, we moved beyond a simple chatbot and built a protected, user-scoped AI system.

How we used the Auth0 AI LangChain SDK

The SDK serves as the identity layer within our agent architecture. We integrated it to ensure that:

The authenticated user context (session.user) is injected into the AI workflow AI tools execute on behalf of the authenticated user All data access is scoped using Auth0โ€™s unique identifier (userSub)

This ensures every AI action is tied directly to a verified identity.

Agent and Tool Architecture

We built a multi-tool AI system using LangChain, where the agent dynamically selects tools based on user intent.

get_puppy_memory

This tool retrieves recent interactions from MongoDB to provide emotional continuity and personalized responses.

Queries user-specific interaction history Filters using Auth0 userSub Returns structured conversation memory Enables the AI to respond with awareness of past interactions get_my_chat_history (optional / if implemented)

This tool provides structured summaries of user activity.

Retrieves chat logs from MongoDB Filters strictly by userSub Supports queries like โ€œWhat did I ask before?โ€ Example flow

User logs in via Auth0 โ†’ AI agent receives authenticated context โ†’ AI determines whether to call a tool โ†’ MongoDB query is filtered by userSub โ†’ AI generates a personalized response

Security and Isolation

We applied Auth0 AI Agent principles to enforce strict security:

Identity-scoped tools: tools do not accept arbitrary user IDs All database queries are filtered using authenticated identity No cross-user data exposure is possible Tool execution is tied to the Auth0 session

This results in a private-by-design AI system.

Why the SDK matters

The @auth0/ai-langchain SDK provides the foundation for secure tool orchestration.

Instead of a passive chatbot, our system enables:

AI โ†’ tool execution โ†’ identity-scoped data access

This allows CampusPup to act as a personalized assistant that can safely retrieve and reason over user-specific data.

Impact

By combining:

Auth0 authentication @auth0/ai-langchain integration MongoDB user-scoped storage Gemma-powered AI

we created a system where:

AI understands the user AI remembers the user AI acts on behalf of the user AI is restricted to that userโ€™s data

๐Ÿ† MLH Track - Best use of Solana

NFT Minting for your special moments with puppy. We used our own wallet with base58 private key in environment variable and we will pay all the fees on solana devnet for you guys to be able to mint your nft special moments.

๐Ÿ† MLH Track - Best use of MongoDB

MongoDB powers:

๐Ÿ“š Chat history storage

๐Ÿงพ AI interaction logs

๐Ÿ‘ค User-specific data

Each record is tied to:

userSub (Auth0 unique ID)

This ensures:

โœ” fast retrieval โœ” scalable storage โœ” secure per-user isolation

๐Ÿ† MLH Track - Best use of Gemma

We used Gemma via LangChain to:

Generate conversational AI responses Summarize user activity Provide contextual, personalized insights

Gemma enables fast, lightweight, and expressive AI responses within our app.

๐Ÿ† MLH Track - Best use of Snowflake

We used Snowflake Cortex AI to analyze user interactions stored in MongoDB.

User data is first saved in MongoDB, then sent to Snowflake where Cortex AI processes it using SQL to detect emotional tone and generate wellness insights.

Flow: MongoDB โ†’ Snowflake Cortex AI โ†’ structured insights

This allows us to transform raw application data into meaningful, scalable analytics.

๐Ÿ† MLH Track - Best use of ElevenLabs

Future integration includes:

๐Ÿ”Š Voice interaction with CampusPup

๐Ÿถ Dog reactions (happy sounds, breathing, etc.)

๐ŸŽ™ AI voice assistant for campus updates

This enhances immersion and accessibility.

Challenges we ran into

โš ๏ธ Understanding Auth0 AI Agent vs normal Auth0 usage

โš ๏ธ Integrating LangChain with structured tools

โš ๏ธ Handling model responses (filtering out โ€œthinkingโ€ content)

โš ๏ธ Attempting Token Vault / Gmail integration (OAuth complexity)

โš ๏ธ Dependency conflicts (langgraph, peer deps, etc.)

Accomplishments that we're proud of

โœ… Built a 3D interactive pet experience

โœ… Implemented secure AI with Auth0 identity

โœ… Designed a tool-based AI system with MongoDB

โœ… Created a clean AI + game hybrid product

โœ… Achieved user-specific AI personalization

What we learned

๐Ÿง  AI is more powerful when combined with tools and data, not just chat

๐Ÿ” Security is critical when building AI systems

โš™๏ธ LangChain enables structured AI workflows

๐Ÿงฉ Auth0 provides a strong foundation for identity-aware applications

๐ŸŽฎ Combining fun + utility creates better user engagement

What's next for CampusPup

๐Ÿšถ Walk mode with real-time movement + dog following

๐Ÿง  Full agent system (auto tool selection)

๐Ÿ“ฌ Optional Gmail / Canvas integration

๐Ÿ”Š Voice interaction with ElevenLabs

๐Ÿ“Š Analytics dashboard with Snowflake

๐Ÿถ More pet behaviors and animations

Built With

  • auth0
  • auth0-ai
  • elevenlabs
  • gemma
  • mongodb
  • snowflake
  • solana
Share this project:

Updates