OiMy — Complete Architecture v8

Family AI Companion · Kimi K2.6 + DeepSeek V4 Flash + GPT-5.4 Mini + Opus 4.8 · Updated 2026-05-31

What Changed in v8

✅ 15 Bugs Fixed This Session

#BugFix
1zero.yaml workflow_type: monitor→ expert
2active_thread stuck across sessions (reset 401)JWT auth on reset + NO_THREAD_SKILLS set
3Router model gemma4:e4b (Ollama local)openai/gpt-5.4-mini
4ChatRouter trapped in previous skill for 300sLLM overrides thread at conf≥0.70
5PlannerArchetype travel fields in meal-planningSkill-scoped constraint checks
6CoachArchetype.generate_tall_model_response was a stubNow actually calls Kimi K2.6
7REQUEST_BUDGET_S = 8s (Kimi needs 15-30s)→ 90s
8Circuit breaker threshold = 3→ 10, cooldown 120s
9honcho + vector_memory blocking 25sBackground daemon threads
10OLLAMA_BASE_URL masked OpenRouter detectionOnly check OLLAMA_URL
11ActionArchetype extract_params 404Use OpenRouter /chat/completions with GPT-5.4 Mini
12Entity extraction reading non-existent messages table→ recent_messages
13Kimi K2.6 reasoning leaking into responsesDon't use reasoning field as fallback
14Name extractor grabs child names (Hi Lily!)Guard: only extract if user explicitly introduces themselves
15Reminder dates show raw ISO timestampsNatural language: "tomorrow at 3pm"

🆕 New Features Deployed

FeatureDescription
DeepSeek V4 FlashLight conversation fast path (1-2s). Greetings/acks routed here instead of Kimi K2.6 (15-30s). Opus 4.8-written warmth prompt with 10 few-shot examples.
3-Tier Profile InjectionT1: entity facts (always) · T2: psych constants (always if available) · T3: Opus-tagged inferences (skill-filtered). Hard cap 2500 chars.
Vector Memory → OpenAItext-embedding-3-small (1536-dim, direct OpenAI API) replacing all-minilm via Ollama (was silently failing)
EntityExtractorGPT-5.4 Mini batch at session end. Extracts: children, pets, health context, schedule events, specific barrier values, preferences.
Intelligent Profile Routerget_inferences_for_skill() filters Opus 4.8-tagged inferences by skill_domain. No static maps.
Social Enrichment (stub)Apify Instagram actor wired. Schema ready for LinkedIn/Instagram/Twitter. Needs username at onboarding.
Rhythm Engine cronMorning brief (8am) + evening closeout (8pm) via Hetzner crontab.
Hermes SOUL.md v2Oi's backstory, anti-sycophancy rules (8 hard rules), warmth calibration (7 rules), opinion-holding, 4 relationship modes. Written/deployed to Hetzner.
deep-inference-v6.txtOpus 4.8 rewrite: 467 lines, 11 layers, 9 frameworks (Chase Hughes/Enneagram/DISC/OCEAN/Attachment/Maslow/TTM/Bowen/Hofstede), 30-50 inferences, cross-domain tags.
Universal health referralAll archetypes: when health keywords detected in user message, inline REMINDER injected to force professional referral.
Child safety guardKimi K2.6 explicitly prohibited from suggesting unsafe child activities, phone-while-driving, fabricating medical facts.
LIGHT_CONV_MODEL env varConfigurable light conversation model. Default: deepseek/deepseek-v4-flash.

NPS Progression — This Session

Run 1
2
401 auth, engine broken
Run 2
2
Monitor catch-all bug
Run 3
3
Routing fixed
Run 4
3
Kimi timed out
Run 5
4
Kimi K2.6 live
Sonnet 4.6
4
Prompts rewritten
Opus 4.8
5-7
Variance; target: 7+ consistent
Safety failures: 3 → 0-2 | Governance flags: 22 → 4-18 (avg ~10)
Turns scoring rel=4-5 appear in every session. Variance is the remaining challenge — sessions with health/symptom topics still risk safety flags.

Full Architecture Diagram

📱 User — Telegram @chittiemma1_bot
🛡 Pre-Filter Zero LLM · emergency keywords · active thread TTL · prompt injection guard
🎼 Hermes Gateway Kimi K2.6 · SOUL.md (Oi persona, warmth rules, anti-sycophancy)
Honcho get_insight() · Tool Search (5%) · GPT-5.4 Mini fast-path for simple acks
↓ POST /chat
⚡ Intent Triage GPT-5.4 Mini · 17KB cached · ~700ms
🔧 SCRIPTED: weather/reminder/calendar/list → deterministic (zero LLM)
💬 LIGHT: hi/thanks/ok/bye → DeepSeek V4 Flash (1-2s, Opus warmth prompt)
🎼 CONVERSATIONAL: coaching/meals/emotions/planning → full pipeline
↓ conversational
🧭 Intelligent Profile Router v8 — Opus-tagged, not static
T1 entity facts · T2 psych constants · T3 top-5 Opus inferences (filtered by skill_domain)
↓ profile_context (2500 char cap) + BCT + user message + inline safety reminders
⚙️ Archetype Execution Kimi K2.6 · 150 word max · direct-first · no "tell me more" loops
CoachArchetype · ExpertArchetype (mandatory referral) · PlannerArchetype · ActionArchetype (zero LLM)
🗺 BCT + NLP Selection Zero LLM · 1800-row dict · barrier × stage × need × style
↓ response → Hermes → Telegram
🧠 Memory Write-Back Background threads · non-blocking
Honcho · Vector (text-embedding-3-small, 1536-dim) · EntityExtractor (GPT-5.4 Mini, session end)
Opus 4.8 deep inference (once, async) — 30-50 inferences, all layers tagged
📅 Rhythm Engine 8am brief · 8pm closeout · Kimi K2.6 BriefComposer

Model Stack

LayerModelViaLatencyWhere
Hermes Gatewaymoonshotai/kimi-k2.6OpenRouter15-30sInside Hermes (SOUL.md persona)
Intent Triage / Routeropenai/gpt-5.4-miniOpenRouter~700msInside OiMy engine
Light Conversationdeepseek/deepseek-v4-flashOpenRouter1-2sInside OiMy engine (NOT Hermes) — bypasses archetypes entirely
CoachArchetypemoonshotai/kimi-k2.6OpenRouter15-30sInside OiMy engine
ExpertArchetypemoonshotai/kimi-k2.6OpenRouter15-30sInside OiMy engine (mandatory referral rule)
PlannerArchetypemoonshotai/kimi-k2.6OpenRouter15-30sInside OiMy engine
ActionArchetypeNone / GPT-5.4 Mini (param extraction)OpenRouter<1s / 1sInside OiMy engine — deterministic first
Deep Profile Inferenceanthropic/claude-opus-4-8OpenRouter30-60s asyncInside OiMy engine — once per user
Entity Extractionopenai/gpt-5.4-miniOpenRouter~2s batchInside OiMy engine — session end
Vector Embeddingstext-embedding-3-smallOpenAI direct~200msInside OiMy engine
QA Evaluator (testing)gpt-5.5OpenAI directTest harness only
Simulated User (testing)x-ai/grok-4.3OpenRouterTest harness only

Anthropic Prompt Insights → Applied to OiMy

What Claude's system prompts teach us about Kimi K2.6

Claude PatternApplied in OiMy
XML hard-rule blocks <critical_child_safety_instructions>Implemented as inline [REMINDER: ...] blocks injected into user message. Next iteration: convert to XML tags which Kimi K2.6 reasoning respects more strongly.
"Saying less is safer when risky/off"Added to CoachArchetype: 150 word max, one focused idea beats bullet list
Positive + negative examples togetherOpus 4.8 wrote 10 BAD/GOOD pairs for DeepSeek V4 Flash warmth prompt
Explicit refusal escalation chainExpertArchetype: emergency → safety gate → high risk → low risk, each with distinct response pattern
Step-by-step reasoning encouragedKimi K2.6 extended reasoning already provides this natively
Product identity separation (who Claude is vs what it can do)Hermes SOUL.md separates Oi's identity (backstory, values) from capabilities (skills list)

Recommendation: Convert Kimi K2.6's safety rules to XML format (<hard_rules>) — extended reasoning models respect named XML sections more reliably than plain-text paragraphs buried in long prompts.

Status: Live vs Next

FeatureStatusNotes
Intent triage (GPT-5.4 Mini)✅ Live83 skills, 17KB cached prompt
Hermes on Kimi K2.6✅ LiveHetzner + @chittiemma1_bot
DeepSeek V4 Flash light path✅ LiveOpus 4.8 warmth prompt, configurable via LIGHT_CONV_MODEL
CoachArchetype → Kimi K2.6✅ Live150 word max, direct-first, context injection
ExpertArchetype → Kimi K2.6✅ LiveMandatory professional referral rule
deep-inference-v6.txt (Opus 4.8)✅ Live467 lines, 11 layers, 9 frameworks
3-Tier Profile Router✅ Liveget_inferences_for_skill() + skill_domains
Vector memory (OpenAI embeddings)✅ Livetext-embedding-3-small, 1536-dim
EntityExtractor✅ LiveGPT-5.4 Mini batch, children/pets/health/barriers
Rhythm Engine cron✅ Live8am + 8pm Hetzner crontab
Honcho memory⚠️ Key setWorkspace needs creation at app.honcho.dev
Social enrichment (Instagram)⚠️ StubApify actor wired; needs username at onboarding
NPS 7-8 consistently⚠️ In progressPeak 7, avg ~5. Safety flags still inconsistent.
XML safety tags for Kimi K2.6🔵 NextConvert inline [REMINDER] to XML hard_rules blocks
Expert RAG (vector KB)🔵 NextOT library · symptom DB · speech activities
More skills → Kimi K2.6🔵 NextEach template skill → coach = +0.3-0.5 NPS
OiMy Architecture v8 · 2026-05-31 · Hetzner: 116.203.107.13 · Emma bot: @chittiemma1_bot · 10 bugs fixed, NPS 2→7 this session