Murph is a conversation-first personal health assistant.
It helps people understand, decide, act, and follow through across their health. Murph can answer questions, interpret connected data, remember relevant context, help with plans and tasks, provide private or user-chosen social support, and run bounded experiments when uncertainty about what works is the real problem.
Its compounding advantage is longitudinal context: useful history, evidence, preferences, constraints, goals, actions, and outcomes that can improve later help without making the member repeat the whole story. Underneath that relationship, Murph keeps durable human-reviewed truth in Markdown, append-only machine event ledgers in JSONL, and layers a typed runtime CLI and hosted control/execution surfaces on top of that vault.
Members use hosted Murph through iMessage/SMS, Telegram, email, and the iOS app. vault-cli is the runtime and operator command surface.
- a file-native vault with canonical writes owned by
packages/core - the
@murphai/murphpackage, which provides thevault-cliruntime binary - provider-backed hosted assistant turns and automation, with runtime state under
vault/.runtime/operations/assistant/** - a public Health Commons in
packages/health-commonsfor protocol pages, biomarker pages, source pages, exact revisions, and generated outcome summaries - a two-layer knowledge system: stable health reference pages under
bank/library/**plus a non-canonical compiled personal wiki underderived/knowledge/**, synthesized by the active assistant, persisted through shared assistant/CLI write surfaces, searchable locally, and kept rebuildable - inbox capture, assistant attachment evidence, and parser-driven audio/video transcription
- local wearable/device sync through the workspace-private
packages/device-syncdruntime bundled into@murphai/murph - a hosted Next.js integration control plane in
apps/web - a hosted Cloudflare execution plane in
apps/cloudflare - public Temporal contracts and hosted-local integration; private
cobuildwithus/murph-cloudowns the worker implementation, integration CI, and production Render deployment - shared hosted execution contracts and env/client helpers in
@murphai/hosted-execution - workspace-private headless owner/runtime packages such as
@murphai/assistant-engine,@murphai/operator-config,@murphai/assistant-runtime, plus the public contract package@murphai/gateway-core
Runtime: Node >= 24.22.1. Use the pinned package manager from this checkout:
corepack pnpm install --frozen-lockfile
pnpm build
pnpm devpnpm dev runs the hosted development stack. The repository does not provide a local Murph product installer or setup wizard. Operator commands use pnpm vault-cli ... --vault <path>.
After intentional dependency refreshes, review blocked install scripts with corepack pnpm deps:ignored-builds and record required approvals with corepack pnpm deps:approve-builds.
Murph is opinionated about storage boundaries:
- Markdown is the human-facing source of truth for durable documents such as
CORE.md, journals, memory, goals, conditions, protocols, registries, and the derived personal wiki. - JSONL ledgers are the machine-facing source of truth for append-only records such as events, samples, assessments, and audit entries.
- Blood tests remain user-facing reads over canonical
kind: "test"event-ledger records; they do not introduce a second storage family. - Imported source artifacts are copied into
raw/**and treated as immutable. - Derived parser output and compiled knowledge pages live under
derived/**and stay rebuildable. For the knowledge wiki specifically,derived/knowledge/index.mdis the content catalog,derived/knowledge/log.mdis the append-only write log, andderived/knowledge/pages/*.mdare the assistant-authored personal synthesis pages. - Local machine state lives under
.runtime/**, with durable non-canonical operational state in.runtime/operations/**, rebuildable projections in.runtime/projections/**, and ephemeral scratch state in.runtime/cache/**plus.runtime/tmp/**. - Assistant transcripts, metadata, receipts, outbox state, and related execution residue live under
vault/.runtime/operations/assistant/**; durable user-facingmemoryandautomationare canonical vault records. - If a datum is user-facing, queryable, or a future product building block, it does not belong in assistant runtime first. Treat assistant runtime as execution residue, not as a staging area for product state.
The result is a system you can inspect with normal filesystem tools while still keeping write paths disciplined.
Only four packages are published to npm: @murphai/murph, @murphai/contracts, @murphai/hosted-execution, and @murphai/gateway-core. The remaining packages/* entries are workspace-private owner packages that stay installable from a checkout and can be bundled into public tarballs, but they are not intended to be consumed as standalone npm products.
| Path | Responsibility |
|---|---|
packages/contracts |
Canonical Zod contracts, types, examples, and generated JSON Schema artifacts. |
packages/hosted-execution |
Shared hosted mailbox, workspace checkpoint, runtime log/status, Temporal processing, and auth contracts for the hosted apps/web control plane and Cloudflare worker. |
packages/runtime-state |
Workspace-private shared local-state taxonomy, .runtime path resolution, JSON-state versioning, and SQLite schema-version helpers. |
packages/core |
Workspace-private canonical mutation owner. No other package may write canonical vault data directly. |
packages/importers |
Workspace-private external adapters that normalize inputs and delegate writes to core. |
packages/inboxd |
Workspace-private inbox capture, canonical evidence persistence, runtime indexing, and attachment parse-job orchestration. |
packages/parsers |
Workspace-private local-first attachment parsing and derived artifact publication. |
packages/query |
Workspace-private read helpers, summaries, list/search helpers, export-pack generation, and derived-knowledge parser/search/index helpers. |
packages/health-commons |
Workspace-private public Health Commons owner for protocol pages, biomarker pages, sources, generated catalogs, and aggregate outcome summaries. |
packages/device-syncd |
Workspace-private hosted wearable/device ingestion and reconciliation. |
packages/assistant-engine |
Workspace-private headless assistant execution/runtime owner. |
packages/operator-config |
Workspace-private operator config, setup/runtime-env, and hosted assistant config owner. |
packages/gateway-core |
Headless transport-neutral gateway boundary. |
packages/assistant-runtime |
Workspace-private headless hosted execution surface used by Cloudflare runner paths. |
packages/cli |
The published @murphai/murph package, exposing the vault-cli binary and the main operator surface. |
apps/web |
Hosted Next.js control plane for onboarding, billing, OAuth, webhooks, encrypted mailbox intake, workspace checkpoints, and hosted runtime status/logs. |
apps/cloudflare |
Thin hosted runner for signed Temporal processing requests, status, per-user coordination, encrypted hosted bundles, and container-backed workspace runtime passes. |
fixtures and e2e |
Deterministic fixtures and smoke coverage. |
apps/webowns hosted onboarding, billing, OAuth callbacks, webhook intake, device-sync control-plane metadata, sparse routing state, encrypted hosted mailbox rows, workspace checkpoint metadata, and hosted runtime status/logs- it does not own canonical health data
- webhook and app paths append durable mailbox facts and signal Temporal only; they do not directly nudge a user runner in Cloudflare
apps/cloudflarerestores encrypted hosted bundles, coordinates per-user runtime passes, keeps only DO-local runner coordination state, and invokes the workspace-private@murphai/assistant-runtimepackage against web-owned mailbox/checkpoint/log ports- private
cobuildwithus/murph-cloudruns the per-user Temporal workflow worker that reads web-owned reconciliation facts, calls Cloudflareensure-processing, and stores only pointer-level orchestration state - Cloudflare returns
runtime_processing_acceptedorretry_laterand owns start, wake, active-fence alarm cleanup, and execution cleanup for the active runner throughensure-processing - the hosted execution plane is intentionally separate from the public hosted web app
The root CLI is no longer just a vault editor. The built command surface includes:
- health-vault operations such as
init,show,list,timeline,journal,document,meal,samples,audit,vault, and the health registry commands assistant onboardingfor hosted onboarding resume context, status, completion, and reopeningdevicefor hosted wearable/device connection and account inspection- env-gated route estimation through
vault-cli route estimate, which uses temporary Mapbox geocoding and Search Box lookups for distance, duration, hiking POIs, and optional approximate elevation between two points without persisting the route payload in Murph state - AI-assisted synthesis helpers such as
knowledge
The knowledge surface is intentionally narrow: use it to persist pages, inspect saved pages, lint the wiki, rebuild the index, and tail the append-only wiki log. The assistant's wiki-maintainer workflow itself lives in the runtime prompt plus the dedicated assistant.knowledge.* tools, not in repo AGENTS.md.
Use vault-cli with an explicit --vault <path> for runtime and operator commands.
- Use
vault-cli show <id>when you already know one exact query-layer record id to inspect. - Use
vault-cli listwhen you need structured filtering by family, kind, status, stream, tag, or date range. - Use
vault-cli search query --text "..."when the target is fuzzy, remembered by phrase, or buried across notes and record bodies. - Use
vault-cli timelinewhen the question is chronological: what changed, what happened over a window, or what stood out over time. - Use
vault-cli memory show, targetedvault-cli knowledge ...reads, and the relevant preferences surface when you need the user's saved current-state context. - Use
vault-cli wearables dayor thewearables ... listcommands for semantic wearable summaries before drilling into raw events or samples. - Use family
manifestcommands such asmeal manifest,document manifest,intake manifest, andworkout manifestwhen you need immutable import provenance or raw-source context.
Quick help:
pnpm vault-cli --helppnpm vault-cli init --vault ./vault
pnpm vault-cli assistant onboarding status --vault ./vaultpnpm dev
pnpm typecheck
pnpm test
pnpm verify:acceptance
pnpm --dir apps/cloudflare verifypnpm dev is the repo-root local hosted lane. It pulls the linked Vercel development env for apps/web, runs hosted-web Prisma generate plus local schema sync, and starts both apps/web and the local Cloudflare worker together. One-time local prerequisites:
- either
cd apps/web && vercel linkor runvercel link --repofrom the repo root - log into Vercel CLI and enable project OIDC for the linked web project
- optional: copy
apps/cloudflare/.dev.vars.exampletoapps/cloudflare/.dev.varswhen you want to pin local Worker secrets or add provider-specific Worker vars; otherwisepnpm devuses Wrangler's documented local process-env path for required Worker secrets and CLI--varoverrides for local non-secret vars - run local Postgres on
127.0.0.1:5432; by defaultpnpm devignores a pulled VercelDATABASE_URLand uses themurph_device_syncdatabase there - treat
127.0.0.1:5432/murph_device_syncas the canonical local hosted debugging database for local Docker runs, including hosted runtime logs and AI usage rows - install or check the Temporal CLI with
pnpm temporal:cli:setuporpnpm temporal:cli:check;pnpm devand hosted-local E2E manage the local Temporal dev server and worker automatically. The managed dev server exposes the Temporal Web UI athttp://127.0.0.1:8233by default, or atMURPH_DEV_TEMPORAL_PORT + 1000when the Temporal frontend port is overridden. Hosted-local E2E defaults to headless Temporal because those tests do not use the dashboard; for interactivepnpm dev, setTEMPORAL_DEV_HEADLESS=1only when you intentionally want no dashboard. - optional: set
MURPH_DEV_DATABASE_URLor shellDATABASE_URLfor a different local database; setMURPH_DEV_USE_VERCEL_DATABASE_URL=1only when you intentionally want the pulled Vercel development database - keep the linked Vercel development env populated with the real hosted signup secrets you need locally, such as Privy credentials
- optional: put local-only Stripe test checkout values in
.tmp/.env.hosted-local-stripe; rootpnpm devloads that file after the Vercel env pull and before shell env overrides, so localsk_test_...andprice_...values can override shared Development env without being committed - optional: install the Stripe CLI (
brew install stripe/stripe-cli/stripe) and runstripe loginonce.pnpm devthen auto-launchesstripe listenfor hosted onboarding webhooks and captures the per-developerwhsec_...signing secret from the listener's startup output into the web child's env. SetMURPH_DEV_SKIP_STRIPE_LISTEN=1to opt out; seeapps/web/README.mdfor the full contract. - optional: for live local Linq webhook delivery, keep
LINQ_API_TOKENandLINQ_WEBHOOK_SECRETin local env and either setMURPH_DEV_LINQ_WEBHOOK_PUBLIC_URLto an HTTPS tunnel origin/webhook URL or keep a repo-localcloudflaredconfig at.tmp/cloudflared-linq-webhook.yml. When those are present,pnpm devstartscloudflared tunnel --config ... run dev, sets hosted onboarding public links to the tunnel origin, and registersmessage.receivedagainst/api/hosted-onboarding/linq/webhook. Successful registrations are cached under.tmp/to avoid duplicate creates on repeated starts; remove that cache to force a fresh registration. SetMURPH_DEV_LINQ_WEBHOOK_TUNNEL=0to disable this path orMURPH_DEV_SKIP_LINQ_WEBHOOK_REGISTER=1to skip Linq API registration.
Repeatable launcher sanity check:
NEXT_DIST_DIR_MODE=smoke MURPH_DEV_WEB_PORT=3013 MURPH_DEV_WORKER_PORT=8793 pnpm devThat variant keeps the check off the default apps/web/.next-dev lock and default localhost ports while still exercising the same root launcher, Vercel env pull, Prisma setup, and Wrangler/Containers startup path.
Startup readiness also POSTs the internal deploy-smoke route with HOSTED_EXECUTION_SMOKE_RUNNER_CONTAINER=true, so pnpm dev proves the local Worker can boot the runner container and observe the prepared runner bundle before printing ready. Set MURPH_DEV_SKIP_RUNNER_SMOKE=1 for a focused Worker-only debugging loop.
For secondary worktrees, do not rely on ports alone. Use the hosted-local worktree helper so the database, generated local crypto state, Wrangler state, Next dist dir, optional MinIO data, and webhook tunnel target are isolated together:
pnpm hosted-local worktree doctor <slug>
pnpm dev:worktree <slug>
pnpm hosted-local worktree down <slug>See agent-docs/operations/hosted-local-worktree-dev.md for the full contract
and manual fallback.
The repo verification baseline for docs/process-only and ordinary repo work remains:
pnpm typecheck
pnpm test
pnpm verify:acceptance- Root workspace scripts live in
package.json. - All workspace packages are private. Hosted deployments own distribution; npm publishing is retired.
- The Cloudflare deployment path is documented in
apps/cloudflare/DEPLOY.md. - Package-local operational details live in each package
README.md.
Some flows need a real hostname over HTTPS β WebAuthn refuses 127.0.0.1, and Telegram's /setdomain refuses localhost. The repo ships a Caddyfile that terminates TLS for local.withmurph.ai:3443 and forwards to the regular dev server on http://127.0.0.1:3000. pnpm dev auto-spawns it when both caddy is on PATH and the Caddyfile exists; otherwise it's skipped silently.
One-time setup:
echo "127.0.0.1 local.withmurph.ai" | sudo tee -a /etc/hosts
brew install caddy nss
sudo caddy trustThen pnpm dev runs as usual and the browser-facing URL becomes https://local.withmurph.ai:3443. Add that origin to the Privy dashboard allowlist and set the Telegram bot's /setdomain to local.withmurph.ai (Telegram ignores the port). Internal harness callers keep using http://127.0.0.1:3000. Set MURPH_DEV_SKIP_TLS_PROXY=1 to opt out.
Murph is licensed under Apache-2.0. See LICENSE for the full terms.
ARCHITECTURE.mdfor the top-level system map and trust boundariesdocs/architecture.mdfor the one-page architecture summarydocs/device-provider-contribution-kit.mdfor the wearable-provider contribution guide, compatibility matrix, and scaffoldspackages/cli/README.mdfor the hosted CLI packageapps/web/README.mdfor the hosted control planeapps/cloudflare/README.mdfor the hosted execution plane
