At the heart of Salesforce’s massive global infrastructure lies a sophisticated internal forecasting platform, a digital engine that performs a vital nightly ritual: the generation of nearly four million individual forecasts. These data-driven predictions are the bedrock of the company’s operational efficiency, dictating everything from how much cloud capacity is reserved to determining which workloads should be migrated between regions and ensuring that infrastructure budgets remain strictly within their bounds. For years, the platform’s strength was its simplicity. By defining a forecast through a handful of basic parameters—the data source, the specific model employed, and the required accuracy threshold—Salesforce successfully scaled from a mere five use cases to more than a hundred.
However, as the scale of the operation ballooned, a hidden bottleneck emerged. While launching a new forecast remained a straightforward task, maintaining its accuracy proved to be a persistent, labor-intensive challenge. In a dynamic cloud environment, the metrics being tracked are in a constant state of flux, leading to the phenomenon of "model drift," where the predictive accuracy of an algorithm degrades over time as the underlying reality changes. Traditionally, this required a data scientist to manually intervene, investigate why the model had drifted, and then laboriously test and implement a fix. This reactive cycle threatened to become unsustainable, potentially requiring an army of data scientists just to keep the lights on for existing models.
To solve this, Salesforce engineers developed an internal, self-evolving data science agent. This autonomous system is designed to identify forecast drift, test potential model improvements against historical data, and generate a formal pull request—a proposed code change that a human data scientist must review and approve. The term "self-evolving" is central to the agent’s design; it continuously incorporates lessons from its own past investigations and learns from the feedback provided by human reviewers. Crucially, the agent is not a fully autonomous deployment system; it does not push models directly to production. Instead, it acts as a force multiplier for the data science team, handling the heavy lifting of investigation and remediation while leaving the final judgment to human experts.

The impact of this agentic approach has been substantial. Since its implementation, the system has proposed more than 100 model fixes, ranging from replacing legacy models like Prophet with more advanced alternatives like Moirai, to fine-tuning sensitivity parameters and adjusting the length of training windows. The results have been both quantifiable and impressive. While performance improvements vary depending on the nature of the forecast, the team has observed a 14% reduction in sMAPE (symmetric mean absolute percentage error) during backtests, with specific high-impact forecasts showing even more significant gains. Perhaps most importantly, the operational efficiency has skyrocketed: an investigation that once required hours of manual labor now takes an average of 27 minutes. This transition from reactive, manual debugging to autonomous, agentic tuning has effectively allowed the platform to self-evolve, keeping pace with an ever-changing technical landscape.
From a Forecast Miss to a Tested Change
The practical utility of the agent is best illustrated by a real-world scenario involving storage capacity planning. For a specific AWS availability zone, Salesforce teams rely on forecasts to reserve storage capacity months in advance. Throughout the first half of 2026, the data indicated a steady, predictable growth trend. However, in June, that trend abruptly flattened as new workloads were diverted to different regions. The existing model, lacking the context of this shift, continued to project growth based on the old trend. Had the system remained unchecked, it would have resulted in the reservation—and unnecessary payment—for approximately 100 terabytes of storage.
In this instance, the agent identified the discrepancy, analyzed the underlying data, and proposed a switch to Moirai, Salesforce’s advanced time-series forecasting model. By adopting the new model, the system successfully adapted to the change in growth patterns, effectively preventing the waste of significant infrastructure resources.

The agent follows a rigorous, six-step internal process to move from a "forecast miss" to a verified solution. It begins by localizing the problem, identifying exactly which forecasts are failing to meet their targets. Once localized, it initiates a diagnostic phase, examining shifts in the data and cross-referencing information—including searching through internal communications like Slack—to gain context on why the model might be underperforming. The agent then moves to remediation, attempting to solve the issue by testing various models and settings, including the integration of foundation models like Moirai 2.0.
After selecting potential solutions, the agent re-evaluates them, testing these candidate forecasts against past data to ensure they would have performed better than the previous iteration. If a candidate shows clear superiority, the agent reaches the decision phase, opening a pull request for a data scientist to review the findings and approve the change. Finally, the agent enters an evolution phase, updating its own internal investigation "playbook" with the knowledge gained from the successful fix, ensuring that similar future issues can be resolved even more efficiently.
This process is governed by strict guardrails. The agent is strictly prohibited from altering production forecasts without human oversight. It only triggers a pull request if the proposed fix outperforms the current model by at least 5% on unseen data. Furthermore, every investigation is constrained by a fixed testing budget. If the evidence remains ambiguous or the agent cannot find a statistically significant improvement, it gracefully hands the investigation off to a human data scientist, ensuring that the system never proceeds based on inconclusive results.

Architecture: One Agent, Many Workers
The agent does not operate in a vacuum; rather, it functions as a high-level orchestration layer sitting atop Salesforce’s existing machine learning stack. It leverages the company’s established tools, including Kubernetes and Apache Spark, to handle the heavy computational lifting. MLflow is used to track, rank, and score the results of the various experiments. The agent acts as the conversational interface between this complex machinery and the data scientists, who can now interact with the system through natural language queries in Slack.
When a data scientist prompts the system, the agent coordinates the investigation, determining which models to test and which compute resources to utilize. A single investigation might trigger dozens of individual backtests—a workload that would be far too computationally expensive for the agent to manage internally. Instead, it intelligently distributes these tasks. Smaller, lighter jobs are dispatched to Kubernetes pods, while larger, more complex configurations that require testing across multiple data series are sent to Spark clusters. Once the computations are complete, MLflow ranks the candidate models, and the agent selects the top performer, automatically packaging the results into a pull request for human verification.
The Future of Autonomous Infrastructure Management
Before the deployment of this self-evolving agent, the relationship between data scientists and AI was largely one-sided, with AI serving only as a supporting tool. The current paradigm has fundamentally inverted that dynamic. The autonomous agent now performs the bulk of the investigative and diagnostic data science work, while the human experts have transitioned into a supervisory and strategic role. By focusing on reviewing the agent’s proposed fixes and providing high-level feedback, data scientists have been liberated from the grind of maintenance, allowing them to dedicate their time to building new, more complex forecasting capabilities.

Looking ahead, the development team is focused on expanding the agent’s capabilities far beyond simple model tuning. The goal is to move toward a future where the forecasting platform does not merely recover from errors after they occur, but actively anticipates potential drifts and proactively adjusts before a miss ever manifests. By embedding this layer of intelligence into the lifecycle of every forecast, Salesforce is creating a system that not only manages infrastructure at an unprecedented scale but also learns from every anomaly it encounters. This shift represents a significant move toward a truly autonomous, self-healing infrastructure, where the complexity of managing global operations is mitigated by systems that grow more capable with every passing day.
