Skip to main content
Glama

Ventilatory Efficiency & VE/VCO2 Slope Cardiorespiratory Skill

License: MIT Python 3.10+ Zero Dependencies OpenClaw Ready MCP Protocol

A sovereign personal agent capability for computational CPET analysis, calculating the $\dot{V}_E / \dot{V}CO_2$ ventilatory equivalent slope, pulmonary dead space fraction, and V-slope anaerobic threshold.

Architecture

flowchart TD
    CPETData["CPET Timeseries: VE (L/min), VCO2 (L/min), VO2 (L/min)"] --> RegressionEngine["Linear Least-Squares Regression (VE vs VCO2)"]
    RegressionEngine --> SlopeMetrics["VE/VCO2 Slope, Intercept & R² Correlation"]
    CPETData --> VSlopeEngine["Beaver V-Slope Inflection Detection (Delta VCO2 / Delta VO2 > 1.0)"]
    VSlopeEngine --> Threshold["Ventilatory Anaerobic Threshold (VAT / VT1)"]
    SlopeMetrics & Threshold --> CREI["Cardiorespiratory Efficiency Index (0 - 100)"]
    CREI --> AgentPrescription["OpenClaw / Hermes Zone 2 & Threshold Pacing Directives"]

Related MCP server: Post-Exercise EPOC

Quickstart

from client import VentilatoryEfficiencyClient

client = VentilatoryEfficiencyClient()

# Incremental exercise gas exchange series
vco2 = [0.65, 0.95, 1.30, 1.70, 2.15, 2.60, 3.10]
ve = [18.2, 25.5, 34.0, 44.5, 56.0, 68.5, 82.0]

slope_res = client.calculate_ve_vco2_slope(ve, vco2)

print("VE/VCO2 Slope:", slope_res["ve_vco2_slope"])
print("Efficiency Index:", slope_res["cardiorespiratory_efficiency_index"], "/ 100")
print("Status:", slope_res["status"])

MCP Server Integration

Add to your claude_desktop_config.json or OpenClaw tool registry:

{
  "mcpServers": {
    "ventilatory-efficiency": {
      "command": "python",
      "args": ["/path/to/genpark-personal-agent-ventilatory-equivalent-ve-vco2-efficiency-skill/mcp_server.py"]
    }
  }
}

License

MIT License.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables deterministic modeling of excess post-exercise oxygen consumption, bi-exponential recovery kinetics, cumulative oxygen debt, and post-workout fuel partitioning to generate hydration and refueling guidance. Supports workout parameter inputs to produce recovery timelines, calorie expenditure, and 95% clearance horizons.
    7
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables deterministic modeling of excess post-exercise oxygen consumption, bi-exponential recovery kinetics, cumulative oxygen debt and calorie burn, and post-workout fuel partitioning to guide hydration and refueling directives.
    7
    MIT