Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
FermiLink 0.3.10
Light Logo Dark Logo
FermiLink 0.3.10
  • FermiLink
    • Quickstart
    • Installation
    • Tutorial: FermiLink as a Knowledge Base for Any Agent
    • Tutorial: Laptop Simulations
    • Tutorial: HPC Simulations
    • Tutorial: Code Optimization
    • Tutorial: Experimental Workflows with Exploop
    • Choosing an AI Agent
    • How FermiLink Works
    • Writing a goal.md
    • Additional Features
      • Command Line Tools
      • Web UI
      • Telegram Bot
      • Built-in Packages
      • Package Management
      • Building Your Own Package
      • Research Pipelines and Memory
      • Configuration
      • Architecture
      • API Reference
        • fermilink package
          • fermilink.agents package
            • fermilink.agents.base module
            • fermilink.agents.claude_agent module
            • fermilink.agents.codex_agent module
            • fermilink.agents.gemini_agent module
            • fermilink.agents.opencode_agent module
            • fermilink.agents.registry module
          • fermilink.cli package
            • fermilink.cli.commands package
              • fermilink.cli.commands.agent module
              • fermilink.cli.commands.gateway module
              • fermilink.cli.commands.implement module
              • fermilink.cli.commands.optimize module
              • fermilink.cli.commands.packages module
              • fermilink.cli.commands.services module
              • fermilink.cli.commands.sessions module
              • fermilink.cli.commands.workflows module
              • fermilink.cli.commands.workspace module
            • fermilink.cli.compile_helpers module
            • fermilink.cli.compile_prompts module
            • fermilink.cli.exec_runtime module
            • fermilink.cli.input_repo_helpers module
            • fermilink.cli.overlay_helpers module
            • fermilink.cli.parser_agent module
            • fermilink.cli.parser_builder module
            • fermilink.cli.parser_gateway module
            • fermilink.cli.parser_implement module
            • fermilink.cli.parser_optimize module
            • fermilink.cli.parser_packages module
            • fermilink.cli.parser_services module
            • fermilink.cli.parser_sessions module
            • fermilink.cli.parser_workflows module
            • fermilink.cli.parser_workspace module
            • fermilink.cli.routing_helpers module
            • fermilink.cli.runtime_loaders module
            • fermilink.cli.shared_helpers module
            • fermilink.cli.workflow_prompts module
            • fermilink.cli.zero_arg module
          • fermilink.exploop package
            • fermilink.exploop.artifacts module
            • fermilink.exploop.instructions module
            • fermilink.exploop.main module
            • fermilink.exploop.memory module
            • fermilink.exploop.pid module
            • fermilink.exploop.prompts module
          • fermilink.implement package
            • fermilink.implement.campaign module
            • fermilink.implement.contract module
            • fermilink.implement.git module
            • fermilink.implement.goal module
            • fermilink.implement.main module
            • fermilink.implement.prompts module
            • fermilink.implement.source_analysis module
            • fermilink.implement.state module
            • fermilink.implement.validation module
          • fermilink.optimize package
            • fermilink.optimize.benchmark module
            • fermilink.optimize.campaign module
            • fermilink.optimize.git module
            • fermilink.optimize.goal module
            • fermilink.optimize.goal_pipeline module
            • fermilink.optimize.main module
            • fermilink.optimize.prompts module
            • fermilink.optimize.source_analysis module
            • fermilink.optimize.state module
          • fermilink.packages package
            • fermilink.packages.curated_channels module
            • fermilink.packages.package_core module
            • fermilink.packages.package_registry module
          • fermilink.runner package
            • fermilink.runner.admission module
            • fermilink.runner.app module
            • fermilink.runner.scientific_packages module
          • fermilink.web package
            • fermilink.web.activity_helpers module
            • fermilink.web.app module
            • fermilink.web.artifact_helpers module
            • fermilink.web.auth_helpers module
            • fermilink.web.chat_helpers module
            • fermilink.web.package_router_helpers module
            • fermilink.web.package_session_helpers module
            • fermilink.web.runner_helpers module
            • fermilink.web.sqlite_helpers module
            • fermilink.web.status_helpers module
            • fermilink.web.storage_helpers module
          • fermilink.workspace package
            • fermilink.workspace.clean module
            • fermilink.workspace.common module
            • fermilink.workspace.filesystem module
            • fermilink.workspace.hpc module
            • fermilink.workspace.init module
            • fermilink.workspace.main module
            • fermilink.workspace.payload module
          • fermilink.agent_runtime module
          • fermilink.config module
          • fermilink.providers module
          • fermilink.router_rules module
          • fermilink.services module
    • Contributing
    • Citation
Back to top
View this page
FermiLink
Docs Quickstart Packages Optimization GitHub

Tutorial: FermiLink as a Knowledge Base for Any Agent¶

This tutorial shows how to use FermiLink purely as a scientific package knowledge base under your favorite coding agent — whether you use the Codex CLI, Claude Code CLI, Claude Desktop, the Claude Code VS Code extension, Cursor, Gemini CLI, OpenCode CLI, or any other agent that reads AGENTS.md / provider-specific instruction aliases in the current working directory.

The overall workflow is very straightforward:

  1. fermilink install — bring a scientific package knowledge base into your machine.

  2. fermilink init <pkg-id> — overlay that knowledge base into your project directory so the agent of your choice can read it.

  3. Open the directory with your agent and solve the scientific problem normally.

  4. fermilink clean — remove the overlay when you are done, leaving your project directory exactly as it was before.

You do not need to use fermilink exec/chat/loop for this workflow. FermiLink is acting only as a knowledge-base provisioner; your agent does the reasoning.

This tutorial is self-contained: you can follow it from a fresh shell without reading any other page.

Prerequisites¶

You need:

  • Python >= 3.11

  • git on PATH

  • One coding agent already installed and authenticated (Codex, Claude, Gemini, OpenCode, Cursor, etc.)

This tutorial assumes the default FermiLink runtime location at ~/.fermilink. If you want a different location later, see Advanced Configuration.

Step 1. Install FermiLink¶

A clean conda environment is recommended so the install does not touch your system Python:

conda create -n fermilink python=3.11 -y
conda activate fermilink

pip install fermilink

Quick check:

fermilink --help

Step 2. Install a scientific package knowledge base¶

A package knowledge base in FermiLink is the full source code tree of a scientific package plus an Agent Skills layer that points the agent to the high-signal documentation, tutorials, source functions, and known pitfalls for that package. There are three ways to install one package knowledge base.

Option A. From the curated skilled-scipkg channel (150+ packages)¶

The default channel hosts more than 150 curated scientific packages (see Built-in Supported Scientific Packages for the live catalog). Search and install by package id:

# search the curated channel
fermilink avail qutip

# install one or several curated packages
fermilink install qutip
fermilink install lammps pyscf meep

Option B. From any GitHub repository URL (public or private)¶

Pass any GitHub URL as the install key. FermiLink clones the repository over SSH (git@github.com:<owner>/<repo>.git) and registers it as a local package knowledge base. This works for both public and private repositories, as long as your SSH key has access to the repository.

# public repo
fermilink install https://github.com/skilled-scipkg/qutip

# private repo (your SSH key must have access)
fermilink install https://github.com/your-org/internal-solver

Note

The package id is derived from the repository name (for example, internal-solver for your-org/internal-solver). If you have not yet set up an SSH key for GitHub, follow GitHub’s SSH key setup guide first.

Option C. From any local directory¶

If the package lives on your local disk (e.g., an in-house code, a fork you are iterating on, or a cloned repo with hand-written skills/), point fermilink install at the directory:

# current directory
fermilink install .

# explicit path
fermilink install ~/code/my-solver

# equivalent explicit form (also accepts a custom package id)
fermilink install my-solver --local-path ~/code/my-solver

Tip

If your local package does not yet have an Agent Skills layer (skills/ directory), you can optionally run fermilink compile <package_id> <path> first to generate it. See compile: Configure Your Package for details.

Confirm the install (whichever method you used)¶

fermilink list

Each installed knowledge base is stored under ~/.fermilink/scientific_packages/packages/<package_id>/.

Step 3. Overlay the knowledge base into your project directory¶

Create (or move into) the working directory where you want the agent to do its work, then run fermilink init <pkg-id>:

mkdir -p ~/projects/jc_demo
cd ~/projects/jc_demo

fermilink init qutip

What this does:

  • Symlinks the installed package source tree entries into the current directory (so the agent can read every file).

  • Copies the skills/ directory as a managed local copy (the agent’s primary entry point for package-specific guidance).

  • Drops an AGENTS.md policy file in the current directory and creates CLAUDE.md / GEMINI.md aliases so agents that follow the standard AGENTS.md convention or provider-specific aliases pick up the same context.

  • Records a .package_manifest.json so fermilink clean can later reverse the overlay safely.

After this step, your project directory looks like a normal working folder with the package knowledge laid alongside any files you already had.

Note

You can also pass an explicit destination: fermilink init qutip ~/projects/jc_demo. If a file would be overwritten, fermilink init errors out unless you pass --force.

Step 4. Use any agent to solve the problem¶

Now hand the directory over to whichever agent you prefer. Each agent picks up the overlaid AGENTS.md / provider-specific aliases and the package skills/ automatically.

Codex CLI

cd ~/projects/jc_demo
codex

Then ask in the Codex prompt:

Use qutip to simulate the Jaynes-Cummings model (two-level system + single
cavity mode). Plot the excited-state population vs time and save the figure
as jc_population.png.

Claude Code CLI

cd ~/projects/jc_demo
claude

Claude Code reads CLAUDE.md (created by fermilink init as an alias of AGENTS.md) and the package skills/ automatically.

Claude Desktop

In Claude Desktop, add ~/projects/jc_demo as a project / working folder and start a new chat. The same CLAUDE.md and skills/ files are visible to the desktop client.

Claude Code VS Code extension / Cursor / other IDE agents

Open the folder (code ~/projects/jc_demo or cursor ~/projects/jc_demo) and start the agent panel. The agent reads AGENTS.md / CLAUDE.md from the workspace root the same way the CLI does.

Gemini CLI

cd ~/projects/jc_demo
gemini

Gemini CLI reads GEMINI.md (also aliased to AGENTS.md by fermilink init).

OpenCode CLI

cd ~/projects/jc_demo
opencode

OpenCode reads the workspace instructions and can use any provider/model profile configured in OpenCode.

Step 5. Clean up the overlay with fermilink clean¶

When you are finished the whole process, restore the directory to its pre-overlay state:

cd ~/projects/jc_demo
fermilink clean

What this does:

  • Removes the symlinks pointed at the installed package tree.

  • Removes the managed skills/ directory copy.

  • Removes the AGENTS.md policy file and its CLAUDE.md / GEMINI.md aliases.

  • Removes .package_manifest.json.

  • Leaves all of your files (scripts, figures, results) untouched.

If you have modified a managed file by hand, fermilink clean refuses to delete it. Pass --force only when you are sure those local changes can be discarded:

fermilink clean --force

The installed knowledge base itself stays under ~/.fermilink/scientific_packages/ so you can re-overlay it later with another fermilink init <pkg-id> — no need to download or clone again.

To also delete the installed knowledge base from disk, use fermilink delete <pkg-id> (see install: Built-In Scientific Package Management).

Troubleshooting quick checks¶

  • “Package id is required” on install: pass a curated id, GitHub URL, or local path as the install key.

  • GitHub clone fails for a private repo: confirm your SSH key is added to your GitHub account and that you have read access to the repository; the installer clones via git@github.com:<owner>/<repo>.git.

  • “Conflict at <path>” during fermilink init: the destination already contains a file or directory with the same name. Move/rename it, or re-run with --force to overwrite.

  • Agent does not seem to use the package skills: confirm AGENTS.md / CLAUDE.md / GEMINI.md and a skills/ directory exist at the workspace root after fermilink init (ls -la should show them).

Further reading (optional)¶

  • install: Built-In Scientific Package Management — full reference for install / activate / overlay / delete and the curated channel layout.

  • compile: Configure Your Package — generate the skills/ layer for a local package via fermilink compile.

  • Built-in Supported Scientific Packages — the live list of curated packages in the default skilled-scipkg channel.

  • Choosing an AI Agent — comparison of supported agent providers.

  • Tutorial: Laptop Simulations — end-to-end laptop walkthrough using FermiLink’s own exec/chat/loop runners (if you prefer that flow over bring-your-own-agent).

Next
Tutorial: Laptop Simulations
Previous
Installation
Copyright © TEL Research Group 2026
On this page
  • Tutorial: FermiLink as a Knowledge Base for Any Agent
    • Prerequisites
    • Step 1. Install FermiLink
    • Step 2. Install a scientific package knowledge base
      • Option A. From the curated skilled-scipkg channel (150+ packages)
      • Option B. From any GitHub repository URL (public or private)
      • Option C. From any local directory
      • Confirm the install (whichever method you used)
    • Step 3. Overlay the knowledge base into your project directory
    • Step 4. Use any agent to solve the problem
    • Step 5. Clean up the overlay with fermilink clean
    • Troubleshooting quick checks
    • Further reading (optional)