openclaw/extensions/whoop/README.md
Jack Fiengo e3bb3790b7 feat(whoop): add Whoop fitness plugin for data access
- Introduced a new Whoop fitness plugin that allows querying of recovery scores, sleep analysis, cycle data, and workout tracking.
- Implemented OAuth 2.0 authentication flow for secure access to Whoop API.
- Added comprehensive documentation and example configurations for plugin setup.
- Included unit tests for API client methods to ensure reliability and correctness.
- Updated pnpm-lock.yaml to reflect new optional dependencies for the plugin.
2026-01-26 16:22:43 -05:00

66 lines
1.4 KiB
Markdown

# Whoop (plugin)
Adds an **optional** agent tool `get_whoop_data` for querying Whoop fitness data including recovery scores, sleep analysis, strain/cycle tracking, and workout metrics.
## Enable
1) Configure the plugin with your Whoop OAuth credentials:
```json
{
"plugins": {
"entries": {
"whoop": {
"enabled": true,
"config": {
"clientId": "your-client-id",
"clientSecret": "your-client-secret"
}
}
}
}
}
```
2) Register redirect URI at [developer.whoop.com](https://developer.whoop.com/):
```
http://localhost:8086/oauth2callback
```
3) Complete OAuth flow to authenticate with Whoop.
4) Allowlist the tool (it is registered with `optional: true`):
```json
{
"agents": {
"list": [
{
"id": "main",
"tools": { "allow": ["get_whoop_data"] }
}
]
}
}
```
## Data Types
The tool provides access to:
- **Recovery**: HRV, resting heart rate, SpO2, skin temperature
- **Sleep**: Sleep stages, performance, efficiency, respiratory rate
- **Cycles**: Daily strain, average/max heart rate
- **Workouts**: Activity strain, heart rate zones, distance, calories
## Query Types
- `latest` - Get most recent single record
- `recent` - Get last N records (default: 7, max: 25)
- `by_id` - Get specific record by ID
## Notes
- Uses Whoop API v2 endpoints
- Automatic token refresh when expired
- Tokens stored securely via Clawdbot's credential system