Skip to main content

Write a goal.md, FermiLink takes care of autonomous scientific simulations and optimization at both laptops and HPCs

Project description

FermiLink logo

Docs PyPI License Python arXiv:2604.03460

Write a goal.md. Let AI handle the rest.

FermiLink reads a simple markdown file describing your scientific computing goal,
then autonomously runs and iterates on your laptop or HPC clusters,
so you can focus on the science, not the infrastructure.


What Can FermiLink Do?

๐Ÿ”ฌ Autonomous Scientific Simulations (stable)

Describe a simulation goal in plain language. FermiLink picks the right packages, generates input files, submits jobs, monitors progress, and analyzes the data, even across multi-day HPC campaigns with hundreds of tasks.

fermilink loop goal.md          # long-running simulations on workstations or HPC
fermilink research goal.md      # full research-paper-scale, multi-task campaigns

โšก Autonomous Code Optimization (beta)

Apply FermiLink to your existing scientific code with a performance goal. It iteratively modifies hot paths and runs deterministic benchmarks.

At the end of the day, it provides optimized scientific code with improved speed while preserving computational accuracy.

fermilink optimize goal.md      # iterative code with correctness guarantees

Both features share the same interface: a single goal.md file.


How it works?

Step 1. You write a goal.md, a plain markdown file:

# Goal: Photonic crystal band structure

Simulate the band structure of a 2D triangular lattice of dielectric
rods (r=0.2a, ฮต=12) in air using MEEP/MPB.

## What to compute
- TM and TE band diagrams along ฮ“->M->K->ฮ“
- Extract the band gap ratio (ฮ”ฯ‰/ฯ‰_mid) for the first gap

## Success criteria
- At least 8 bands converged with resolution โ‰ฅ 32
- Band gap ratio within 5% of published values

## Deliverables
- Save final band diagram as `bands.png`

Step 2. Run one command:

fermilink loop goal.md

Step 3. FermiLink takes over. You come back to a finished bands.png and a summary report.


Quickstart (5 minutes)

# 1. Install
pip install fermilink

# 2. Set up an AI agent (pick one)
fermilink agent codex        # or: claude, gemini

# 3. Install a scientific package knowledge base
fermilink install meep       # 150+ packages available

# 4. (Optional) Configure the default SLURM HPC profile
fermilink hpc

# 5. Write your goal.md (see example above), then run
fermilink loop goal.md

That's it, you are all set!

First time? Just run fermilink with no arguments. Then, an interactive setup wizard will walk you through everything.


How It Works

FermiLink separates what you want (your goal.md) from how to do it (package knowledge + agent reasoning):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   goal.md   โ”‚ โ”€โ”€โ”€โ–ธ โ”‚   AI Agent       โ”‚ โ”€โ”€โ”€โ–ธ โ”‚   Simulation /   โ”‚
โ”‚  (your      โ”‚      โ”‚  (Claude, Codex, โ”‚      โ”‚   Optimization   โ”‚
โ”‚   intent)   โ”‚      โ”‚   Gemini)        โ”‚      โ”‚   Engine         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚                          โ”‚
                     reads from                  runs on
                            โ–ผ                          โ–ผ
                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ”‚  Package         โ”‚      โ”‚  Your laptop,    โ”‚
                   โ”‚  Knowledge Base  โ”‚      โ”‚  workstation,    โ”‚
                   โ”‚  (150+ packages) โ”‚      โ”‚  or HPC cluster  โ”‚
                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The agent doesn't just generate scripts. Instead, it sustains multi-task, multi-day computational campaigns without human intervention.


Workflows at Every Scale

FermiLink supports the following six major commands for various simulation workflows:

Command Best for Duration Recommended Environment
exec Quick one-off simulations Minutes Laptop / workstation
chat Interactive conversation with agents Hours Laptop / workstation
loop Iterative jobs with PID/SLURM monitoring Hours -> days Workstation / HPC
reproduce Multi-task, paper-scale reproducation of papers Days -> weeks HPC clusters
research Multi-task, paper-scale research Days -> weeks HPC clusters
optimize Code performance tuning (beta) Hours Any

Three Ways to Interact

FermiLink isn't just a CLI tool. Pick the interface that fits you:

  • Command line โ€” fermilink exec/loop/reproduce/research/optimize goal.md for headless, scriptable autonomy
  • Web UI โ€” fermilink start launches a ChatGPT-style browser interface for interactive sessions
  • Telegram bot โ€” fermilink gateway connects to Telegram so you can run and monitor HPC jobs from your phone

150+ Built-in Scientific Packages

FermiLink ships with knowledge bases for packages spanning multiple scientific domains. Install any of them with a single command:

fermilink install <package>       # e.g., meep, lammps, pyscf, openfoam
fermilink list                    # see all installed packages

Don't see your package? Compile your own local knowledge base:

fermilink compile /path/to/your/code

Browse the full package list โ†’


Build Your Own Package Knowledge Base

If you have a research pipeline described in a paper or group-specific workflow, you can turn them into a FermiLink-compatible knowledge base:

# Compile a local code into a knowledge base
fermilink compile /path/to/my-simulation-code

# Recompile after updating your code
fermilink recompile my-simulation-code

This means FermiLink can autonomously operate any scientific code, not just the 150+ that ship built-in.


Documentation

Resource Link
Full documentation fermilink.org
Installation guide fermilink.org/installation
Laptop tutorial fermilink.org/tutorial_laptop
HPC tutorial fermilink.org/tutorial_hpc
Architecture fermilink.org/architecture
API reference fermilink.org/api

Citation

If FermiLink is useful in your research, please cite:

  • Gang Mengโ€ , Andres Felipe Bocanegra Vargasโ€ , Xinwei Jiโ€ , Federico Garcia-Gaitan, Felipe Reyes-Osorio, Jalil Varela-Manjarres, Yafei Ren, Mohammadhasan Dinpajooh, Branislav K. Nikoliฤ‡, Tao E. Li. FermiLink: A Unified Agent Framework for Multidomain Autonomous Scientific Simulations. arXiv:2604.03460 (2026).

Contributing

We welcome contributions, from bug reports to new package knowledge bases. See CONTRIBUTING โ†’


License

AGPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fermilink-0.3.2.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fermilink-0.3.2-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page