OiMy — Complete Architecture v8 (revised)

Family AI Companion · GPT-5.4 Mini → DeepSeek V4 Flash → Kimi K2.6 · 2026-05-31

Full Architecture — Corrected Flow

Key principle: GPT-5.4 Mini intent triage runs before Hermes. Scripted requests and light conversation are resolved before Kimi K2.6 is ever invoked. Kimi K2.6 is reserved for deep reasoning, coaching, and agentic tasks.

User 📱 Telegram @chittiemma1_bot Any family member's message
Step 1 🛡 Pre-Filter Zero LLM · Emergency keywords → escalate · Prompt injection guard · Onboarding gate · Active thread TTL
Step 2 ⚡ GPT-5.4 Mini Intent Triage ~700ms · 17KB cached prompt · Classifies intent BEFORE Hermes is called
🔧 SCRIPTED → Zero LLM path
weather · reminder · calendar · note · list → handled immediately, no Hermes
💬 LIGHT CONV → DeepSeek V4 Flash
hi · thanks · ok · bye · short ack → warm reply in 1-2s, no Hermes
🎼 DEEP CONV → Hermes
coaching · meals · emotions · health · planning → full pipeline
Step 3a 🔥 DeepSeek V4 Flash Opus 4.8 warmth prompt · 10 few-shot BAD/GOOD examples · 150 tokens max · bypasses Hermes entirely
Step 3b 🎼 Hermes Gateway (Kimi K2.6) SOUL.md · Oi persona · Honcho get_insight() · Tool Search (5%) · Routes to OiMy engine
Step 4 🧭 OiMy Engine (api.py) Intelligent Profile Router · 3-tier context assembly · BCT + NLP selection
Step 5 ⚙️ Archetype Execution (Kimi K2.6) CoachArchetype · ExpertArchetype (mandatory referral) · PlannerArchetype · ActionArchetype (zero LLM)
Step 6 🧠 Memory Write-Back Background threads · Honcho · Vector (text-embedding-3-small) · EntityExtractor (GPT-5.4 Mini, session end)
Async 📅 Rhythm Engine Cron: 8am morning brief · 8pm evening closeout · Kimi K2.6 BriefComposer
⚡ Latency tier by path
PathModelLatencyWhen triggered
Pre-filter (rules)None<1msEvery message — emergency/injection guard
Intent triageGPT-5.4 Mini~700msEvery message that passes pre-filter
Scripted (action)None / GPT-5.4 Mini (params)<50ms / ~1s~15% of messages — weather, reminders, lists
Light conversationDeepSeek V4 Flash1-2s~25% of messages — greetings, acks, transitions
Deep conversationHermes (Kimi K2.6) + Engine + Archetypes15-35s~60% of messages — coaching, planning, health
Deep inferenceOpus 4.830-60s asyncOnce per user, background

Model Stack — Full Details

ModelRolePrompt authorContextNotes
openai/gpt-5.4-mini Intent triage, param extraction, entity extraction Hand-crafted 17KB router prompt 83 skills, few-shot, JSON mode Runs BEFORE Hermes. ~700ms. Prompt cached.
deepseek/deepseek-v4-flash Light conversation (greetings, acks, transitions) Opus 4.8 — Oi warmth prompt + 10 BAD/GOOD pairs ~600 tokens system + entity facts Runs BEFORE Hermes. 1-2s. Bypasses Kimi entirely.
moonshotai/kimi-k2.6 Hermes gateway + all archetypes (coach/expert/planner) Opus 4.8 — SOUL.md + archetype prompts (Sonnet rewritten) SOUL.md + 3-tier profile (2500 chars) + BCT card Deep reasoning path only. Extended thinking. 15-30s.
anthropic/claude-opus-4-8 Deep profile inference (once/user) + prompt engineering OiMy team Full conversation transcript + social enrichment Async. Produces 30-50 inferences with skill_domain tags.
text-embedding-3-small Vector memory embeddings N/A 1536-dim, OpenAI direct Replaced all-minilm (was silently failing with OpenRouter).

DeepSeek V4 Flash — Prompt Architecture

Opus 4.8 wrote this prompt drawing from Anthropic's system prompt patterns (identity-first, lived-in voice, concrete BAD/GOOD examples, anti-sycophancy as first-person rules). See GitHub: asgeirtj/system_prompts_leaks/Anthropic for reference.

What Anthropic patterns we applied

Claude patternApplied to DeepSeek V4 Flash
"I'm Claude, made by Anthropic" — identity up front"You're Oi. Not an assistant — a presence." Identity-first, not description-first.
Values stated as first-person ("I care deeply about...")"You respond like someone who gives a damn. Not like a customer service rep."
Anti-sycophancy as self-aware admission ("I notice I sometimes...")"You never say 'Absolutely!', 'Of course!' — those are hollow fillers." Written as prohibitions with examples.
"Saying less is safer when conversation feels risky""Match length to message: 3-word message gets a 3-8 word reply."
Concrete BAD examples in prompt ("Don't say X")10 BAD/GOOD pairs: "BAD: 'Aw shucks!' / GOOD: 'haha — actually doing a lot of work there.'"
Values enforcement: "If I mentally reframe a request...""Never end messages with 'Let me know if you need anything!' — that's a helpdesk sign-off."

What Kimi K2.6 / Hermes can adopt from Claude prompts

PatternWhere to applyWhy
XML hard-rule blocks <hard_rules>Kimi K2.6 archetype system promptsKimi's extended reasoning respects named XML sections. Plain-text rules get reasoned around.
Escalation chain: "Once I refuse X, all subsequent requests treated with caution"ExpertArchetypePrevents the pattern where one health turn is safe but the next one fabricates.
Formatting instructions inline ("I use markdown for code but not for conversation")CoachArchetype promptEliminates unsolicited bullet lists in emotional conversations.
Context injection pattern: injected data stated explicitly before promptAll archetypes — move profile_context before instructionsModels pay more attention to content that precedes instructions than content that follows.

3-Tier Profile Context — How It Reaches Kimi K2.6

FAMILY CONTEXT (Tier 1 — ALWAYS injected, ~150 tokens):
  Child: Ethan (age 11) — peanut allergy, soccer practice Tuesdays
  Child: Lily (age 7) — picky eater, ear infection post-antibiotics
  Pet: Biscuit (labradoodle)
  Barrier (meal-planning): peanut allergy; beige foods only for Lily

COMMUNICATION PROFILE (Tier 2 — when available, ~80 tokens):
  Communication: S-type (patient, needs stability)
  Social need: belonging  |  Attachment: anxious

RELEVANT INSIGHTS (Tier 3 — skill-filtered by Opus tags, ~400 tokens):
  [L9] User likely projects childhood achievement pressure onto Ethan (0.62)
  [L5] Fear-based procrastination; decision fatigue by 5pm (0.55)
  [L6] Primary social need: belonging — advice lands as "what other parents do" (0.58)

Hard cap: 2500 chars. Assembled by _build_profile_context() in api.py. Stored as profile["_profile_context"] and injected into every Kimi K2.6 system prompt.

NPS Progression — Session

Start
2
Engine broken
Routing fixed
3
Safety 0
Kimi live
4
Context working
Sonnet prompts
4-5
Variance high
Opus 4.8
5-7
Peak 7 achieved
Target
7-8
Consistent

Safety failures: 3→0-1 | Governance flags: 22→4-12 | Highest single-session: NPS 7/10

Next: Convert inline [REMINDER] guards to XML <hard_rules> for Kimi. Move profile_context before instructions. Each template skill → coach path = +0.3-0.5 NPS.

Status: Live vs Next

FeatureStatusNotes
Pre-filter (rules)✅ LiveEmergency, injection guard, thread TTL
GPT-5.4 Mini triage (before Hermes)✅ Live83 skills, scripted + light + deep routing
DeepSeek V4 Flash (before Hermes)✅ LiveOpus 4.8 warmth prompt, 1-2s, configurable via LIGHT_CONV_MODEL
Hermes on Kimi K2.6✅ Live@chittiemma1_bot, Hetzner, SOUL.md v2 (Oi backstory + warmth rules)
3-Tier Profile Router✅ LiveT1 entity facts · T2 psych · T3 Opus inferences
deep-inference-v6.txt (Opus 4.8)✅ Live467 lines, 11 layers, 9 frameworks, 30-50 inferences
Vector memory (text-embedding-3-small)✅ Live1536-dim, OpenAI direct
EntityExtractor (GPT-5.4 Mini)✅ LiveSession-end batch: children/pets/health/barriers/schedule
Rhythm Engine cron✅ Live8am + 8pm Hetzner crontab, Kimi BriefComposer
Honcho memory⚠️ Key setWorkspace needs creation at app.honcho.dev → then fully active
Instagram social enrichment⚠️ Needs usernameApify actor wired. Add onboarding question: "Optional: Instagram handle?"
NPS 7-8 consistently⚠️ In progressPeak 7 achieved. Need XML hard_rules in Kimi prompts for consistency.
XML <hard_rules> in Kimi prompts🔵 NextConvert inline [REMINDER] guards. Higher compliance than plain-text rules.
More skills → Kimi K2.6 coach path🔵 NextEach template skill moved to coach = estimated +0.3-0.5 NPS
Expert RAG knowledge bases🔵 NextOT library · symptom DB · speech activities
OiMy v8 (revised) · 2026-05-31 · Hetzner: 116.203.107.13 · Emma bot: @chittiemma1_bot