Overview
AskWearables sits between wearable data and AI agents. An agent asks a question in plain language; the broker plans it into a typed query, checks it against the grant the user approved, computes the answer in code, and returns a small context packet at the lowest level of detail that answers it. Every release and every denial is written to the user's receipt log.
Availability. Hosting data for other people's users waits on legal advice about health-data rules. Until that is done, the hosted service at askwearables.app holds the owner's own data only. Developers can run the whole platform, including the developer API, on a self-hosted deployment.
Hosts and surfaces
| Host | What it serves |
|---|---|
https://api.askwearables.app/v1 | REST API. Its OpenAPI 3.1 document is at /v1/openapi.json and on this site. |
https://mcp.askwearables.app/mcp | Remote MCP server over Streamable HTTP, with three tools: ask, list_capabilities, get_packet. |
https://auth.askwearables.app | OAuth 2.1 authorization server (PKCE, dynamic client registration), owner sign-in with passkeys, and the consent screen. |
https://app.askwearables.app | Console: connect sources, manage grants, read receipts, create keys, pause, export, delete. |
https://askwearables.app | This site. |
MCP and REST are thin adapters over the same core, so a question asked either way is planned, gated, computed and receipted the same way.
Credentials
The REST API reads the bearer token's prefix to decide who is calling. Each kind reaches a fixed set of routes and nothing else.
| Credential | Who holds it | Routes |
|---|---|---|
| OAuth access token | An agent the user connected, such as Claude. Issued by auth, bound to one agent, one grant and one resource (the MCP server or the REST API). | MCP tools; POST /v1/ask, POST /v1/query, GET /v1/capabilities, GET /v1/packets/{id} |
aw_dev_… plus a signing secret | A developer's server, acting for its own end users. Every agent call is signed; see signing. | POST /v1/users, POST /v1/grants, POST /v1/ingest, GET /v1/usage, and the four agent routes above |
aw_own_… | The owner's own scripts. | POST /v1/query (level 3, still receipted), GET /v1/receipts, GET /v1/status, GET /v1/export, POST /v1/ingest, DELETE /v1/grants/{id} |
aw_sync_… | A device sync app. Bound to one source. | POST /v1/ingest only, and only into its own source |
Owner, sync and developer keys are created in the console and shown once; only a hash is stored. An agent token never unlocks the console, a console session never reaches a provider, and provider tokens never leave the vault Worker.
Concepts
- User
The person whose data it is. For developers, a user is registered by your own id (
external_id) and is isolated from your other users and from other developers' users. Each user's health data lives in its own encrypted store.- Agent
Anything that asks: an MCP client, or a developer's server identified by its developer key. Agents are treated as untrusted: the question is data, and the purpose cannot be restated in a request.
- Grant
What a user approved for one agent: one purpose, a list of metrics, a maximum level, how far back, how many answers a day, and an expiry of at most 90 days. Purposes are
scheduling,training_advice,sleep_coaching,general_wellnessandpersonal_research.- Level
How much detail a packet carries: 0 flag, 1 trend, 2 daily, 3 raw. The gate releases the lowest level that can answer, never more than the grant allows. See levels.
- QuerySpec
The typed query a question becomes: one or two metrics, one of eight operations, a date window and a few parameters. You can also send one directly to
POST /v1/query.- Packet
The one response contract: findings, data quality, caveats and sources, with
not_medical_advice: true. Repeatable byte for byte for the same spec and data.- Receipt
An append-only, hash-chained record of each release and each denial: time, agent, purpose, spec, level, metrics, window, packet hash and reasons. See receipts.
Errors and limits
Errors are JSON with a short machine-readable code: {"error": "unknown_user"}. A decision by the gate is not an error: ask and query return an envelope with status set to ok, denied or unsupported, and a denial comes back as HTTP 403 with its reasons.
| Status | Meaning | Examples |
|---|---|---|
| 400 | The request could not be processed | unknown_user, bad_external_id, batch_too_large, source_mismatch, question must be 3-500 characters |
| 401 | Credential missing or invalid | token_invalid, unauthenticated, or an OAuth challenge with WWW-Authenticate |
| 403 | The gate denied the request | {"status":"denied","reasons":["metric_not_in_grant:hrv_rmssd"]}; on ask and query, signature failures such as signature_required, signature_expired, bad_signature and nonce_replayed also arrive here as reasons (other routes return them as 400 errors) |
| 404 | No such route, or no such packet for this agent | not_found |
| 429 | Rate limited | rate_limited with Retry-After in seconds. The SDKs wait and retry. |
Other limits: questions are 3 to 500 characters; an ingest call carries at most 2,000 records; a QuerySpec spans at most two years before the gate clamps it to the grant's window; a signed request must arrive within 300 seconds of its timestamp, and each nonce works once. Denied calls do not count against the daily packet budget.
SDKs
Both SDKs are generated from the same OpenAPI document, sign developer requests, and retry on HTTP 429 after the time in Retry-After.
| Language | Package | Needs | Source |
|---|---|---|---|
| TypeScript | @askwearables/sdk | No dependencies; any runtime with fetch and WebCrypto (Node 20+, Deno, Bun, Workers, browsers) | sdks/typescript |
| Python | askwearables | Python 3.10+, standard library only | sdks/python |
Both expose the same calls: ask, query, capabilities, getPacket / get_packet, createUser / create_user, createGrantLink / create_grant_link, ingest and usage, plus a helper to verify grant webhooks. Install from a clone of the repository:
# TypeScript
cd sdks/typescript && npm run build && cd your-app && npm install /path/to/sdks/typescript
# Python
pip install /path/to/sdks/python
Wellness, not medicine
AskWearables reports what consumer wearables recorded, relative to the user's own history. It does not give medical advice, does not grade health, and is not intended to detect, diagnose or treat any condition. Packets carry not_medical_advice: true and data-quality caveats so that the agent can say the same. If you build on it, keep that framing in your own product.
