PegasusAI Studio: Legible Cyberinfrastructure and Accountable AI Agents for Scientific Workflows
Organizations: University of North Carolina at Chapel Hill, Chapel Hill, NC, USA · University of Southern California, Los Angeles, CA, USA · University of Massachusetts Amherst, Amherst, MA, USA · University of Tennessee, Knoxville, Knoxville, TN, USA
Abstract
AI coding agents can now construct scientific workflows, but operating them on shared cyberinfrastructure (CI) raises problems that code generation does not solve. Agents need current knowledge of the workflow system and its execution sites and access to the runtime state of distributed executions, while facilities need to attribute every agent action to a user and bound it by that user's privileges. We present PegasusAI Studio, an AI-assisted science gateway built on the Pegasus and HTCondor stack. Studio makes CI legible to agents by projecting one facility-curated knowledge base into the native configuration of several coding agents, by introspecting workflow interfaces and execution sites, and by grounding diagnosis in workflow and scheduler telemetry. Agent actions operate within a trust envelope that combines federated authentication, per-user execution environments and scheduler credentials, provider-neutral model access, observability, and approval controls for state-changing actions. The same application runs as a JupyterHub-based gateway on a research cloud and as an Open OnDemand application on HPC systems. We evaluate Studio through case studies of legacy CASA weather workflow modernization, a gravitational-wave reanalysis, an EEG analysis built with an open-weight model, and an Event Horizon Telescope (EHT) M87 image reconstruction that recovered from two failed runs to a zero-failure execution. The evaluation establishes that these mechanisms operate as designed.
Figures & tables
| Direction | Mechanism in Studio |
|---|---|
| Agent access to CI | Chat on a coding-agent engine with specialist agents and the Pegasus tools reachable over MCP, agent-enabled terminals, and skills embedded in the workflow IDE. A JupyterLab sidebar chat aware of the notebook the user has open. |
| CI state to agent | The knowledge projection layer (Section 5 ). Telemetry grounding (Section 6 ). Argparse introspection. Per-workflow placement on the shared pool or the user’s own annex, and an administrator’s site catalog under Open OnDemand (OOD) [ 21 ] . MCP documentation servers. |
| CI governance of agent | Federated identity, per-user tokens, approval posture, a provider-neutral model gateway with a prompt guard, and per-user usage telemetry with consent-gated content capture (Section 7 ). |
| Record | Condition | Kept where |
|---|---|---|
| Usage metrics: tokens by type, tool-call durations, sessions and messages, model and provider, retries, per user | always | platform metrics store and the facility dashboard |
| Failure episodes: a run failed, whether the assistant was asked, whether a re-run followed and how it ended, and the user’s answer to the help card (fixed it, partly, did not help, did not try it) | always, one question per episode | the user’s own database, read by administrators from the shared home |
| Reply ratings (thumbs up or down) and give-up tags, and the optional profile answers from the tour | when the user clicks or answers | the user’s own database, rating counts also as platform metrics |
| Prompt and response text, tool-call arguments (including shell commands) | only with opt-in, revocable in settings | in-cluster trace store, the collector strips content otherwise |
Scientific Workflow Automation
Scientific workflow automation uses software, AI agents, and laboratory systems to plan, execute, validate, and reproduce research tasks.
See all 174 papers