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