YouOS
by @drbaher
YouOS — local-first personal email copilot that learns your writing style from Gmail, Google Docs, and WhatsApp exports, then drafts replies in your voice. U...
clawhub install youos📖 About This Skill
name: youos description: > YouOS — local-first personal email copilot that learns your writing style from Gmail, Google Docs, and WhatsApp exports, then drafts replies in your voice. Use for drafting replies, reviewing how you usually respond, and running a self-improving personal communication workflow. metadata: openclaw: requires: bins: ["python3", "gog"] platform: darwin arch: arm64 minRam: "8GB" install: - kind: instructions label: "Manual install required" steps: - "python3 -m venv .venv" - "source .venv/bin/activate" - "pip install -e ." credentials: required: - "gog must be authenticated for Gmail/Docs access" optional: - "Claude CLI/API credentials only if model.fallback uses external provider" privacy: localStorage: - "SQLite DB under YOUOS_DATA_DIR/var/youos.db (or local var/youos.db)" networkEgress: - "None by default for local mode" - "Optional outbound requests when external fallback is enabled"
YouOS — Personal Email Copilot
YouOS is a full local Python app (not an instruction-only snippet). It drafts email replies in your style, grounded in your real past replies.
Safety / impact (read before install)
pip install -e . executes package install code locally; only run on trusted source.model.fallback: none for local-only operation.Install and runtime model
pip install -e .) in a Python 3.11+ environmentpip install -e . executes local package install code from this repository; review source before installingpython3 (3.11+)
- gog CLI authenticated to the Gmail account(s) you want to ingest
YOUOS_DATA_DIRCredentials and configuration
gog authentication for Gmail/Docs ingestionmodel.fallback: noneTrigger phrases
Requirements
Quick start
# Install
cd ~/Projects/youos
pip install -e .Check system requirements (Python, gog CLI, disk space, etc.)
youos doctorRun setup wizard (15 min, mostly ingestion)
youos setupDraft a reply
youos draft "paste inbound email here"
youos draft --sender john@company.com "email text"Open web UI
youos uiCheck status
youos statusRun nightly pipeline manually (add --verbose for step-by-step output)
youos improve
youos improve --verboseRun golden benchmark evaluation (8 curated test cases)
youos eval --goldenFull corpus health report (pairs, quality scores, top senders)
youos corpus
youos corpus --jsonIngest a WhatsApp chat export (optional — augments your corpus)
youos ingest --whatsapp ~/Downloads/WhatsApp-Chat.txtAdd sender note (immediately rebuilds their profile)
youos note john@company.com "integration partner, prefers bullet points"Submit a feedback pair directly from the terminal
youos feedback --inbound "email text" --reply "your reply" --rating 4View stats
youos statsTeardown (remove all data, keep code)
youos teardown
Gmail Bookmarklet
Install from the Bookmarklet page in the web UI. Once installed:
How it works
1. Ingests Gmail, Google Docs, WhatsApp exports — plus organic pairs from emails you sent without YouOS
2. Builds a retrieval index — BM25 + query expansion + semantic (LRU-cached) + multi-intent + per-account isolation + same-thread 2× + subject + topic signals + sender-type boosts + quality scores + relative confidence thresholds
3. When you ask for a draft: detects multi-intent, retrieves score-ranked thread-deduplicated exemplars (reply preserved 600 chars, inbound trimmed 400), prompt token budget enforced; generates using per-mode persona with first-name greeting; local model empty/signature-only output falls back to Claude automatically
4. Every email you review trains the model further — curriculum-ordered, quality-filtered, training pairs deduplicated by similarity, DPO pairs supported; nightly pipeline skips steps when data insufficient
5. Nightly: ingests + organic pairs, incremental persona re-analysis (90-day weighted, EWMA avg words, p25/p75 confidence intervals), fine-tunes (with golden eval check), runs autoresearch on rotating benchmark sample
6. Autoresearch benchmarks rotate weekly (seeded re-sample) — prevents overfitting to fixed test cases; golden eval composite tracked in pipeline log
7. Style drift detection: Stats dashboard flags when your writing patterns shift significantly
8. Your best-rated, least-edited replies surface higher in future retrievals via quality scoring
9. Sender profiles track reply-time patterns and topics; youos note immediately rebuilds that contact's profile
10. Submit feedback from terminal: youos feedback --inbound "..." --reply "..." --rating 4
11. Setup wizard asks for internal domains — accurate sender classification from day one
12. Facts store (/api/facts) — save context about contacts, projects, and preferences; facts are injected into generation prompts automatically for context-aware drafts
13. Auto fact extraction — sender notes and feedback notes are parsed automatically on save using 15+ rule patterns (preferences, timezone, schedule, sign-offs, roles, relationships, project metadata); negation-aware with confidence scoring; LLM (Claude CLI) fallback for unstructured notes; fact deduplication/merging on upsert
Security & privacy notes
gog authentication; review connected accounts before ingestionmodel.fallback: claude), inbound email/context can be sent to Claude for generationmodel.fallback: none in youos_config.yamlYOUOS_DATA_DIR if set)PRIVACY.md before first ingestion/deploymentProvenance
💡 Examples
# Install
cd ~/Projects/youos
pip install -e .Check system requirements (Python, gog CLI, disk space, etc.)
youos doctorRun setup wizard (15 min, mostly ingestion)
youos setupDraft a reply
youos draft "paste inbound email here"
youos draft --sender john@company.com "email text"Open web UI
youos uiCheck status
youos statusRun nightly pipeline manually (add --verbose for step-by-step output)
youos improve
youos improve --verboseRun golden benchmark evaluation (8 curated test cases)
youos eval --goldenFull corpus health report (pairs, quality scores, top senders)
youos corpus
youos corpus --jsonIngest a WhatsApp chat export (optional — augments your corpus)
youos ingest --whatsapp ~/Downloads/WhatsApp-Chat.txtAdd sender note (immediately rebuilds their profile)
youos note john@company.com "integration partner, prefers bullet points"Submit a feedback pair directly from the terminal
youos feedback --inbound "email text" --reply "your reply" --rating 4View stats
youos statsTeardown (remove all data, keep code)
youos teardown