DEV Community

Cover image for Metatron: Building a Living, AI-Powered Chemistry Lab with Gemini
blessingtutka
blessingtutka

Posted on

Metatron: Building a Living, AI-Powered Chemistry Lab with Gemini

Chemistry is often taught through static diagrams and abstract equations. That works—up to a point. But once molecules start reacting, shifting states, or releasing energy, those flat representations fall short.

I wanted to build Metatron to change that.

Metatron is a “living” chemical intelligence platform that bridges the gap between theoretical representations like SMILES strings and tangible, visual lab experiences. The idea was inspired by the concept of an “Archangel of Data”—an AI entity capable of overseeing complex research and making advanced chemistry accessible through a natural, agentic interface.


What Metatron Does

Metatron is an AI-powered chemistry lab and research assistant designed for both learning and experimentation.

🧪 Virtual Lab

Users can mix chemicals and instantly observe:

  • Balanced chemical equations
  • Color changes
  • Phase transitions
  • Reactions like precipitates or explosions

All rendered visually in real time.

🤖 Agentic Research

The Chemistry Research Agent takes a molecule and autonomously:

  1. Plans a research workflow
  2. Executes the steps
  3. Verifies results
  4. Assesses environmental impact
  5. Generates a structured report

It’s not just answering questions—it’s running a full research pipeline.

🎙️ Voice-Enabled Assistance

Metatron supports hands-free interaction. Users can speak naturally, and the system translates voice commands into precise application actions using AI-powered intent parsing.

🎓 Interactive Learning

The platform also includes:

  • A “Guess the Tool” game
  • An interactive Periodic Table
  • An AI Tutor that provides molecule-specific explanations and insights

How I Built It

Metatron is built with a modern TypeScript stack using Vite + React, with Gemini 3 Flash acting as the core reasoning engine.

Core Logic & Visualization

  • Zod for schema validation, converted into JSON Schemas for Gemini’s structured output mode
  • Molecular data from PubChem
  • RDKit for 2D molecular rendering
  • NGL for interactive 3D molecular visualization
  • Three.js for the virtual lab environment and reaction effects

Agent Architecture

The autonomous research agent uses Gemini’s function calling to manage a multi-phase workflow:

Planning → Execution → Verification → Emissions Assessment → Reporting

This allows the AI to reason across steps, maintain state, and produce structured scientific output.

Voice NLP

The VoiceCommandManager leverages Gemini to interpret spoken commands and map them directly to application functions, enabling smooth voice-driven interaction.


What Gemini Enabled

Gemini isn’t just used for text generation—it’s the core orchestration layer of the app.

Key capabilities include:

  • Real-time chemical analysis from SMILES notation
  • Reaction outcome prediction in the virtual lab
  • Dynamic educational content generation
  • Voice-controlled navigation and research
  • Structured JSON outputs for reliable simulations

Gemini features used:

  • Structured JSON Output
  • Function Calling
  • System Instructions
  • Thinking Mode (includeThoughts)

Challenges Along the Way

Building Metatron wasn’t easy.

As a master’s student, I had to balance exams and multiple academic projects, which meant limited development time and working completely solo.

I also faced a steep learning curve with 3D rendering, as this was my first time using NGL and Three.js. While I initially planned to ship a full VR lab experience, time constraints made that impossible for the first version.

Voice control introduced another challenge: the SpeechRecognition Web API behaves inconsistently across browsers, making testing and debugging difficult.

Despite all this, I managed to deliver a functional, visually rich, and AI-powered chemistry platform that lays a solid foundation for future expansion.


What I’m Proud Of

  • A fully autonomous chemistry research agent
  • Reliable structured AI outputs using Gemini + Zod
  • Real-time reaction simulation and visualization
  • Seamless 2D and 3D molecular rendering
  • Natural voice control powered by Gemini function calling

What I Learned

This project pushed me to deeply understand how AI can be integrated into complex systems.

I learned how to:

  • Enforce structure in AI outputs using Zod and JSON Schemas
  • Build multi-phase autonomous agents with Gemini
  • Design voice-controlled interfaces using function calling
  • Work with 3D rendering tools like Three.js and NGL
  • Balance solo development with academic responsibilities

What’s Next for Metatron

Metatron is just getting started.

  • Multimodal Safety Audits: Users will be able to upload photos of real-world lab setups and receive instant AI-powered safety feedback using Gemini’s multimodal capabilities.
  • Self-Driving Lab: Integration with IoT devices and VR lab equipment to transform Metatron into a real physical research partner.
  • Augmented Reality (AR): Overlay molecular visualizations, step-by-step experiment guidance, and real-time safety warnings directly onto physical lab environments.

Thanks for reading 🧠🧪

If you’re curious, feedback and ideas are always welcome.

Top comments (0)