Inspiration

Chemistry is often taught through static diagrams and abstract equations, making it difficult for students to visualize the dynamic nature of molecular interactions. I wanted to build Metatron: a "living" chemical intelligence platform that bridges the gap between theoretical SMILES strings and tangible, visual lab experiences. I was inspired by the idea of an "Archangel of Data" that could oversee complex research, making high-level chemistry accessible through a natural, agentic interface.

What it does

Metatron is an AI-powered chemistry lab and research assistant.

  • Virtual Lab: Users can mix chemicals to see real-time balanced reactions, color changes, and physical state shifts (explosions, precipitates, etc.).
  • Agentic Research: The Chemistry Research Agent takes a molecule and autonomously plans, executes, verifies, and assesses the environmental impact of a research workflow.
  • Voice-Enabled Assistance: A voice command system allows users to interact with the lab hands-free, translating natural speech into precise app actions.
  • Interactive Learning: Features a "Guess the Tool" game, a "Periodical Table", and an AI Tutor that provides context-aware insights based on the specific molecule a student is studying.

How we built it

Metatron is built on a modern TypeScript stack with Vite + React, leveraging Gemini 3 Flash as its core reasoning engine.

  • Logic: We use Zod for schema validation, converting these schemas into JSON Schemas for Gemini’s structured output mode, ensuring accurate and reliable chemical data. Molecule data is retrieved from PubChem, while RDKit is used for 2D molecular rendering and NGL for 3D visualization. Three.js powers the virtual lab environment, adding interactive 3D effects for chemical reactions.

  • Agents: An autonomous research agent harnesses Gemini 3 Flash’s function-calling capabilities to manage a multi-phase workflow: Planning → Executing → Verifying → Emissions Assessment → Reporting. This allows the AI to reason, execute tasks, and generate structured research reports autonomously.

  • Voice NLP: The VoiceCommandManager leverages Gemini to parse spoken commands, translating user intent into function calls that drive application behavior.

Key Capabilities Enabled by Gemini:

  • Generating real-time chemical analyses from SMILES notations
  • Predicting reaction outcomes in the virtual lab
  • Creating dynamic educational content for chemistry games
  • Enabling voice-controlled navigation and research
  • Rendering molecules in 2D and 3D with RDKit, NGL, and Three.js

Challenges we ran into

Working on Metatron came with several challenges. As a master’s student, I was juggling exams and multiple school projects, which left very little time for development. This meant I had to work solo to manage the project on my own schedule.

I also faced a steep learning curve with 3D rendering, as it was my first time working with NGL and Three.js to create interactive molecular visualizations. While I aimed to build a fully immersive VR lab, time constraints made it impossible to implement this feature in the initial version.

Additionally, I ran into issues with the SpeechRecognition Web API, which worked inconsistently across different browsers, making voice-controlled interactions harder to test and debug.

Despite these hurdles, I was able to deliver a functional, visually rich, and AI-powered chemistry platform, laying the foundation for future VR, enhanced 3D experiences, and robust voice control.

Gemini Integration Description

Metatron is powered end-to-end by the Gemini API, using multiple advanced features to deliver structured, reliable, and interactive chemistry intelligence. Gemini is used not just for text generation, but as a core reasoning and orchestration engine throughout the application. Integration is at the heart of the application's three fundamental pillars:

  • Structured Output & Schema Enforcement: We utilize Gemini’s responseJsonSchema to transform unstructured chemical queries into validated JSON objects. This allows us to extract balanced LaTeX equations, toxicity scores, and physical properties (like hex codes) that drive our frontend lab simulations.
  • Autonomous Agentic Workflows: The Chemistry Research Agent uses Gemini 3’s advanced Function Calling to navigate a complex research lifecycle. It autonomously calls tools to create_research_plan, verify_result, and assess_emissions, demonstrating the model's ability to maintain state and logic across multiple turns.
  • Natural Language Action Mapping: Our voice assistant leverages Gemini’s ability to understand intent. By providing the model with a library of functionDeclarations, it acts as a router, deciding which function to call.

Key Features Used: Structured JSON Output, Function Calling, System Instructions, and Thinking Mode (via includeThoughts).

Accomplishments that we're proud of

  • A fully autonomous chemistry research agent with planning, execution, verification, and emissions assessment
  • Reliable structured AI outputs using Gemini + Zod
  • Real-time reaction simulation and visualization
  • 3D and 2D integration with NGL, RDKIT, and THREE
  • Natural voice control powered by Gemini function calling

What we learned

Through building Metatron, I gained a deeper understanding of how to integrate AI into complex applications. I learned to structure AI outputs with Zod and JSON Schemas, orchestrate multi-phase autonomous agents with Gemini 3 Flash, and implement voice-controlled interfaces using SpeechRecognition and function calling.

On the technical side, I learned 3D rendering using Three.js and NGL, which allowed me to create interactive molecular visualizations for the virtual lab. I also gained experience in integrating PubChem for molecular data, RDKit for 2D rendering, and combining these tools with real-time AI analysis.

Finally, I improved my skills in solo project management, balancing multiple responsibilities while delivering a fully functional, AI-powered, and visually rich chemistry platform.

What's next for Metatron

  • I plan to integrate Gemini’s Multimodal capabilities further, allowing users to upload photos of their real-life lab setups for instant AI safety audits.
  • I aim to expand the “Self-Driving Lab” concept by integrating with real-world IoT devices and VR lab equipment, transforming Metatron into a truly physical research partner capable of monitoring, simulating, and optimizing experiments in real time.
  • I also plan to integrate augmented reality (AR) to overlay interactive molecular visualizations, step-by-step experimental guidance, and real-time safety warnings directly onto physical lab environments, bridging the gap between digital intelligence and hands-on experimentation.

Built With

Share this project:

Updates