Skip to main content

gemot

CI PyPI License: MIT

Disclaimer

Research software under active, rapid and heavy development: use it at your own risk. Its command line, result fields and agent prompts change without notice. A run calls a hosted LLM for hours and is billed by that provider. Its behaviour has been tuned and checked on benchmark problems only, and it is not for clinical or regulatory use. It comes without warranty of any kind; see the LICENSE.

Overview

The agent harness built around PEtab MCP, an MCP server that wraps a single PEtab v2 parameter-estimation problem and lets an LLM agent change the model only through one constrained tool, with every change scored (fit and simulated), versioned and justified.

gemot spawns that server as a subprocess, launches a panel of agent specialists (mathematician, systems scientist, signal engineer) on it and then hands off to the judge, which selects the best-scoring version and scores it against a true or published reference — or, for a model-free data package with no reference, by an absolute goodness-of-fit test. Phoenix tracing and the run explorer read the trace and version history this pipeline leaves behind.

The zero-shot problems it drives — and the code that materializes them from the PEtab Benchmark-Models collection and fits their reference bars — live in frohlich-lab/PEtabAgentBench. The Slurm sweep tooling and the paper live in frohlich-lab/gemot_iclr_2026, which mounts those problems at examples/ and installs gemot pinned to a commit. gemot finds that checkout from the running script or the working directory, or from PETAB_MCP_REPO_ROOT (see src/gemot/paths.py).

Quickstart

Installation and dependencies

Python 3.12+ and a C++ toolchain for AMICI (see Troubleshooting).

pip install gemot              # gemot + the pinned server release
pip install "gemot[harness]"   # + the deepagents panel and Phoenix tracing, for LLM-driven runs

The indra_statements arm builds models from INDRA statements and needs the statements extra. No released pysb installs beside AMICI, so name its commit:

pip install "gemot[harness,statements]" "pysb @ git+https://github.com/pysb/pysb.git@9fc6bcb118683ad851e0a4d5604abe646f77cae3"

From a checkout, the pins group (pip >= 25.1) adds the unreleased commits PyPI refuses as dependencies: pysb's, the neural route's petab-sciml, and petab's, which imports a problem of thousands of experiments (Froehlich_CellSystems2018):

pip install -e '.[harness,statements]' --group pins

To work on the server and gemot together, install your server checkout over the pinned one (and again after any later pip install -e ., which restores the pin):

pip install -e ../PEtab-MCP

Running an example

The problems come from PEtabAgentBench. Check it out inside this repo at examples/ so gemot finds it, then let the deepagents panel build the synthetic predator–prey model through an OpenRouter-hosted model:

git clone https://github.com/frohlich-lab/PEtabAgentBench.git examples
export OPENROUTER_API_KEY=sk-or-...         # go to https://openrouter.ai/keys to get your key
python examples/predator_prey/run.py        # --driver deepagents (default)

The full example can take at least an hour to run on a laptop, so you may want to track the agent's progress via the Phoenix trace. To view this, serve Phoenix in a second terminal and point the run at it:

phoenix serve                                                   # UI at http://localhost:6006
export PHOENIX_COLLECTOR_ENDPOINT=http://localhost:6006         # in the run's terminal

The run exits 0 if the judge accepts the built model, writes its verdict to examples/predator_prey/work/result.json and archives the run under examples/_runs_archive/. The archive keeps each version's model, parameters, statements, simulations, multistart (optimization.json.gz) and pyPESTO's HDF5 result.

--model picks another OpenRouter model, and --driver scripted builds the true model without an LLM as a self-test of the pipeline.

Codex and Claude CLI drivers

Run a native CLI agent for the whole task with .[harness] installed and the CLI authenticated:

codex login
python examples/predator_prey/run.py --driver codex --model YOUR_CODEX_MODEL_ID
claude auth login
python examples/predator_prey/run.py --driver claude --model sonnet

Each run starts one codex exec or claude -p session and supplies the task once. The CLI owns its conversation, tool loop, prompt caching, and compaction. These drivers have no gemot panel or finish gate. They use the shared scored PEtab MCP tools through a local gateway; file/shell access and heldout judging tools are restricted to preserve benchmark blindness.

--model is required and passed directly to the CLI. No OpenRouter key is needed. --biocurator-model is unavailable; --recursion-limit does not apply. Optional --max-wall-seconds or --codex-timeout / --claude-timeout bounds the entire session.

Phoenix records observed native events and actual gateway tool calls under the run trace. Codex usage is session aggregate; Claude additionally exposes response usage. Raw events are archived as work/codex_events.jsonl or work/claude_events.jsonl. See CLI drivers for setup, trace limits, and the ChatGPT terms assessment.

Project structure

gemot (under src/); each submodule is documented in its own docstrings.

  • gemot.runner — cleanup → server → driver → judge, and the command line every example's run.py drives.
  • gemot.agent — the deepagents panel: tool curation, guards, finish gate, driver. --driver barebones is the null arm: the same model, problem, libraries and compute, but a stock deepagent with file tools and a sandboxed shell over the PEtab files on disk — no server, no panel, no scored editing loop — asked to deliver a finished PEtab problem in place, which the same judge then scores at its delivered parameter values (see src/gemot/agent/barebones.py).
  • gemot.neural_ode — the non-LLM model producer. It reads a PEtab problem's tables without opening the shipped model, restates the problem as a PEtab SciML neural ODE, fits it through AMICI's JAX backend, scores it against the example's held-out set, and distils the field into Antimony rate laws with PySR for the same judge. python -m gemot.neural_ode fit|propose runs either half.
  • gemot.explorer — the run viewer over archived and in-flight runs (python -m gemot.explorer).
  • gemot.sweep — the Slurm sweep driver for a checkout that pins gemot: one job array of runs whose fits share one pool of SLURM workers, and the pool, trace collector and explorer as service jobs (python -m gemot.sweep, docs/SWEEP.md).
  • gemot.analysis, gemot.ablations — sweep analysis (python -m gemot.analysis) and the registry of every switch that changes what a run does (python -m gemot.ablations).
  • gemot.causal_constraints — what the causal_constraints arm records: the refusals per constraint, the first version making them all, and how the judged model behaves on each indirect constraint, read with the gain norms of Fröhlich et al., MSB 2023.

Design notes

The principles gemot is built on are the server's — the single scored editing tool, the one named score every gate reads, the versioned provenance. They are stated in the server's design notes.

Development

pip install -e '.[dev]' --group pins   # dev adds pytest, the agent stack and every extra
pytest -n 3                            # needs the full install (AMICI/pyPESTO are hard deps); PubMed is stubbed

A release is cut by publishing a GitHub release tagged v<version>, which the release workflow uploads to PyPI. The version is [project] version in pyproject.toml.

License

MIT; see LICENSE.

Troubleshooting

AMICI compiles generated C++ and needs a toolchain: a C++ compiler, CMake, Ninja, and the pip swig binary on PATH. AMICI ships only a source distribution, so it is built on install (BLAS comes from the scipy-openblas64 wheel, or Accelerate on macOS).

Metadata

Release files for gemot 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gemot 0.1.0
File Size Uploaded Provenance Actions
gemot-0.1.0.tar.gz 951.7 kB With provenance Details for gemot-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gemot 0.1.0
File Interpreter ABI Platform Actions
gemot-0.1.0-py3-none-any.whl Python 3 none any Details for gemot-0.1.0-py3-none-any.whl

Total release size: 1.6 MB

Release files / gemot-0.1.0.tar.gz

Download URL gemot-0.1.0.tar.gz
Size 951.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7cf1d3f35313fae9f08d29c0892c8f264ee7888dff13d2bafdf5c1596691054b
BLAKE2b-256 checksum
How to use checksums
34158c5471e10773abeb1a9d982f4ecc99717d59925e4e048914ccfe3a5cc09a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / gemot-0.1.0-py3-none-any.whl

Download URL gemot-0.1.0-py3-none-any.whl
Size 645.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
478ec6543983a99e585c944d43b57abb85cfb197b41897773afaba1733aeb622
BLAKE2b-256 checksum
How to use checksums
1114cbef10d1a38f503c3094a5532e22bc2ea775fc058faa22a6a3f736b58264
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for gemot 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gemot-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page