Featured Application
Cropbox models can be exposed as discoverable HTTP APIs without rewriting their scientific declarations. The resulting service contract supports generated web dashboards and connections to large language models.
Abstract
Crop models are increasingly incorporated into web applications, but their user and programming interfaces are often developed separately from the model implementation. We extended Cropbox, a crop modeling framework written in Julia, to derive both interfaces from model declarations written in its domain-specific language (DSL). The describe() function extracts model structure and declared metadata. The serve() function uses this description to expose simulation and visualization operations through HTTP routes. The dashboard() function constructs a web user interface from the same contract. The implementation was examined with chilling–forcing phenology, coupled gas exchange, and a whole plant crop model. A Model Context Protocol (MCP) adapter connected the same service to a local large language model (LLM). The applications reproduced direct simulation results through the service and supported interactive model exploration. These results demonstrate a shared basis for building user and programming interfaces from model declarations.