Science ADK¶
Build, execute and audit autonomous scientific research.
An open source agent development kit that adds typed dataflow contracts, machine-recorded provenance and deterministic integrity gates to computational research — built directly on Google ADK.
A real result, in three commands¶
The run needs no API key, no account and no bundled dataset. It queries the
NASA Exoplanet Archive for every confirmed planet with a measured period and
semi-major axis, fits T = C·aᵅ in log-log space, and reports the exponent it
recovers:
fetch: fetched 3565 confirmed exoplanets from NASA
analyze: fit 3565 planets: T ∝ a^1.4555, r² = 0.989997
evaluate: recovered exponent 1.4555 vs theoretical 1.5000, error 0.0445
The fit is blind — nothing in the pipeline assumes 3/2. Recovering Kepler's Third Law from measurements alone is the finding. Read the full walkthrough.
Why it exists¶
Coding agents can write analysis code quickly. Autonomous research needs something stronger: results that are computationally verifiable, reproducible, and defended against fabrication, leakage and silent numerical failure.
-
Native Google ADK
Every scientific agent is a real
google.adk.agents.BaseAgent, running in the standard event stream and runner lifecycle, with no translation bridge. -
Deterministic integrity gates
Six machine-checked conditions must pass before a number counts as a finding. Any failure scores the run 0.00, without exception.
-
Provenance ledger
Every input, fetch and tool call is recorded by the runtime, not by the agent. Fabricated results fail the
tool_use_verifiedgate. -
Typed DAG validation
Port types, cycles, dangling edges and unsafe source are caught before a single node executes.
-
Git-native workspace
Goal, hypotheses, DAG, runs, traces and learnings are plain files. Diff them, review them, reproduce them.
-
Tools and MCP
Every public function in
tools/is registered automatically; stdio and HTTP MCP servers plug in throughscience.toml.
The shape of an experiment¶
Research is expressed as a directed acyclic graph of specialised agent primitives, each with typed input and output ports:
graph LR
Config[ConfigAgent<br/><i>parameters</i>] --> Data[DataAgent<br/><i>ingestion / simulation</i>]
Data --> Algorithm[AlgorithmAgent<br/><i>method under test</i>]
Algorithm --> Evaluate[EvaluationAgent<br/><i>metric calculation</i>]
Evaluate --> Visualize[VisualizationAgent<br/><i>figure rendering</i>]
This is the analyze node of the bundled example, near enough verbatim:
from science_adk import AlgorithmAgent, Port, Ports
class FitKeplerLaw(AlgorithmAgent):
"""Recover the power-law exponent from a blind log-log fit."""
ports: Ports = Ports(
inputs=[Port("planets", "json")],
outputs=[Port("fit_result", "json", "Power-law exponent, r², diagnostics")],
)
async def execute(self):
planets = await self.input("planets")
periods = [p["period_days"] for p in planets]
axes = [p["semi_major_axis_au"] for p in planets]
fit = await self.call_tool("power_law_fit", x=axes, y=periods)
await self.log(f"fit {fit['n']} planets: T ∝ a^{fit['exponent']:.4f}")
return {"fit_result": fit}
Where to go next¶
-
New here
Install, run the Kepler example, then scaffold your own project.
-
Want the ideas first
Ports, provenance, gates, the audit, and why each one exists.
-
Building something
Task-shaped guides: write agents and tools, validate, run, audit, evolve.
-
Using a coding agent
Install the seven research skills into Claude Code, Cline, Cursor, OpenCode or Antigravity.