Toward a Locally Deployable Agentic Co-Scientist: Small-Model Planning for Early-Stage Drug Discovery
Authors: Tian Liang, Jiayu Chang, Alejandro F. Frangi, Mobarak I. Hoque, Richard A. Bryce
Organizations: Division of Pharmacy and Optometry, University of Manchester, UK · Department of Computer Science, University of Manchester, UK · Centre for Computational Imaging and Modelling in Medicine (CIMIM), University of Manchester, UK · Department of Electrical Engineering, Stanford University, USA · Division of Informatics, Imaging and Data Science, University of Manchester, UK · Christabel Pankhurst Institute, University of Manchester, UK · NIHR Manchester Biomedical Research Centre, Manchester Academic Health Sciences Centre, Manchester, UK
Early-stage computational drug discovery requires coordinating heterogeneous scientific tools across multi-step workflows. We present a lightweight, tool-augmented framework in which a locally deployable compact language model plans calls to 18 modular tools. A Unified Molecular Schema maintains shared molecular records, while a plug-in interface supports tool replacement and extension. We construct 1,263 manually refined query-plan pairs through workflow-graph path coverage and apply LoRA fine-tuning to three compact model families. Under the query-level split, all fine-tuned models generate fully parseable and schema-compliant plans on 47 held-out cross-group queries. Llama 3.2-3B achieves a tool-selection F1 of 0.998, sequence exact match of 0.979, and argument F1 of 0.960. Under the stricter workflow-grouped split, which excludes identical ordered tool sequences across partitions, sequence exact match reaches 0.452 to 0.548, highlighting the remaining difficulty for compact models in generating complete workflow paths unseen during training. These results demonstrate the feasibility of compact, locally deployable planning while identifying compositional generalization as an important direction for further improvement.
Figures & tables
Figure 1: (a) A user query is translated by the fine-tuned LLM Planner into an execution plan, which is executed through the toolset. Tools read from and write to authorized blocks of the Unified Molecular Schema (UMS), which maintains shared state of each molecule. The Evaluator inspects the resulting UMS records and either returns filtered results to the user or provides feedback for replanning to the Planner until completion or the retry limit is reached. (b) The current toolset contains 18 tools organized into four functional groups: Molecular Design and Generation, Molecular Developability, Target Engagement, and Knowledge Extraction, together with a cross-group Multi-Objective Ranker. (c) An end-to-end example. Details of this example are shown in the Appendix D.2 .
Figure 2: (a) Tools interact with UMS blocks through read (dashed arrows) and write (solid arrows) operations. Each tool can access only its authorized blocks, reducing the risk of unintended data exposure and contamination of molecular records. (b) Three path-coverage workflow examples are illustrated from left to right: a complete workflow spanning molecular generation to ranking and selection of top candidates; a workflow that selects candidates using only a subset of functional layers; and a task-specific workflow that neither begins with molecular generation nor ends with ranking, and may involve more complex sequences within individuals. Colored nodes indicate selected tools, gray nodes indicate unused tools. The functional layers and their color coding are consistent with Fig. 1 .
Model
Setting
Parse
Schema
Tool F1
Seq. EM
Seq. LCS
Arg. F1
Llama 3.2-3B
Zero-shot
0.553
0.553
0.786
0.000
0.709
0.658
Fine-tuned
1.000
1.000
0.998
0.979
0.996
0.960
Qwen3-4B
Zero-shot
0.298
0.298
0.778
0.000
0.716
0.736
Fine-tuned
1.000
1.000
0.990
0.915
0.990
0.958
Gemma 3-4B
Zero-shot
0.638
0.574
0.871
0.148
0.800
0.576
Fine-tuned
1.000
1.000
0.994
0.936
0.990
0.949
Table 1: Planner performance on 47 held-out cross-group queries under the query-level split. Tool-selection, sequence, and argument-generation metrics are averaged over schema-valid outputs. See main text for description of metrics.
Rank
SMILES
Predicted pIC 50
QED
Overall score
1
Cc1nc2ccc(C(=O)N3CC@HC@HC3)cc2n1C
6.578
0.741
0.724
2
Cn1cc(CC(=O)N2CC@HC@HC2)cn1
6.381
0.744
0.684
3
CCc1cccc(C(=O)NC2(CNC(=O)Cn3cnnn3)CC2)n1
6.263
0.721
0.651
Table 2: Indicative output: top three of twenty candidate ligands generated and evaluated against the protein target, CDK2.
Preserves retrieved and extracted knowledge that is not restricted to a single molecular record.
Appendix
Table 3: Top-level organization of the Unified Molecular Schema (UMS). Representative fields are shown; implementation-specific logging and metadata fields are omitted for brevity.
UMS block
Representative contents
Role in the workflow
physchem
Molecular weight, logP, TPSA, hydrogen-bond donors and acceptors, rotatable bonds, QED, ring statistics, and rule violations
Describes physicochemical properties and common drug-likeness criteria used for filtering and multi-objective ranking.
affinity
Target identity, primary endpoint, IC 50 /K i /K d predictions, p-values, potency class, threshold outcome, and confidence
Represents predicted target engagement and provides a normalized potency value for filtering and ranking.
scaffold
Scaffold SMILES, scaffold type and key, annotation status, selection status, and removal reason
Supports scaffold annotation, diversity control, and per-scaffold candidate quotas.
pocket
Selected pocket, alternative pocket candidates, pocket scores, probabilities, and docking-box coordinates
Defines candidate binding sites and provides the search region required by structure-based docking tools.
docking
Docking method, receptor identifier, execution status, score type, top score, ranked poses, and pose files
Stores predicted binding poses and structure-based interaction scores for downstream assessment or simulation.
md
Simulation duration, mean and standard deviation of RMSD, binding-energy estimate, and stability decision
Summarizes molecular-dynamics evidence concerning pose stability and target engagement.
Appendix
Table 4: Tool-populated blocks within each molecular record in the UMS. The listed fields are representative rather than exhaustive.
Figure 3: (a) Examples of workflow-guided query–plan pairs in the Planner dataset, with the outer JSONL structure omitted for clarity. Blue text highlights keywords associated with tool calls, while red text indicates keywords corresponding to tool arguments. (b) presents the way to construct the system prompt, while the <TOOL REGISTRY AND RULES> is constructed dynamically according to the tool registry table.
Category
Num.
Key Content
Molecular Design and Generation
232
De novo molecular generation, scaffold-based diversification, candidate-pool construction, and control of sampling size and temperature.
Scientific-document parsing, extraction of molecular and target information, evidence-quality assessment, relation extraction, and synthesis of information across documents.
Cross-group Workflows
467
Workflows spanning multiple functional groups, including generation- or retrieval-initiated tasks, developability assessment, target-engagement evaluation, knowledge extraction, and candidate ranking. These workflows emphasize dependency-aware tool ordering and intermediate-result transfer through the UMS.
Total
1,263
Complete collection of query–plan pairs used for Planner training and evaluation.
Appendix
Table 7: Summary of the hierarchical coverage of the Planner training dataset.
Model
Set.
Validity
Tool selection
Sequence
Argument generation
Parse
Schema
P
R
F1
EM
LCS
P
R
F1
Llama
ZS
0.606
0.606
0.669
0.734
0.666
0.065
0.670
0.512
0.576
0.539
F
1.000
1.000
0.989
0.989
0.988
0.961
0.997
0.936
0.942
0.939
Qwen
ZS
0.591
0.591
0.666
0.718
0.662
0.080
0.651
0.515
0.568
0.537
F
1.000
1.000
0.989
0.984
0.986
0.937
0.991
0.934
0.941
0.937
Gemma
ZS
0.803
0.740
0.680
0.779
0.703
0.085
0.732
0.618
0.571
0.584
Appendix
Table 8: Planner performance on the full held-out test split ( N=127 ). Llama, Qwen, and Gemma denote Llama 3.2-3B, Qwen3-4B, and Gemma 3-4B, respectively. ZS and F denote zero-shot and fine-tuned settings. P and R denote precision and recall. Tool-selection, sequence, and argument-generation metrics are averaged over schema-valid outputs. Bold indicates the highest displayed value in each column; ties after rounding are both highlighted.
Model
Set.
Validity
Tool selection
Sequence
Argument generation
Parse
Schema
P
R
F1
EM
LCS
P
R
F1
Llama
ZS
0.556
0.556
0.790
0.793
0.749
0.129
0.763
0.626
0.672
0.645
F
1.000
1.000
0.955
0.879
0.909
0.548
0.865
0.901
0.907
0.904
Qwen
ZS
0.651
0.651
0.681
0.685
0.661
0.110
0.612
0.489
0.555
0.518
F
1.000
1.000
0.966
0.896
0.926
0.508
0.889
0.910
0.913
0.911
Gemma
ZS
0.810
0.738
0.758
0.788
0.761
0.032
0.707
0.596
0.480
0.528
Appendix
Table 9: Planner performance on the workflow-grouped test split ( N=126 ). Samples sharing the same ordered tool sequence are assigned to the same data partition. Llama, Qwen, and Gemma denote Llama-3.2-3B, Qwen3-4B, and Gemma-3-4B, respectively. ZS and F denote zero-shot and fine-tuned settings. P and R denote precision and recall. Parse and Schema are calculated over all 126 test samples; all remaining metrics are averaged only over schema-valid outputs. The corresponding valid sample counts are 70, 82, and 93 for the three zero-shot models and 126 for each fine-tuned model. Bold indicates the best fine-tuned result in each column.
Figure 4: Predicted binding poses of the two top-ranked candidates in the selected pocket of the c-Abl kinase protein. Panels (a) and (b) show the overall and close-up views of mol1 , respectively, with a Vina score of -9.8 kcal/mol; panels (c) and (d) present the corresponding views of mol2 , with a Vina score of -8.5 kcal/mol. Red boxes indicate the enlarged binding regions, surrounding residues are labeled.
Biomedical Informatics, The Ohio State University. · Computer Science and Engineering, The Ohio State University. · Medicinal Chemistry and Pharmacognosy, The Ohio State University. +1
Department of Computer Science and Engineering, UC San Diego, La Jolla, California, United States · Department of Computer Science, Stanford University, Stanford, California · Skaggs School of Pharmacy and Pharmaceutical Sciences, UC San Diego, La Jolla, California