A Hierarchical Multi-Agent System for Autonomous Discovery in Geoscientific Data Archives
Organizations: Alfred Wegener Institute for Polar and Marine Research, Bremerhaven, Germany
Abstract
The rapid accumulation of Earth science data has created a significant scalability challenge; while repositories like PANGAEA host vast collections of datasets, citation metrics indicate that a substantial portion remains underutilized, limiting data reusability. Here we present PANGAEA-GPT, a hierarchical multi-agent framework designed for autonomous data discovery and analysis. Unlike standard Large Language Model (LLM) wrappers, our architecture implements a centralized Supervisor-Worker topology with strict data-type-aware routing, sandboxed deterministic code execution, and self-correction via execution feedback, enabling agents to diagnose and resolve runtime errors. Through use-case scenarios spanning physical oceanography and ecology, we demonstrate the system's capacity to execute complex, multi-step workflows with minimal human intervention. This framework provides a methodology for querying and analyzing heterogeneous repository data through coordinated agent workflows.
Figures & tables
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| # | Actor | Action | Content / Reasoning |
|---|---|---|---|
| 1 | User | Prompt | “Retrieve Copernicus Marine surface currents ( uo , vo ) for [78 ∘ S–60 ∘ S, 57 ∘ W–12 ∘ E]. Calculate mean current speed averaged over austral summers 2018–2019. Create a regional map with current speed heatmap, streamlines, and sampling stations sized by microplastic abundance.” |
| 2 | Supervisor | Planning | Decomposes into two sub-tasks: (i) data retrieval and processing Oceanographer Agent; (ii) cartographic visualization Visualization Agent. |
| 3 | Oceanographer | Temporal inference | Autonomously parses the Date/Time column of the observational dataset and determines the sampling campaigns span January–February 2018 and January–February 2019. Constructs two separate API requests with matching temporal bounds. |
| 4 | Oceanographer | API call ( fail ) | First Copernicus Marine request specifies minimum_depth=0.0 . Service rejects the request: depth axis begins at 0.494 m. |
| 5 | Oceanographer | Self-correction | Parses the error message, extracts the minimum valid depth coordinate (0.494 m), and resubmits. Both requests (2018, 2019) succeed. Downloads daily , fields for the specified domain. |
| 6 | Oceanographer | Code execution | Computes temporal mean of daily velocity fields across both summers using xarray . Derives current speed as . Saves result as NetCDF ( mean_surface_currents_JF_2018_2019_Weddell.nc ). |
| Depth bin | Bias ( ∘ C) | RMSE ( ∘ C) | ||
|---|---|---|---|---|
| 50–100 m | 7,738 | 0.97 | ||
| 100–200 m | 47,119 | 1.06 | ||
| 200–500 m | 80,821 | 1.12 |
| # | Actor | Action | Content / Reasoning |
|---|---|---|---|
| 1 | User | Prompt | “Generate a plot visualizing the distribution of instrument depths across all loaded mooring datasets.” |
| 2 | Supervisor | Planning | Decomposes into two sub-tasks: (i) multi-dataset ingestion and depth extraction Visualization Agent (with inline data wrangling); (ii) exploratory depth-distribution figure Visualization Agent. |
| 3 | Visualization | Data profiling | Loads all 10 CSV files and inspects column names. Identifies Depth water as the depth column across all datasets. Notes that three datasets (FEVI21, FEVI22, FEVI23) contain an additional Sal column (14 columns vs. 13). Records total row counts: 340,022 records across 10 moorings. |
| 4 | Visualization | Data engineering | Computes per-instrument unique depths to avoid time-repeated values: groups by Gear ID within each event and takes the median of Depth water . Produces a consolidated table of unique instrument depths across 10 moorings, spanning 81–2,737 m. |
| 5 | Visualization | Code execution | Generates a two-panel figure: (top) overall histogram with KDE of the 35 unique instrument depths; (bottom) violin + box + strip plot faceted by mooring event, ordered by median depth. Annotates per-mooring instrument counts ( – ). |
| 6 | Visualization | Reflection loop | Reflexive quality control scores the initial figure at 7/10 : “Axis labels slightly small; histogram x-axis extends into negative values; font sizes could be increased for readability.” |
| # | Actor | Action | Content / Reasoning |
|---|---|---|---|
| 1 | User | Prompt | “Validate ERA5 reanalysis against the ship’s measurements while minimizing data download size. Calculate the exact spatial bounding box and time range from the ship’s data. Retrieve ERA5 2m_temperature only for that specific region. Interpolate the grid to the ship’s hourly positions, convert to Celsius. Create a time-series plot comparing in-situ air temperature (column TTT ) in blue against ERA5 temperature in red.” |
| 2 | Supervisor | Planning | Decomposes into three sub-tasks: (i) spatiotemporal bounds extraction and hourly resampling DataFrame Agent; (ii) ERA5 cloud-native retrieval and Lagrangian interpolation Oceanographer Agent; (iii) time-series visualization Visualization Agent. |
| 3 | DataFrame | Temporal inference | Parses the Date/Time column and computes spatiotemporal bounds: bounding box [18.99 ∘ E–138.14 ∘ E, 69.68 ∘ N–86.60 ∘ N], time range 2019-09-20 to 2019-12-13. Resamples to hourly resolution (last observation per hour), producing hourly positions. Saves hourly_ship_table.csv . |
| 4 | Oceanographer | API call | Submits ERA5 cloud-native retrieval request for 2m_temperature with bounding box [18.99 ∘ E–138.14 ∘ E, 69.68 ∘ N–86.60 ∘ N] and temporal range matching the cruise. Receives Zarr store: 2,013 time steps 68 latitude 477 longitude ( 261 MB). |
| 5 | Oceanographer | Code execution | Interpolates ERA5 2m_temperature field to hourly ship positions using trilinear interpolation ( xarray.interp , method= linear ). Converts from Kelvin to Celsius. |
| 6 | Oceanographer | Quality check (fail) | Detects 83 of 2,013 interpolated values returned NaN . Diagnoses the cause: ship positions near the bounding-box edge fall outside the ERA5 grid domain (ERA5 grid starts at 69.75 ∘ N / 19.00 ∘ E, but ship positions extend to 69.68 ∘ N / 18.99 ∘ E). |
| # | Actor | Action | Content / Reasoning |
|---|---|---|---|
| Phase 1: Geographical transect division | |||
| 1 | User | Prompt | “Divide the sampling stations into two geographical transects based on longitude to separate the Norwegian Sea leg from the Irminger Sea leg. Create two new dataframes: ‘Eastern Transect’ and ‘Western Transect’ for stations, use longitude as a border. Visualize these transects at the end.” |
| 2 | DataFrame | Data engineering | Identifies Longitude and Event columns. Splits at E: Eastern Transect (60 rows, 18 unique stations) and Western Transect (34 rows, 11 unique stations). |
| 3 | DataFrame | Code execution | Generates lon/lat scatter plot with cruise track, dashed border at , and “Irminger Sea leg” / “Norwegian Sea leg” annotations. Saves transects_map_lonlat_border_-20.png . |
| 4 | Visualization | Code execution | Parses Date/Time , splits transects, sorts by time. Regenerates the transect map with connected cruise-track lines, styled scatter points, and text annotations. |
| 5 | Visualization | Reflection loop | Reflexive quality control scores the transect map at 8/10 : “Axis labels clear, colors distinguishable, no overlapping elements.” Accepted without further correction. |
| Scenario | Errors | Error Types | VQC Cycles | Recovery |
|---|---|---|---|---|
| 1: Weddell Sea | 1 | API depth parameter validation | 1 | 1/1 |
| 2: HAUSGARTEN | 1 | Datetime type mismatch | 2 | 1/1 |
| 3: MOSAiC/ERA5 | 2 | Bounding-box edge effect, bin-label mismatch | 2 | 2/2 |
| 4: Jellyfish T-S | 1 | Divide-by-zero in | 6 | 1/1 |
| Total | 5 | 11 | 5/5 (100%) |
| Query intent | Baseline (Elasticsearch) | Simple LLM | Agentic Search (ours) |
|---|---|---|---|
| Q065: Weddell Sea, Winter 2013 (temporal) | Failure: Returns IceBird Winter 2019/2023 altimetry. Wrong year, wrong parameter. | Partial: Returns CTD profiles but from Summer cruises (ANT-XXIX/2, PS82). | Success: Returns ANT-XXIX/6 (AWECS) , the specific winter cruise (Jun–Aug 2013). |
| Q059: Satellite altimetry (source) | Failure: Returns lake water quality and biological transects. | Validation trap: Returns in-situ mooring data “used to validate” satellites. | Success: Returns Level-3/4 gridded SSHA from CryoSat-2, Envisat, TOPEX/Poseidon. |
| Q080: Polar glacier GPR (spatial) | Geo-drift: Returns GPR from Alpine glaciers (Austria/Italy). Matches “Glacier+Radar” but ignores “Polar”. | Mixed: Returns Antarctic data but includes Alpine mass balance stakes. | Success: Strictly polar. All 30 results from Antarctica or Greenland. Expands to RES (Radio-Echo Sounding). |
| Q096: Coastal erosion rates (intent) | Failure: Returns vegetation maps and oceanographic bottle data. | Intent miss: Returns raw aerial imagery subsets (18/30 results from one campaign). | Success: Returns derived shoreline retreat rates (Yukon, Laptev, Baltic, Portugal). |