Fiji / ImageJ
GROOVY · MACROS · UI GUIDANCEA full Fiji with curated plugins. The coder writes Groovy against real plugin APIs, and the debugger reads the ImageJ log and fixes the script with surgical edits.
Agentic-J is an AI agent that analyses microscopy images with the tools the community already trusts: Fiji and its plugins, the scientific Python stack and napari. Describe your question in plain English. It adapts the analysis to your data, picks the right plugin or library, writes and debugs the code, and documents the whole project. If a tool is missing, it can install it.
Runs locally Your data stay on your machine Apache 2.0 · open source
Agentic-J builds on the plugins and libraries the bioimage community develops and validates, and picks the right one for each step. Each tool below comes with a curated skill that the agent loads when needed. Need something else? Ask the agent to install it.
A full Fiji with curated plugins. The coder writes Groovy against real plugin APIs, and the debugger reads the ImageJ log and fixes the script with surgical edits.
The Python analyst writes scripts for the scientific Python stack. A one-line header selects which of the container's conda environments the script runs in.
A napari viewer is available through the Model Context Protocol. The agent opens layers, adjusts views and hands you tools, and napari opens only when a task needs it.
You'll need Docker, at least 12 GB of RAM, 50 GB of free disk, and an OpenAI or OpenRouter API key.
Install Git and Git LFS, because the knowledge base is stored with LFS.
git lfs install git clone \ https://github.com/MMV-Lab/Agentic-J.git cd Agentic-J
Copy the template, open it in a text editor and fill in one key. In nano, save with Ctrl+O, Enter and exit with Ctrl+X; on Windows, notepad .env works too. If you skip this step, a setup wizard will ask for the key.
cp .env.template .env nano .env # set one of: OPENAI_API_KEY=sk-... OPEN_ROUTER_API_KEY=sk-...
Put your files in ./data/. The agent sees them at /app/data.
Agentic-J/ ├── data/ │ └── my_image.tif ├── .env └── docker-compose.yml
When it's ready, open localhost:6080/vnc.html in your browser.
docker compose up
Edit .env again (nano .env), then restart so the container reads it:
docker compose down docker compose up
If you entered a key in the setup wizard, it is saved inside the container and takes precedence over .env.
Remove it once before restarting:
docker compose exec imagentj rm /home/imagentj/api_keys.env
The GPU build accelerates Cellpose, StarDist, micro-sam and fine-tuning. It needs driver 560+, nvidia-container-toolkit and CDI enabled in Docker. GPU guide →
docker compose -f docker-compose.yml \ -f docker-compose.gpu.yml up -d
The container sees one folder of your computer. Put your images there, and everything the agent writes appears there straight away.
Let it run the analysis, fine-tune a model with you, guide you click by click, or teach you.
Describe what you want to measure. The agent picks a suitable plugin, such as TrackMate, StarDist or MorphoLibJ, writes a Groovy script against its real API, runs it in Fiji and fixes it when the ImageJ log shows an error. You keep the script and can re-run it outside the agent.
Pick a few tiles in napari and correct the current model's mistakes instead of drawing from scratch. The agent fine-tunes micro-sam or Cellpose on your corrections, scores the new model against the stock one, and only then runs it on the whole dataset.
Prefer to stay in control? Say "do this through the menus" and the agent walks you through Fiji step by step instead of writing a script. It can also read an open plugin dialog and explain each parameter.
In education mode Agentic-J works as a tutor. It teaches Pete Bankhead's Introduction to Bioimage Analysis (CC-BY 4.0) one chapter at a time, with ImageJ and Python practicals and live demos on the book's sample images.
Every analysis becomes a self-contained project folder with the raw data, scripts, results, figures and logs. A state ledger records each step as it happens, and at the end the agent writes a workflow report from it.
Created by the agent when an analysis starts.
├── raw_images/ copy of your source images ├── processed_images/ │ ├── channels/ split or pre-processed TIFFs │ └── montages/ overview images ├── scripts/ │ ├── imagej/ generated Groovy scripts │ └── python/ stats & plotting scripts ├── data/ measurement CSVs, tables ├── figures/ plots, publication figures ├── logs/ execution logs ├── state_ledger.json ├── Workflow_Documentation.md └── QA_Checklist_Report.md if QA is enabled
Excerpt from a real project: BoneJ trabecular morphometry of micro-CT scans. Long values are shortened.
{
"project_root": "/app/data/projects/earthworm_mouse_trabecular_architecture",
"scientific_goal": "Quantify L3 trabecular bone volume fraction, ...",
"operating_mode": "script",
"key_decisions": [ ... ],
"image_metadata": {
"bit_depth": 8, ..., "n_images": 67, ..., "modality": "microCT", ...
},
...
"recommended_plugin": "BoneJ",
"completed_steps": [
...
{
"phase": "4b",
"step": "bonej_batch_measurement",
"status": "completed",
"details": "Approved BoneJ pipeline processed all 66 ...",
"timestamp": "2026-10-05T14:55:00Z",
"script_path": ".../scripts/imagej/phase4b_batch_bonej_all_specimens.groovy",
"output_paths": [ ".../data/specimens_bonej_raw.csv", ... ],
"parameters": { ..., "processed_specimens": 66, "errors": 0, ... }
},
...
],
"current_phase": "7"
}
The ledger lives on disk and its list of steps is append-only, so it survives context compaction in long sessions.
Seven short guides, each a single page.
What you need, the .env file, starting and stopping, using a graphics card.
The chat window, the three modes, the helpers behind the scenes, plugins, settings.
Read → 03What to tell the assistant, with examples and tips.
Read → 04Where results are saved, chat history, cost reports, reporting a problem.
Read → 05What is sent to the AI provider and what stays on your computer.
Read → 06napari in the chat, micro-sam, training a model on your own corrections.
Read → 07Learning bioimage analysis with the built-in course.
Read → GPUCUDA builds, driver requirements, CDI, and verifying the GPU is used.
Read →Put a TIFF in ./data/, describe what you want, and the agent takes it from there to masks, tables and plots. Found a bug or have an idea? Let us know.
Agentic-J: An AI Agent for Biological Microscopy Image Analysis
arXiv:2606.02080 [cs.MA] · 2026 · †equal contribution · *corresponding
@article{johanns2026agenticj,
title = {Agentic-J: An AI Agent for Biological
Microscopy Image Analysis},
author = {Johanns, Lukas and Moor, Marilin and
Panzeri, Davide and Zhou, Yu and
Chen, Xinyi and Pauly, Nora F. K. and
Pan, Zixuan and Gunzer, Matthias and
M{\"u}ller, Andreas and Shi, Yiyu and
Peterson, Hedi and Chen, Jianxu},
journal = {arXiv preprint arXiv:2606.02080},
year = {2026}
}