Agent Access is an opt-in feature that lets AI agents read your lab context outside the getbased browser tab. Enable it once in Settings and any MCP-compatible tool — coding agents, messenger bots, terminal assistants — can answer questions about your labs in real time. Only a pre-built text summary reaches the agent; your raw data and sync mnemonic never leave your browser.Documentation Index
Fetch the complete documentation index at: https://docs.getbased.health/llms.txt
Use this file to discover all available pages before exploring further.
How it works
When you enable Agent Access, getbased pushes a text summary of your labs, context cards, supplements, goals, and notes to a lightweight context gateway. Your agent authenticates to that gateway with your read-only token and reads the summary. The flow looks like this:- You turn on Agent Access in Settings and receive a read-only token.
- getbased pushes your assembled context to the gateway — the same text the in-app AI chat sees, not raw entries.
- Your agent uses the token to query the gateway and answer your questions.
Setup
Enable Agent Access
- Open Settings → Data → Agent Access
- Toggle it on
- A read-only token appears — click Copy to put it on your clipboard (the clipboard is cleared after 60 seconds)
The token is masked by default. Click Show to reveal it. Treat the token like a password — do not commit it to a public repository or share it publicly.
Install getbased-agent-stack
The universal adapter is getbased-agent-stack — one install covers the MCP adapter, a local RAG knowledge server, and a browser setup dashboard.After
install.sh runs on Linux, it starts the RAG server and a browser dashboard as systemd user services. Open the dashboard at http://127.0.0.1:8323 to get paste-ready config blocks for every supported client — no manual YAML or JSON authoring required.Add your token to your agent's config
Paste your token into your agent’s MCP configuration. See the Hermes Agent example below, or open the dashboard at
http://127.0.0.1:8323 for auto-generated config for Claude Code, Claude Desktop, Cursor, Cline, Windsurf, and more.MCP tools reference
getbased-mcp exposes the following tools to any connected agent:
| Tool | Description |
|---|---|
getbased_lab_context | Full lab summary — values, reference ranges, trends, context cards, supplements, and goals. Accepts an optional profile ID; omit it to return the active profile. |
getbased_section | Query a specific named section (e.g. hormones, wearables, sun) or list all available sections. |
getbased_wearables_series | Daily wearable time-series (HRV, resting HR, sleep score, readiness, steps, weight, and more) over the 7-, 30-, or 90-day window you opt into. |
getbased_list_profiles | List all profiles by name and ID. |
knowledge_search | Semantic search over your knowledge base. Requires a local RAG server (default http://127.0.0.1:8322, configurable via LENS_URL). Degrades gracefully — lab-context tools keep working even when no RAG server is reachable. |
knowledge_list_libraries | List all libraries on the RAG server with their IDs and which one is currently active. |
knowledge_activate_library | Switch the active library. Subsequent searches target the new one. |
knowledge_stats | Per-source chunk counts for the active library — useful for diagnosing missing search results. |
getbased_lens_config | Show the Custom Knowledge Source endpoint and key from getbased so the agent stays in sync with what the app is configured to query. |
Hermes Agent config example
Hermes Agent is a self-hosted AI assistant with built-in support for Matrix, Telegram, Signal, Discord, and other messengers. Add the following to~/.hermes/config.yaml, then restart the gateway with hermes gateway restart:
your-token-here with the token from Settings → Data → Agent Access.
Multi-profile support
If you track labs for more than one person, each profile’s context is stored separately on the gateway. Your agent can query any profile by ID:getbased_list_profilesreturns all available profiles with names and IDs.getbased_lab_contextaccepts an optional profile ID parameter — omit it to get the currently active profile.
Wearable data in agent context
If you have wearables connected (Oura, Polar, WHOOP, Fitbit, Withings, Ultrahuman, Apple Health, or manual entries) and Settings → AI → AI Context → Include wearable data is on, the agent automatically receives a[section:wearables] block when it calls getbased_lab_context. The block is approximately 200 tokens and includes current value, baseline, weekly trend, and recent anomaly events for each metric.
To pull just the wearables section directly:
30-day daily series (opt-in)
For time-series reasoning — “did my HRV drop the week before I got sick?” — the always-on summary is not enough. Open Settings → Data → Agent Access and turn on “Push 30-day wearable series”. getbased then writes a pivoted daily matrix into a separate section (~400 tokens):→ separates daily values oldest-first, — means no reading that day. Raw daily samples never sync via the CRDT relay — they live in your browser’s IndexedDB only. The browser renders the section string and posts it to the gateway.
Sun & Light sessions (body regions opt-in)
If you log Sun & Light sessions, the agent can pull them viagetbased_section('sun'). The default field set includes session date, duration, channel doses, atmosphere, eye-exposure mode, and a body summary.
The specific anatomical regions array (e.g. ['breast-chest', 'legs-front']) is opt-in and off by default. Turn on Settings → AI → AI Context → “Share body regions in Sun & Light context” to include it. With the toggle off, the agent sees that you exposed roughly 45% of your body to the sun for 30 minutes, but not which 45%.
Security
Agent Access is designed to share the minimum needed for an agent to be useful:- Read-only token — grants access to a pre-built text summary only. No writes, no database queries, no mutations.
- No raw data exposed — the gateway stores the same assembled context the in-app AI chat uses, not your underlying lab entries or personal records.
- Mnemonic never leaves your browser — Agent Access does not use or transmit your sync mnemonic.
- Revocable at any time — toggle Agent Access off in Settings to immediately invalidate the token. Click Regenerate to issue a new token and invalidate the old one.
- Self-hostable — the context gateway runs on the same server as the sync relay. Self-host both for full control over where your summary is stored.
Troubleshooting
Agent sees the wrong profile
Agent sees the wrong profile
The gateway serves whichever profiles have been pushed from your browser. If the agent returns data for the wrong person:
- Open getbased and switch to the correct profile.
- Make any edit and save (or toggle Agent Access off and back on) to force a fresh push.
- Ask the agent again — use the profile ID parameter if you have multiple profiles.
Agent returns stale data
Agent returns stale data
The gateway is updated whenever you save changes in getbased. If answers seem outdated:
- Confirm Agent Access is still toggled on in Settings → Data.
- Open getbased in your browser — the push happens from the browser, so it needs to be open at least once after your latest changes.
- Check your network connection — the push requires internet access to reach the gateway.
Token not working
Token not working
- Make sure you copied the full token with no trailing spaces.
- Check that Agent Access is still enabled — disabling it invalidates the token immediately.
- If you clicked Regenerate, update your agent config with the new token — the old one no longer works.
Agent cannot reach the gateway
Agent cannot reach the gateway
If you self-host the gateway, verify that:
- The gateway server is running and reachable from the agent’s network.
- Your agent config points to the correct gateway URL (e.g.
https://sync.yourdomain.com). - TLS is configured correctly — the agent needs HTTPS access.