Abstract
Introduction
Computational pathology workflows span slide ingestion, pre-processing, quality control, model training/inference, post-processing, and reporting. However, constructing such pipelines demands programming expertise and is prone to configuration errors. We present Tissue Image Analytics (TIA) Agent (TIAgent), a framework that translates natural-language instructions into structured, executable, and shareable computational pathology workflows, enabling complex analysis tasks without code.
Materials and Methods
TIAgent connects a large language model (LLM) to TIAToolbox through a LangGraph-based orchestrator, enabling conversational pipeline building within the TIA-Visualizer. User instructions are converted into a constrained, machine-checkable plan with an intermediate representation restricted to validated TIAToolbox components. After user review, the plan is deterministically compiled into a typed directed acyclic graph (DAG) and exported as a ComfyUI workflow for execution. Nodes represent modular operations (ingestion, tiling, embedding extraction, model inference, aggregation, reporting) with typed interfaces enforcing compatibility and resolution consistency.
Results
We evaluated TIAgent on whole-slide loading/tiling, dataset ingestion, and pre-trained model execution within TIA-Visualizer. Workflow quality was assessed using Success Rate, Instruction Alignment, and Format Validation (FV). Larger LLMs achieved higher structural validity and lower repair rates than smaller models (FV: Qwen2.5:7b-instruct 12.25% vs GPT-OSS:20b 94.23%).
Conclusion
TIAgent is the first framework providing a natural-language interface for constructing validated computational pathology pipelines. Conversational specification with constrained intermediate representation, deterministic graph compilation, and type-safe validation prevents free-form code hallucination while preserving transparency and auditability. Integration with TIAToolbox and ComfyUI enables reproducible, shareable, human-validated workflows for whole-slide image and machine learning tasks.
Demonstrations
Stromal TIL density computation in a breast cancer WSI
Survival Prediction in TCGA breast cancer cohort

Method
Evaluation





