First Edition · 2026
Book cover: molecular structures and neural networks converging toward a glowing scientific discovery, representing Building Discovery AI, From Vibe Coding to Autonomous Science

Building Discovery AI From Vibe Coding to Autonomous Science

A practitioner's guide to building AI systems that accelerate scientific research: from intelligent research agents to autonomous discovery pipelines.

Alexander (Sasha) Apartsin, Ph.D. & Yehudit Aperstein, Ph.D.

Scientific discovery is being transformed. AI systems now fold proteins, design new molecules, mine millions of papers overnight, and begin to run their own experiments. This book teaches you to build those systems. It starts with vibe coding as a disciplined engineering practice, works through the scientific foundation models reshaping biology, chemistry, and physics, and builds into systems that read the literature, generate hypotheses, and validate scientific claims. It closes with fully autonomous AI scientists that propose and execute their own experiments. A single growing platform called the Discovery Workbench ties all 58 chapters into one connected build, from a first research-coding agent to a system capable of autonomous scientific investigation.

7 parts 58 chapters appendices & 6 capstone tracks

The Seven-Part Arc

Each part stands on the one before it; together they carry you from a first coding agent to a fully autonomous AI scientist.

I

Foundations of Discovery AI

Discovery as search, inference, and optimization. Scientific methodology, knowledge representation, reasoning, and system architecture. The conceptual bedrock all later chapters build on.

6 chapters
II

Discovery Through Software Engineering & Vibe Coding

Using AI to write your research software — done rigorously. Covers specification, verification, and repair of AI-generated code; building multi-agent development teams; context engineering; and assembling autonomous software pipelines that write, test, and maintain their own code.

18 chapters
III

Discovery Through Data & Models

The AI models reshaping science: protein structure prediction (AlphaFold 3), protein language models (ESM-3), materials discovery (GNoME), and frontier reasoning models. Plus causal discovery, Bayesian inference, and generative models that design new molecules from scratch.

11 chapters
IV

Discovery Through Knowledge

Literature mining at scale, retrieval-augmented discovery, knowledge graph construction, hypothesis generation, research agents, and scientific claim validation.

6 chapters
V

Discovery Through Simulation & Optimization

Build systems that propose and track experiments. Covers differentiable simulation, Bayesian optimization for experiment design, automated lab workflows, and reproducible experiment registries that record every trial and its provenance.

6 chapters
VI

Discovery in Scientific Domains

Deep application chapters for biology and medicine, chemistry and materials, physics and engineering, climate and earth science, and social and economic systems.

5 chapters
VII

Autonomous Discovery Systems

AI systems that run science without a human in the loop: architectures for autonomous hypothesis generation, multi-agent research teams, self-driving laboratories that operate physical instruments, and the evaluation and safety frameworks that make them trustworthy.

6 chapters

How This Book Teaches

Six habits, kept in every chapter from the first agent prompt to the last autonomous experiment.

The Discovery Workbench

A single platform grows across all 58 chapters. Each chapter contributes a new component; by the end it can read literature, generate hypotheses, design experiments, and produce reproducible reports.

Mathematics First

Every method is derived before the code appears. Score functions, equivariant architectures, causal graphs, and posterior predictive checks are worked out in full, then implemented.

Library Shortcuts

After each from-scratch build, a shortcut callout shows the same task in a few lines of the production library, and names exactly what the library handles for you.

Reproducible Recipes

Every chapter closes with a concrete, runnable recipe: pinned library versions, evaluation metrics, ablations, and a reproducibility checklist. Code you can actually run; results you can actually reproduce.

Failure Mode Catalog

What breaks, why, and how to diagnose it. Each chapter documents the failure modes specific to its method, from hallucinated citations to degenerate molecular generators.

Research & Practitioner Extensions

Every chapter closes with a publishable next question pointing to open research problems, and a deployable next feature with production considerations — so whether you are a researcher, an engineer, or both, each chapter has a clear next step for you.

The Hands-On AI Science Series

Building Discovery AI is one of nine connected books, each a deep, build-it-yourself guide to a major field of AI.

Hands-On AI Science is a series of in-depth guides to the major fields of artificial intelligence. Every book goes deep into the theory, models, and internals, covering the classical foundations and the most recent ideas, then shows you how to build each one in Python with the modern libraries and tools that get the job done. The writing stays plain and light (illustrations, analogies, mental models, worked examples, and a little fun) without trading away rigor or coverage. Each volume is self-contained and complete enough to anchor a full course on its subject.

Building Language AI

From Tokens to Agents.

Read online · Kindle

Building Vision AI

From Pixels to Generative Models.

Read online · Kindle

Building Temporal AI

From Forecasting to Sequential Decision Making.

Read online · Kindle

Building Scalable AI

From Big Data Algorithms to Distributed Intelligence.

Read online · Kindle

Building Embodied AI

From Perception to Autonomous Action.

Read online

Building Agentic AI

From Goals to Autonomous Systems.

Read online

Building Discovery AI

From Vibe Coding to Autonomous Science.

You are here

Building Neuromorphic AI

From Spiking Neurons to Edge Intelligence.

Read online

Building Quantum AI

From Qubits to Quantum Machine Learning.

Read online

Read the full About the Hands-On AI Science Series note.