arXiv:2610.31080cs.LGOct 2026

Manuscript Offprint

arXiv:2610.31080

nnInteractive Agent: General-Purpose AI Agents as 3D Image Annotators

Fabian Isensee, Constantin Ulrich Harsy, Maximilian Rokuss, Benjamin Hamm, Philipp Vollmuth, Klaus H. Maier-Hein

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

ABSTRACT

Interactive 3D segmentation models such as nnInteractive turn a few spatial prompts (points, scribbles, boxes) into accurate volumetric masks, but a human still does the annotation work: finding each structure, placing prompts, checking the result and correcting it. General-purpose AI agents can now interpret images, call tools and write code. We show that such agents can take over this work without additional training: the user makes a request in plain language, and the agent works out what has to be segmented, locates the targets, prompts nnInteractive, inspects the 3D result, corrects it and responds to feedback. Asked for “the muscles used for chewing”, an agent identifies and segments the masseters and pterygoids; asked to count liver lesions, it writes its own code to find candidates and splits a merged lesion on request. Our open-source nninteractive-agent provides nnInteractive as tools over the Model Context Protocol (MCP), together with a skill that encodes how experienced users prompt it. On a benchmark spanning CT, MRI, PET and micro-CT of humans, a mouse and an ant (14 images; 51 targets from organs and tumours to muscles, foot bones, vessel trees and an insect brain), Claude Code and Codex reach a mean Dice of 0.81 and 0.84 from the request alone; when told where each target is, both reach 0.85 and prompt nearly as effectively as an oracle that places prompts using the reference segmentation. A text-prompted 3D model (VoxTell) is more accurate on most standard radiological targets but less robust: it returns an empty mask for one of them and fails on the leg muscles, the foot bones, the mouse and the ant, where the agents remain accurate. Code: https://github.com/MIC-DKFZ/nninteractive-agent

1 Introduction

Segmentation turns images into quantitative measurements such as organ volumes, tumour burden or cell counts. Dedicated models segment the structures they were trained on; everything else is delineated by people, increasingly with the help of promptable models. nnInteractive [4], for example, predicts a full 3D mask from points, scribbles, boxes or lassos placed in single slices and was trained on more than 120 volumetric datasets spanning CT, MRI, PET and 3D microscopy. Such a model makes every prompt count, but the annotation process itself remains with a human: deciding what the target is and where it lies, placing prompts, judging the 3D result, correcting it, and revising it when someone asks for changes.

TECHNICAL REPORT

"Segment the muscles used for chewing."

Figure

"Now segment the muscles used for turning the head."

"Segment every rib as a separate object and name them by side and number."

"snorkel and flashlight"

Masseters and medial and lateral pterygoids on both sides. It left out the temporalis, which “lies almost entirely above the scanned region”.

Both sternocleidomastoids. It named the deeper rotators it left out, because their borders are too faint on this scan, and offered to try.

24 named ribs. It found and fixed its own mistakes: collarbones taken for rib 1, a missed rib, ribs stopping short of the spine.

It first segmented the battery as the flashlight and said it was unsure. Told “the flashlight is somewhere else, missing its battery”, it found the empty flashlight.

Figure 1: From a request to 3D masks. Four requests to Claude Code (Opus 5.5 medium effort) operating nnInteractive in the web demo: the request, the result in 3D and in one slice (zoomed in for the suitcase), and what the agent did. The second request followed the first in the same conversation. Images: TotalSegmentator MRI [1], RibFrac [2, 3], a CT scan of a packed suitcase (image provided by Smiths Detection).

Text-prompted medical segmentation models take the human out of this loop [5, 6, 7, 8]. They map the name or description of a structure directly to a mask and can be very accurate, but their accuracy depends on how close a request is to their training data.

General-purpose AI agents such as Claude Code and Codex combine a multimodal large language model with tool use and code execution. They interpret images, have broad anatomical knowledge, follow multi-step instructions, write code and can check their own work. They cannot, however, produce a voxel-accurate 3D mask by themselves. A promptable model like nnInteractive can, but it cannot decide what to segment. The two are complementary.

Combining them, we let an agent take over the annotation process. The user makes a request in plain language; the agent works out what has to be segmented, finds the targets, prompts nnInteractive, inspects the 3D result, corrects it and responds to feedback, while nnInteractive turns each prompt into a 3D mask (Fig. 1). Asked for the muscles used for chewing, the agent works out which muscles these are, segments them and explains why it left one out; asked to count liver lesions, it writes code to find candidates, flags a lesion that may be two, and splits it when the user asks (Fig. 5). No component is trained for this purpose. nninteractive-agent provides nnInteractive as a set of tools over the Model Context Protocol (MCP) [9], together with a skill, a document that describes how experienced users prompt nnInteractive.

We evaluate nninteractive-agent with Claude Code and Codex on a benchmark of 14 images and compare the agents with simulated prompts and with a text-prompted model. Agents that call segmentation models exist, including training-free agents for 3D images (Section 2). What we add is an extension that lets an unmodified general-purpose agent carry out the interactive 3D annotation process itself (finding, prompting, checking, correcting) across modalities, species and structures, and an evaluation of its segmentation accuracy. The tool, the skill, a web demo and the benchmark are open source.

TECHNICAL REPORT

References (44)