Firefly: A Safe AI Learning Companion for Kids

Firefly: A Safe AI Learning Companion for Kids

TL;DR: I built a kid-safe AI chat interface in two weeks so my 11-year-old daughter could explore AI safely. It's working quite well, and here's what it looks like before I (might!) scale it up.


The Problem

I wanted to share some sort of AI interaction tool with my daughter. ChatGPT and Gemini are incredible tools, but they're not designed for kids: there's no parental oversight, no content moderation, and no way for me to see what she's asking. There are some supposedly targeted tools for this out there but ... I don't want to have to trust them on this.

I realized I wanted to be able to "share access via an API key" ... a way that gives her the freedom to explore, while I have peace of mind about what's being explored.

(also, a way to put my prompt/context-engineering to the test 😄)

The Solution: Firefly v1

Over the past couple weeks, I built "Firefly": a walled-garden AI companion designed specifically for kids. Here's what it looks like in action:

🎯 Five Learning Modes

The heart of Firefly is its mode system. Each mode changes how the AI responds, creating specialized learning experiences:

  • 🔍 Explore: Open-ended curiosity about any topic (shown active above)
  • 🔢 Math Helper: Socratic method: guides without giving answers
  • 🔬 Science Lab: Suggests safe experiments and explains concepts
  • 📚 Story Maker: Collaborative creative writing
  • 🎨 Creative: Hands-on projects and art guidance

The interface is deliberately clean and distraction-free. Kids see their time remaining for the day (top right), can easily switch modes, and get personalized greetings that use their name.

💬 Real Conversations, Real Learning

Here's an actual conversation from testing: my daughter asking about places to go:

Notice how Firefly:

  • Responds enthusiastically and age-appropriately
  • Provides specific, interesting examples
  • Asks follow-up questions to encourage deeper thinking
  • Uses emojis sparingly and naturally

The AI never talks down to kids, but keeps vocabulary and concepts appropriate for their age. The responses are concise (under 150 words unless explaining something complex), keeping kids engaged without overwhelming them.

🔐 Parent Control & Oversight

While the kid interface is simple and fun, parents get complete visibility and control through a separate dashboard that requires PIN authentication:

This PIN gate (shown above) ensures kids can't access settings or see the parent dashboard. Once authenticated, parents see everything:

The dashboard shows:

  • Today's Activity: Quick stats on usage (minutes, message count)
  • Recent Conversations: Full list of all chat sessions with timestamps
  • Export Option: Download all conversations for record-keeping

Clicking any conversation shows the complete exchange:

Parents can export individual conversations or bulk export everything. There are no secrets: full transparency by design.

⚙️ Flexible Configuration

The settings page gives parents control over every aspect:

Key configuration options:

  • Child Information: Name and age (used for personalized responses)
  • Theme Selection: Let kids pick their favorite color scheme
  • API Key Management: Bring Your Own Key (BYOK) approach
  • Time Limits: Adjustable daily limits (10-60 minutes)
  • Parent PIN: Protect settings and dashboard access

💰 The BYOK Advantage

The standout feature is the BYOK (Bring Your Own Key) model. Parents provide their own Gemini API key, which means:

  • Complete cost transparency: You see exactly what each conversation costs (typically pennies)
  • Privacy: Your family's conversations use your API account, not a shared service
  • No vendor lock-in: You control the AI provider
  • Near-zero infrastructure costs: I'm running this on Cloudflare's free tier

The settings page guides parents through getting a free Gemini API key and securely stores it encrypted in the database.

The Tech Stack

I kept it deliberately simple:

  • Cloudflare Workers for edge computing (fast, cheap, globally distributed)
  • D1 (SQLite) for storing conversations and settings
  • Vanilla JavaScript for the frontend (no framework complexity)
  • Tailwind CSS for styling
  • Gemini API (with user-provided keys)

Total infrastructure cost: $0 on Cloudflare's free tier.

What's Next

Now that v1 works for my family, I'm considering one of:

  • Adding multi-family support (so friends can use it)
  • Building out the parent dashboard with usage trends
  • Adding more AI providers (Claude, GPT) as options
  • Creating a simple subscription model (Pay $3-5/month, BYOK)

But first, I want to see more real-world usage and gather feedback. So, will update in another 3-6 months.

(Also, if I end up doing nothing with this in 6 months ... will just open-source it)