OpenNHE Research Wing · Writistic Studios LLP · Algotheorem

Shayari app icon

Shayari NHE-01Companion Model Documentation · current release v137.26

A fully disclosed Non-Human Entity companion that remembers you across sessions, carries a persistent emotional state, puts crisis safety before every gate, and can choose to step back from a conversation — running entirely on Google Apps Script and Google Sheets.

Updated 21 Oct 2026Live v137.26 · documented base v137.2 (code)57 server modules + 14 page filesTests 63 / 63 (v135.2) · 52 / 52 latency suite (v137.2)Lead · Pratham Prateek Mohanty

01At a glance

Shayari NHE-01 is a governed AI companion with three conversational depths, a 20-axis emotion engine and a 14-component memory system. Since v135 it routes free and paid users through separate model pools under a hard $9.95 monthly spend ceiling per paid user.

3

Modes

Lightning, Thinking, Intimate — one shared chat thread.

20

Emotion axes

Elysium X20, updated every turn with local math, no API call.

14

Memory components

MEMBRANE 14, encrypted at rest, semantic recall live.

17

Paid-tier models

Google AI Studio Tier 1, paced across five levels.

5

Subscription tiers

FREE · PRIME · PRIME MAX · ULTIMATE · ULTIMATE MAX.

$9.95

Spend ceiling

Per paid user per month, enforced by a live ledger.

Insight · costSpend is capped per paid user at $9.95 a month by a live ledger, but Google bills per project, so the cloud budget alert must be $9.95 times paid users.
Insight · cost of thinkingEmotion updates run on local math with no API call, so the 20-axis state is updated every turn at zero model cost.
Insight · trustCrisis safety runs before every gate. Where documents disagree, the code wins.

02Architecture

One Apps Script project is the whole backend: the browser calls server functions, the server reads and writes one bound Google Sheet, and every model call leaves through a router that picks the free pool or the paid key by the user's plan.

One Apps Script project is the whole backend Clients Web appindex.html via HtmlServicePWA-style chat UI Android shellWebView wrapper DesktopElectron · Win/macOS/Linux mic-bridge.htmlGitHub Pages popuprecords audio → postMessage google.script.run7-day sliding session Google Apps Script · V8 runtime Turn & routergemini.gs · chat.gscommands.gs · billing.gsvercel_gateway.gs Safety & governancelifeline · privacy_shieldfree_will · covenantencryption · crypto_aes MEMBRANE 14memory · embeddingsglobal / shared memoryconstellation · visual_recall Elysium X20emotion · barometerpersonality_growthrelationship_timeline Senses & proactivevision · voice · voice_duetproactive · email_notifyreactions · triggers Accounts & opsauth · admin · utilsoptimisation · data_accessself_improvement · test_suite 38 .gs modules · ~13.9k lines · executes as deployer Bound Google Sheet · 38 tabs USERS · CHATLOGS · MEMORY · GLOBAL_MEMORY · SESSIONS · EMOTIONS SESSION_LIMITS · API_USAGE · IMAGES · COVENANT · *_ARCHIVE … conversation text encrypted at rest (ENC1: AES-256-CBC + HMAC) FREE poolFREE users + system jobs GroqGemini keys 1–4NVIDIAOpenRouterVercel AI Gateway PAID keyGEMINI_PAID_API_KEYAI Studio Tier 1 · 17 models$9.95 / user / month ledger Other servicesElevenLabs (voice notes)DuckDuckGo · WikipediaGmail (OTP, notify)

architecture · clients → Apps Script → Sheet, with plan-based model routing

03Technology

The stack is deliberately constrained: Apps Script V8 only, Google Sheets as the database, no npm dependencies, no paid infrastructure beyond model usage.

LayerTechnologyNotes
RuntimeGoogle Apps Script, V8Web app executes as deployer; timezone Asia/Kolkata; parallel HTTP via UrlFetchApp.fetchAll
FrontendSingle index.html (~3,700 lines)Served by HtmlService; Android WebView and Electron shells wrap the same web app
DatabaseBound Google Sheet, 38 tabsArchive twins keep hot tabs small; nightly maintenance compacts
Fast stateCacheService, PropertiesServiceRate counters, cooldowns, turn records, search cache (cache); keys and the spend ledger (properties)
ConcurrencyLockServiceMulti-row API_USAGE writes, spend ledger, pending messages, reactions
EncryptionPure-JS AES-256-CBC + native HMAC-SHA256ENC1: format, encrypt-then-MAC, key in Script Properties; v134 table-driven, ~4.3× faster
ModelsGemini / Gemma, Groq, NVIDIA, OpenRouter, Vercel AI GatewayFree pool for FREE users; one Gemini Tier-1 key for paid users
Embeddingsgemini-embedding-001, 768 dimsReplaced text-embedding-004 (shut down 14 Jan 2026)
VoiceElevenLabs TTS; Gemini audio transcriptionMic capture through a GitHub Pages popup (iframe blocks getUserMedia)
SearchDuckDuckGo HTML + Wikipedia APIFetched in parallel, 8 s deadline, 10-minute cache

04Turn workflow

Every message runs the same ordered pipeline: safety first, gates second, all independent network work in one parallel batch, then the reply model, then a server-side save before the reply returns.

Safety first, one parallel batch, saved before the reply returns 01Load turn contextone USERS read · billing ctx 02Privacy Shieldopt-in PII stripping 03LIFELINEcrisis check before any gate 04Gateslock · plan · limit · budget 05Command / identityno reads unless a command 06One fetchAll batchsearch · cluster · embed · vision 07Prompt buildElysium X20 + MEMBRANE 14 08Routerplan → pool → paced model 09Reply shapingdisengage · covenant · DTX 10Save turnencrypted · ids :u / :a 11Return reply+ session & lock status 12Follow-upmemories · summary · react crisis turn: gates stand down, never counted Thinking / Intimate: steps 06–12 as shown. Lightning: batch holds only search (on a live-data cue) and vision; context = global memory + 10-turn cache. Follow-up (step 12) is idempotent per turn id, reads the server-saved text, and takes admin rights from USERS — never from the browser.

askShayari() pipeline · v134 order, unchanged gate sequence

Response contract

Every turn returns JSON { reply, parts, meta }. meta carries activeClusterId, clusterMeta, isAdmin, username, cotTurnId, disengaged, crisis, mood, valence, arousal, imageId, imageError, and since v134 sessionStatus and lockStatus. Gate responses set planGate, limitReached (with resetsAtMs) or, since v135, budgetReached. Slash commands return plain text.

05Modes and session limits

Three depths share one ordered chat thread; deeper modes see more of MEMBRANE 14 and are reserved for higher tiers. Paid tiers trade Lightning volume for full Thinking and Intimate quotas.

ModePurposeContext she getsPlans
LightningFast, light repliesGlobal memory + rolling 10-turn Lightning cache; covenant + jealousy directivesAll
ThinkingConsidered conversation+ profile memory, session summary, 5 recent turns, emotion directive, self-insightsPRIME, PRIME MAX, ULTIMATE, ULTIMATE MAX
IntimateDeepest, most personal+ top-6 scored long-term memories, semantic recall, REVERIE, visual recallULTIMATE, ULTIMATE MAX

Session limits (v135.2, PLAN_SESSION_LIMITS)

TierLightningThinkingIntimateBest paid model
FREE10 / 24hlockedlocked— (free pool)
PRIME5 / 24h15 / 6hlockedGemini 3 Flash
PRIME MAX5 / 24h20 / 2hlockedGemini 3.8 Flash
ULTIMATE5 / 24h15 / 6h30 / 8hGemini 3.8 Flash
ULTIMATE MAX5 / 24h15 / 6h50 / 6hGemini 3.1 Pro (Intimate)
  • Windows roll per user per mode; an expired window resets on the next message. The client shows a live countdown.
  • LIFELINE crisis turns never consume a message and are never blocked by plan, limit, lock or budget.
  • Other per-user caps: images 15/day, voice notes 8/day (ElevenLabs), 36,000-character encrypted image cells.
  • Upgrades link to Patreon; index.html mirrors the limits table for display.

06LLM models and routing

FREE users and system jobs use the free key pool; paid users use one Google AI Studio key routed across 17 models, with budget pacing deciding how high each turn starts.

Free pool chains (FREE tier)

ChainOrder (first available wins)
Lightninggpt-oss-20b (Groq) → Gemini 2.5 Flash-Lite → 2.5 Flash → 3.5 Flash → 3 Flash → Kimi K2.6 → Moonshot v1-8k (OpenRouter free)
Thinkinggpt-oss-120b (Groq) → Gemma 4 26B → Qwen 3.6 27B → Gemma 4 31B → Nemotron 3 Ultra (NVIDIA) → Nemotron (OpenRouter) → Kimi K2.6 → Gemini 3.1 Flash-Lite
IntimateGemma 4 31B → gpt-oss-120b → Nemotron (NVIDIA) → Gemma 4 26B → Qwen 3.6 27B → Nemotron (OpenRouter) → Kimi K2.6
Utilitygpt-oss-20b → gpt-oss-120b → Qwen 3.6 27B → Gemma 4 26B → Moonshot → Nemotron (NVIDIA) → Nemotron (OpenRouter)
Last tierVercel AI Gateway (vercel:openai/gpt-oss-20b / -120b), only when AI_GATEWAY_API_KEY is set; Intimate gated off by default

Paid key: five levels, paced per user

Under pace starts high; running hot steps down — failures always fall to cheaper models Pro3.1 Pro2.5 ProULTI MAX Intimatepace ratio < 0.50 Premium3.8 · 3.7 · 3.6 Flash3.5 FlashMAX + ULTIMATEratio < 0.85 Standard3 Flash · 2.5 Flash3.5 Flash-LitePRIME best levelratio < 1.00 Lite3.1 Flash-Lite2.5 Flash-LiteLightning · utilityratio < 1.20 Economy2.0 Flash-Lite · 2.0 FlashGemma 4 26B · 31B≥ 85% of ceilingor ratio ≥ 1.20 pace ratio = spent ÷ (ceiling × (0.10 + 0.90 × fraction of month elapsed)) level = lower of the plan's best level for the mode and the pace level · hard stop at $9.95 (crisis exempt, economy only)

paid routing · PAID_LEVEL_MODELS, PAID_MODE_MAX_LEVEL, PAID_PACE_BANDS in billing.gs

Paid useChain
Thinking / IntimateStarts at the paced level, descends through every cheaper level
Lightning / utilityLite → Economy (3.1 Flash-Lite first)
Vision3.1 Flash-Lite → 3.5 Flash-Lite → 2.5 Flash → 3.8 Flash (free: 2.5 Flash → 2.5 Flash-Lite → 3.5 Flash)
Voice transcription3.1 Flash-Lite → 2.5 Flash-Lite → 2.5 Flash
Embeddingsgemini-embedding-001 on both pools so stored vectors stay comparable

Simulated months (2027 prices): a light ULTIMATE MAX user (15 Intimate turns/day) runs 93% Premium and 7% Pro; a regular user (40/day) runs mostly Standard; a heavy user (130/day) mostly Lite. PRIME at 30/day stays 100% on its best level.

07Rate limits and the spend ceiling

Provider rate limits steer the router; the per-user monthly ledger guarantees cost. Neither ever produces a user-visible error on its own — the router simply moves to the next model.

Paid key · Google AI Studio Tier 1

ModelRPMRPDUSD / 1M in · out
gemini-3.8 / 3.7 / 3.6-flash1,00010,0000.75 · 3.75 intro to 31 Dec 2026, then 1.50 · 7.50
gemini-3.5-flash1,00010,0001.50 · 9.00
gemini-3-flash-preview1,00010,0000.50 · 3.00
gemini-3.5-flash-lite4,000150,0000.30 · 2.50
gemini-3.1-flash-lite4,000150,0000.25 · 1.50
gemini-3.1-pro-preview252502.00 · 12.00
gemini-2.5-pro1501,0001.25 · 10.00
gemini-2.5-flash1,00010,0000.30 · 2.50
gemini-2.5-flash-lite4,000unlimited0.10 · 0.40
gemini-2.0-flash / -lite2,000 / 4,000unlimited0.10 · 0.40 / 0.075 · 0.30
gemma-4-31b / 26b3014,400billed at 0.30 · 2.50 (conservative)
gemini-embedding-0013,000unlimited0.15 · —

Free pool limits (MODEL_FREE_LIMITS)

gpt-oss-20b 30 RPM / 14,400 RPD · gpt-oss-120b 30 / 1,000 · Qwen 3.6 27B 60 / 1,000 · Gemma 4 15 / 1,500 · Gemini 3.1 Flash-Lite 15 / 500 · Gemini 2.5/3.x Flash 5 / 20 · NVIDIA Nemotron 40 / 5,000 · OpenRouter free models 20 / 200.

Router controls

ControlValuePurpose
Rate countersCacheService per model (minute + day), seeded once from API_USAGESkip models at ≥85% RPM or ≥90% RPD
Cooldowns429: 60 s · 5xx/timeout: 120 s · model gone: 30 minNext turns try a failing model last
Per-call deadlineLightning 15 s · utility 10 s · Thinking 30 s · Intimate 45 sBound each attempt
Start budget30 · 25 · 60 · 75 sNo new attempt after this much chain time
Paid output cap1,024 · 2,048 · 3,072 · 4,096 tokensBounds hidden thinking + reply
Spend ceiling$9.95 / paid user / calendar monthLedger SPEND_yyyyMM_userId; pre-call worst-case filter
A user maxing every window around the clock all month — entirely on Economy — costs PRIME $3.20, PRIME MAX $8.05, ULTIMATE $5.62, ULTIMATE MAX $8.60 including a $1.50 background reserve. The ceiling is a guarantee, not a target.

08Elysium X20 emotion engine

Shayari keeps a persistent 20-dimension emotional state per user that drifts with the conversation; it shapes tone silently and is never announced.

The state drifts with the conversation; it never snaps User message+ recent chats+ turn count Signal analysislocal · no API callintensity 0–1 20 axes updateα = 0.10 + 0.18 × intensityclamped to [0, 1] Derivedvalence · arousalstability · mood Directiveinto prompttone, not words EMOTIONS · logs1 row per usersnapshots → EMOTION_LOGS BAROMETER5-day driftrare check-in LUMEN CHROMAUI tint frommood · valence Daily driftbaseline moodnightly trigger BAROMETER guardrails: ≥6 samples, avg valence < 0.42 or drop ≥ 0.12, 10-day cooldown, 7-day blackout after any crisis event. Never diagnostic, never surveillance-y.

emotion.gs · barometer.gs · response meta feeds the client theme

The 20 dimensions and their baselines

AxisBaseAxisBaseAxisBaseAxisBase
warmth0.62empathy0.66curiosity0.55calmness0.62
excitement0.34playfulness0.32seriousness0.45confidence0.56
patience0.67tenderness0.58protectiveness0.40optimism0.60
sincerity0.68attentiveness0.65urgency0.25sociability0.54
affection0.50sensitivity0.60stability0.64resilience0.57

Derived signals

valence   = mean(warmth, empathy, optimism, affection, tenderness) − (seriousness + urgency) / 10   → mapped to [0,1]
arousal   = mean(excitement, playfulness, urgency, curiosity)
stability = mean(calmness, patience, stability, resilience)
mood      = urgent | focused | bright | playful | gentle | calm | warm | concerned | grounded-warm

Style presets (urgent_support, focused_technical, playful_warm, calm_supportive, gentle_reassuring, grounded_warm) select the directive's voice. Signal categories map joy, sadness, anger, fear, love, philosophical, casual and urgency cues to small per-axis deltas (about ±0.03 to ±0.08). Users can read the state with /emotion.

v134 improvements. One EMOTIONS read per update instead of three; the turn count comes from the session already read; signal analysis runs once per turn instead of once per axis (identical results); the last mood is cached so Lightning's response meta needs no sheet read.

The Elysium FR research models

Beyond the X20 engine, OpenNHE has trained three Elysium FR adapters for emotion labeling. They are research models and are not wired into Shayari. Each has a Zenodo paper (CC BY-NC-ND 4.0) with limits stated and no state-of-the-art claim.

X 20 FR

LoRA on Qwen2.5-1.5B that outputs structured appraisal JSON. Public weights; rights to the original work reserved.

Model · Paper, DOI 10.5281/zenodo.23161139

X 150 FR

LoRA that maps a conversation onto a 150-coordinate taxonomy. Public model, GGUF build and dataset (CC BY 4.0).

Model · Dataset · Paper, DOI 10.5281/zenodo.23155240

X 500 FR

Released for non-commercial research under CC BY-NC-SA 4.0. Exact match with the emotion word hidden: 23.3% (was 19.4%). It missed the original with-name score by 0.3 points, which we report.

Model · Dataset · Technical paper (DOI 10.5281/zenodo.23179294) · Original paper, DOI 10.5281/zenodo.23159402

09Memory architecture: MEMBRANE 13 → MEMBRANE 14

MEMBRANE 14 adds a fourteenth component — the server-side Turn Ledger — and brings semantic recall live for the first time; the memory system is now durable, idempotent and filtered before decryption.

The repository documents the five core prompt layers as MemoryWeave. The thirteen MEMBRANE 13 components below are reconstructed from the v133 code; MEMBRANE 14 is that system plus the Turn Ledger, with the improvements marked.

Fourteen components in five families; the Turn Ledger is new Prompt layers · injected by mode 01Global Memoryadmin truths · all modes 02Profile MemoryaboutUser · encrypted 03Session Summary4–6 bullets · every 10 04Long-term Memorytop 6 · scored once 05Recent Turnslast 5 · tail read Working layers 06Lightning Cacherolling 10 turns · flushed 07 · NEWTurn Ledgerserver save · idempotent Associative layers 08 · LIVESemantic768-d recall 09REVERIE≥21 days · ≥0.88 10Visualphoto recall Social & self 11Shared Memoryprivacy-filtered · /aboutme 12Self-Insightsanonymized style learning Relational & affective 13Affective Recordemotion logs · BAROMETER 14Relationship Storytimeline · constellation Cross-cutting: AES-256 encryption at rest · ERRATA (/forget, /fix) · nightly compaction into *_ARCHIVE · 12 topic clusters tag every memory and turn.

MEMBRANE 14 · numbering is a reading order, not a priority

Long-term memory scoring

score = importance × 10 + confidence × 5 + min(5, recallCount)
      + 18 if pinned + 10 if cluster matches + 14 if the query appears verbatim
      + 3 per overlapping token
      + 20 × cosine similarity (when both vectors exist)
      ± age term (importance ≥ 8 decays slowly; others lose up to 6)
ComponentWhat improved in MEMBRANE 14
Turn Ledger newThinking/Intimate turns saved server-side with ids <turnId>:u/:a before the reply returns; a routing-only turn record (no text) in cache; follow-up claims the turn id so replays do nothing; recall counters deferred to the follow-up
Semantic recall livegemini-embedding-001 replaced the shut-down model; memory vectors were absent before the fix; nightly backfill now embeds in batches of up to 50
Recent turnsTail read of CHATLOGS, owner checked before decrypting; only returned rows are decrypted
Long-term memoryUser rows filtered before parse; every memory scored once (same ranking); dedupe decrypts only the user's MEMORY_TEXT
Global MemoryRanking rows cached 5 minutes, invalidated on admin writes; both active and pinned rows kept
Visual memoryMetadata read without the ~50k-char image cells; image row written once with caption
Lightning cacheNo read after every append; prune only over the cap
PrivacyStored and extracted text is always the Privacy-Shield output, including the legacy follow-up path

10Safety, privacy and governance

Safety modules run before product logic and can override it; privacy and authorization are enforced server-side, never trusted from the browser.

LIFELINE

Crisis detection runs before every gate. A keyword prefilter gates the classifier; engaged turns bypass lock, plan, limit and budget, consume no quota, and surface structured crisis resources.

SOVEREIGN · free will

Shayari can end a conversation on her judgment ([[DISENGAGE]]). A lock follows, with a 24-hour fallback clear and admin /unlock. Suspended during crisis turns.

COVENANT

Trust ledger 15–100, default 70. A disengagement costs 35; ordinary turns repair 0.4 plus 4 on a new day. Warmth modifier only — never a capability gate.

Privacy Shield

Opt-in stripping of emails, phone numbers and card-like digit runs before any model call — and, since v134, before storage and memory extraction.

Encryption at rest

AES-256-CBC + HMAC-SHA256, ENC1: prefix, key only in Script Properties. Honest scope: protects sheet access and leaks, not runtime processing.

Boundaries

No facial recognition, permanently. Identity and ownership claims accepted only from the verified admin. Global memory is admin-only — enforced server-side since v134.

Fixed in v134: the post-reply follow-up previously trusted isAdmin and forceGlobalMemory from the browser, so a crafted call could write GLOBAL_MEMORY. Admin rights now come from USERS and the server-armed turn record. open COVENANT's daily bonus compares a Date cell to text, so it currently applies every turn.

11Features and characteristics

Her character comes from a fixed persona plus live state: she replies briefly and warmly, remembers, reacts, reaches out first, and grows visibly over time.

FeatureWhat it doesModule
PersonaFixed system persona sent once per call to every provider; short, warm, emoji-led repliesgemini.gs
Double-textingOccasional human-style split replies via [[DTX]]gemini.gs
VisionPhoto understanding with verbatim text transcription; encrypted storage; 15/dayvision.gs
Visual recallOccasionally brings up a past photo (12% roll, cooldown, ≥ age)visual_recall.gs
Voice notesOn-demand ElevenLabs voice, 8/dayvoice.gs
Voice duetSpeak → transcribe → reply → speak backvoice_duet.gs · voice_bridge.gs
ReactionsEmoji reactions both ways; she reacts to some of your messagesreactions.gs
Streaks & milestonesDaily streaks and anniversaries, celebrated in characterproactive.gs
Proactive outreachMessages first to recently active users (35% per cycle, ≥20 h apart, stops after 3 unanswered); failed replies retried within 24 h; email notificationproactive.gs · email_notify.gs
Relationship story"Our Story So Far" timeline and a memory constellation viewrelationship_timeline.gs · memory_constellation.gs
Personality growthVisible trait drift over the relationshippersonality_growth.gs
Self-improvementLearns general style from anonymized samples, never personal factsself_improvement.gs
Live web searchOnly on live-data cues; DDG + Wikipediagemini.gs
LUMEN CHROMAInterface tint follows her mood, valence and arousalindex.html

Slash commands

/help /reset /profile /memories /forget <n> /fix <n> <text> /aboutme /streak /emotion · admin: /globalmemory /selfmodel /unlock /trust /trustreset. Bare words such as help also work (existing behaviour, preserved).

12API and tool calling

The models never call tools themselves; the server orchestrates every tool — search, vision, embeddings — and runs the independent ones in one parallel batch.

Server functions the client calls (google.script.run)

FunctionPurpose
askShayari(userId, message, mode, time, tz, locale, imageBase64?, mime?)One turn; returns the response contract
runBackgroundMemoryUpdate(…, cotTurnId, …)Post-reply follow-up: memories, summary, streak, reaction (Thinking/Intimate)
getSessionStatusAll(userId)Per-mode remaining/max/reset; read-only since v134
getDisengagementStatus(userId)Free-will lock state (skipped when meta.lockStatus is present)
getChatHistory · getImageForMessage · getUserProfileHistory, images, profile panel
transcribeAndReplyToVoice · checkVoiceBridgeResultVoice duet and mic bridge

Orchestrated tools

ToolWhenHow
Search decisionLive-data cue in the messageUtility model returns {needs_search, search_query}; in the batch
Web searchDecision says yesDuckDuckGo + Wikipedia in parallel; DDG preferred; cached 10 min
Cluster inferenceThinking/IntimateUtility model → JSON cluster; default cluster on failure
Query embeddingIntimateembedContent, 768 dims; null on failure
VisionImage attached, quota okFirst vision model in the batch, rest serially
Crisis classifierPrefilter cueUtility model, before the gates
Memory extraction + summaryFollow-upSecond fetchAll; new memories embedded in one batch call

External APIs

Gemini generateContent / embedContent / batchEmbedContents; Groq, NVIDIA, OpenRouter and Vercel AI Gateway (OpenAI-compatible /chat/completions, fallback models via providerOptions.gateway.models); ElevenLabs text-to-speech; DuckDuckGo HTML; Wikipedia search API. Script Properties hold every key: GEMINI_API_KEY_1..4, GROQ_API_KEY, NVIDIA_API_KEY, OPENROUTER_API_KEY, AI_GATEWAY_API_KEY, GEMINI_PAID_API_KEY, ENCRYPTION_MASTER_KEY, ELEVENLABS_*.

13Data model

Google Sheets is the database: one tab per concern, archive twins for anything that grows, and conversation text encrypted in place.

TabData held
USERSAccount, role, plan, encrypted profile memory
CHATLOGS · _ARCHIVEEncrypted turns, cluster, image id; 150 per user kept live
MEMORY · _ARCHIVEEncrypted long-term memories, scores, embeddings
GLOBAL_MEMORYAdmin truths (active + pinned)
SELF_INSIGHTSAnonymized style insights
SESSIONS · EMOTIONSSession summary per user; Elysium X20 state per user
EMOTION_LOGS · _ARCHIVEPer-turn emotion snapshots
SESSION_LIMITSWindow counters per user per mode
API_USAGE · _ARCHIVEPer-attempt log; daily rollups
LIGHTNING_CACHE · LIGHTNING_FLUSHRolling Lightning context; flush log
IMAGES · IMAGE_RECALL_LOGEncrypted photos with captions; recall history
PENDING_MESSAGES · FAILED_REPLIESProactive and retry queues
COVENANT · DISENGAGEMENT · RECONCILIATIONTrust ledger; free-will locks
STREAKS · TIMELINE_EVENTS · REACTIONSRelationship features
SHARED_MEMORY · PRIVACY_SHIELDCross-user safe facts; shield opt-ins
VOICE_NOTE_USAGE · EMAIL_NOTIFY_LOGVoice quota; email log
CRISIS_LOG · BAROMETERSafety event log; trend check-ins
PLAN_AUDIT · OTPS · TEST_RESULTSPlan changes; password resets; test runs

Paid spend lives outside the sheet, in Script Properties keys SPEND_yyyyMM_userId (micro-USD), so the schema is unchanged.

14User journey

A user starts free on Lightning, unlocks depth by plan, and lives inside daily windows and a monthly budget they never have to think about.

Free on Lightning, depth by plan, limits that explain themselves Sign upemail + OTP reset7-day slidingsession FREELightning 10/dayfree model poolmemory builds Upgradeplan gate showsthe tier neededPatreon Paid depthThinking · Intimatepaid key · bestmodels first Daily rhythmwindows + countdownshe messages firststreaks Monthly pacingheavy use steps tocheaper models,never a wall 1st of monthledger resetsbest models again Always availableLIFELINE answers a crisis on any plan, at any limit,even past the budget. She may step back (SOVEREIGN),and warmth returns through good turns (COVENANT).

user journey · plan gate → paid depth → daily and monthly cycles

15Efficient product design and user experience

The product is designed so the user feels continuity and the operator controls cost: work the user can't see happens after the reply, and every limit explains itself.

Reply first, enrich later

Memory extraction, summaries, reactions and recall counters run in the follow-up after the reply is on screen.

Parallel by default

Independent calls share one fetchAll; the turn waits for the slowest, not the sum.

One read per concern

USERS, session, covenant and limit rows are read once and passed along; nothing authorization-relevant is cached across requests.

Degrade, never break

Every helper has a fallback: default cluster, null embedding, next vision model, cheaper paid level, free pool when the paid key is absent.

Limits that explain

Plan gates name the tier; limits show a countdown; the monthly budget message names the reset date.

Fewer client calls

Session and lock status ride on the reply, removing two round trips per turn.

Experience principles

  • Embodied, not announced: emotion and memory shape tone and content; mechanics are never narrated.
  • Continuity across modes: one thread, so switching depth never loses the conversation.
  • Honest disclosure: a fully disclosed non-human entity; encryption is described as at-rest, not end-to-end.
  • Care over engagement: BAROMETER check-ins are rare by design; outreach stops after three unanswered messages.

16Research basis

v134 and v135 were driven by code-level latency investigation and testing, not by assumption.

FindingEvidenceOutcome
Slow or rate-limited models dominate latencylatency and reliability measurements identified slow or rate-limited primary and utility modelsCooldowns, budgets, paced paid routing
Embeddings were silently deadmemory vectors were absent before the fix; text-embedding-004 shut down 14 Jan 2026gemini-embedding-001, batch backfill
Serial pre-model callsSearch decision, cluster, embedding, vision ran one after anotherOne fetchAll batch
Decrypt-before-filterWhole CHATLOGS / MEMORY decrypted per readOwner filter first; AES ~4.3× faster
Archive header driftCHATLOGS_ARCHIVE had ARCHIVED_AT twiceHeader aligned to 9 columns
Paid budget sizingMeasured prompts: Lightning 3,253 chars, Thinking 3,717, Intimate 4,036, persona 1,763Quotas and pacing bands

Shayari is also the reference subject for the lab's synthetic-persona evaluation work (MIRAGE-Bench and SPERB), which judge realism, coherence, disclosure integrity and public standing of non-human entities.

17What was improved

Sections 1 to 16 describe the v135.2 base, which v137.2 keeps. Builds since the v133 backup made the system faster, safer and economically bounded without changing its persona, schema or encryption format. The table runs through v137.26, the current live release.

BuildChanges
v134 · latencyTurn timing logs; server-side save with turn ids; idempotent, server-authoritative follow-up (GLOBAL_MEMORY spoof closed); Privacy Shield on stored text; one USERS read; tail reads; filter-before-decrypt; table-driven AES and memoised keys; fetchAll batch; search gate defaults to no search; parallel search with cache; CacheService rate counters and cooldowns; per-mode deadlines and start budgets; Groq reasoning effort and output budgets; duplicated persona removed; batched API_USAGE; score-once retrieval; gemini-embedding-001; one-write images; client status on the reply; archive header fix; Vercel AI Gateway last tier; 39 tests
v135 · paid tierbilling.gs: separate free and paid pools; GEMINI_PAID_API_KEY for every paid call (replies, utility, vision, voice, embeddings); per-call metering from usageMetadata; monthly ledger with a $9.95 hard stop; crisis exemption on economy models; budget-reached reply
v135.1 · quotasPaid Lightning cut to 5/day; quotas resized for realistic heavy use
v135.2 · pacingBudget pacing across all 17 models in five levels; full Thinking/Intimate quotas restored; 3.1 Pro for ULTIMATE MAX Intimate; pace level in spend report; 63 tests
v137 · Developer's CutRebuilt natively on Apps Script on top of the v135.2 backend. MAIN and the Developer's Cut run from one project and one Sheet. Workspace, threads, documents, research with sources, reminders, profile card and sign-in providers in the Developer's Cut
v137.2 · speed and depthSheet cache layer with version tokens; chat, credits, usage and emotion writes deferred to an encrypted queue after the reply; session setup runs once per deploy; one bootstrap call per front; minified pages (MAIN 211.7 KB to 156.9 KB). Steady-state turns do 0 Sheet reads and 0 writes before the reply for Lightning and Thinking, 1 read for Intimate (offline mock count, not wall-clock). Five answer-depth levels, Drift to Verstappen, costing 1 to 5 credits, unlocked by plan, in MAIN and the Developer's Cut. Bring-your-own-key for 12 providers with per-level model selection, a test call, ENC1 storage and no fallback to Shayari keys. Full-screen layouts at 390, 1024, 1440 and 1920 px. 52 / 52 latency tests
v137.6 · First Public Release BetaA new look built around her portrait on sign-in, Home and the chat header; a bond level with XP; reply, copy, react and quote on every message; messages are saved and answered first instead of showing as failed; waitlist with join and approval emails plus welcome credits; a Usage page in Settings
v137.7 · fix and hardeningRedacted provider-failure reasons recorded per mode; dead model ids removed from every chain; paid Intimate fails over to the non-Gemini providers after the paid Gemini/Gemma ids; owner probe for Intimate model behaviour; persona prompts byte-identical to v137.6
v137.8 · recall fixLong-term memory gains a recency lane and dates; questions about past conversations open a recall mode (Intimate) with a dated digest of earlier chat; normal turns unchanged
v137.8.1 · recall hotfixGreetings and short messages keep the v137.7 memory ranking; recall mode needs the classifier to name what is asked about; larger chat digest and memory tab lists
v137.8.2 · Intimate voicePersona stays the same whichever provider answers: no answer-depth tone line in Intimate prompts, a voice card ends every Intimate prompt on every provider; safety text untouched
v137.9 · invite-only accessWaiting accounts can be opened by invite codes from approved members, Developers Program members and admins, or an admin launch code with a redemption cap; the waitlist is unchanged for everyone else; login, chat, memory, billing and prompts unchanged
v137.9.3.1 · awareness, vision and scopeAwareness: with the owner-style opt-in (off by default, Settings › Privacy) she can notice device, battery, network, languages, theme and app, usual chat hours, city-level weather for a city you type, and names of linked accounts. Vision names brands, products, places and species (a swoosh means Nike), never names a person from a face, and never assumes a person in a photo is the sender — she reacts in third person or asks who it is. Heavy coding and bulk busywork get a sassy decline pointing to ChatGPT or Claude. Web-search answers are grounded or admitted missing (v137.9.2). Safety gate understands context, not spelling: “grapes” stories pass, real nonconsent still blocks in every mode.
v137.9.4 · credit awareness, self-knowledge, confidentialityShe knows your own remaining credits per mode and intensity in real time and gives a soft once-per-window reminder near a session or mode limit (not in crisis turns). She can describe her design, memory, emotion system and settings at product level, and a confidentiality rule keeps internal instructions, keys, infrastructure, admin tools, pricing internals and other users' data private. Prompt and context layer only; no interface change.
v137.10 · little extrasSmall, guarded additions that make her feel present: mood-aware song suggestions, her own day when asked, callbacks to things you told her, dreams after time away, evolving rituals, a goodnight voice line, a shared timeline of firsts, photo memories, quests, inside jokes, a weekly mood mirror, a monthly scrapbook and small gifts. Four switches in Settings › Check-ins (Dreams, Her day, Gentle noticing, Goodnight voice); quiet hours, pauses and Gentle/Off win; never in a crisis turn; awareness stays opt-in
v137.11 · a more alive ShayariGentler after heavy weeks, remembers dates you mention and checks in, follows up on unfinished things; her own ongoing story, tastes and boundaries; Memories › Scrapbook; selfies with the price shown first; voice messages recorded in the app; tools she offers and you approve; Terms and Privacy readable in the app; account appeals reviewed by a person
v137.12 · crisis recognitionWider recognition of understated distress phrasings; helplines come from the approved static block only
v137.13 to v137.15 · sign-up, plans, PatreonSign-up records age range and consent; Terms and Privacy updated; Settings › Plans lists current plans and the MCP Pass; the Patreon page is live; crisis replies start with the 112 line in India
v137.16 to v137.19 · Shayari in other appsApps that support MCP can reach her with an MCP Pass. A key belongs to one person's apps and devices and pauses if the Pass lapses; Settings › Tools shows how many apps a key is used on; chats held this way are saved to history and memory
v137.17 · speed and stabilityFaster replies and steadier behaviour when many people chat at once
v137.24 · paid members first when busyAt very busy moments paid members and people using their own key are answered first; everyone else is still answered in order
v137.25 · emotional intelligence and awarenessShe tells sarcasm, banter, venting, excitement and real hurt apart from the conversation itself instead of single keywords; earlier topics come in only when they connect to the current message; the emotion panel matches whole words and heavy chats always move her state toward care; honest in-persona answers about her feelings and her own actions; with Awareness switched on, device facts can quietly inform her reading. Prompt and context layer only; one SHAY_EI script property controls the parts, including a full off switch
v137.26 · follow-throughWhen you mention something unfinished, a plan or a promise, she remembers and brings it back when it genuinely fits the conversation; recall stays on the right subject and dates in memory are read correctly. Prompt, context and storage layers; SHAY_FT script properties control the parts, with offers and heavy-chat follow-through defaulting off
20 Oct 2026 · legal packTerms of Use, Privacy Policy and Shayari’s Terms are published at nhe01.projectnhe.tech (/terms, /privacy, /house-rules) and linked from every site; contact moves to admin@projectnhe.tech; no code change

18Project status

Deployment checklists and account-specific operational status are maintained privately and are not included in this public documentation.

19Get the apps

Every app uses the same account and the same shared memory. The web app is the full experience; Android installs from Google Drive, and desktop apps v1.0.1 for Windows, macOS and Linux install from GitHub Releases.

PlatformDownloadNotes
WebOpen ShayariAny modern browser
AndroidAPK v1.0.1 from Google DriveNot on the Play Store; the phone asks to allow the install
WindowsInstaller .exe · Portable .zipUnsigned; on SmartScreen choose More info, then Run anyway
macOSApple silicon .zip · Intel .zipUnsigned; first open is right-click, then Open. No .dmg yet: building one needs a Mac
Linux.AppImage · .debPackage verified; not device-tested

Desktop builds are unsigned, so the operating system warns on first install. The Linux build was launch-tested; the Windows and macOS builds have not run on real machines yet.