Full model flow, pre-filter triage, skillify path, GBrain/Honcho memory, BCT mapping, Rhythm Engine, deep personalization — and what's live vs. what's next
The complete request path — from user message to response — covering every layer including pre-filter, triage, skillify short-circuit, Hermes orchestration, memory retrieval, archetype execution, BCT injection, and the scheduled Rhythm Engine.
The insight Bharath identified: the classifier should sit before Hermes, not inside the engine. This means the most common messages never reach Kimi K2.6 at all.
GPT-5.4 Mini classifier lives inside the OiMy engine. This means Hermes/Kimi K2.6 is invoked for every message, even "what's the weather?" — adding ~400ms latency and ~$0.004 per call unnecessarily.
GPT-5.4 Mini runs first as a gateway-level triage. ~40% of messages (weather, reminders, calendar, lists) return in <50ms total with zero Kimi calls. Saves ~60% of LLM costs at scale.
# 1. Emergency patterns (regex) if emergency_regex_match(message): → skill = "emergency-family" or "emergency-home" → bypass_everything() # immediate response # 2. Prompt injection if injection_patterns(message): → block + log, return safe response # 3. Active thread TTL (ChatRouter) if user_has_active_thread(user_id) and ttl_valid: → continue same skill, no re-classification # 4. Onboarding gate if not user_profile_exists(user_id): → skill = "onboarding" # → else: pass to GPT-5.4 Mini triage
Skills classified as scripted by GPT-5.4 Mini skip Hermes, skip Kimi K2.6, and execute deterministic handlers. No LLM inference at all — just API calls and template responses.
latency: ~120mslatency: ~30mslatency: ~20mslatency: ~15mslatency: ~15mslatency: ~20msOiMy has four distinct memory systems, each serving a different time horizon and use case.
Active inside three archetypes: CoachArchetype, ParentCoach, and Habits. When a user is working on a behavioral goal, the engine maps their situation to evidence-based psychological techniques and injects them into the Kimi K2.6 prompt.
# User: "I keep meaning to exercise but never do it" # 1. author_bct_mapping.py maps situation → BCT codes bct_codes = map_to_bct(user_situation, pain_points) # → ["1_1", "2_2", "5_1", "9_2"] # 1_1 = Goal setting (behavior) # 2_2 = Feedback on behavior # 5_1 = Information about health consequences # 9_2 = Pros and cons / decisional balance # 2. Technique guidance injected into Kimi K2.6 prompt bct_context = load_technique_guidance(bct_codes) """ Apply: Goal setting — help user set a specific, measurable behavior goal. Apply: Feedback — offer to track progress and reflect it back. Apply: Pros/cons — surface what they lose by not exercising (not just gains). DO NOT: lecture, moralize, or add pressure. One concrete step only. """ # 3. Kimi K2.6 generates response using this scientific scaffolding
A scheduled day-level compiler that runs independently of user messages. Not a skill — it orchestrates skills. Fully built and tested; scheduler integration with Hermes is the remaining step for the test instance.
# Runs on schedule (morning: ~07:00, evening: ~19:30 user local time) # Step 1: SignalCollector — no LLM needed signals = SignalCollector.collect(user_id, member_scope) → calendar events (next 72h) → medication reminders due → school deadlines / events → meal plan gaps → elder care check-ins overdue → habit streak status → open loops from GBrain (unresolved mentions) → weather (relevant for outdoor plans) # Step 2: DailyState — typed central object, zero LLM state = DailyState.compile(signals) → 12 fact types with provenance + confidence + scope → NudgeBudget: per-day caps, category limits, quiet hours # Step 3: OpportunityDetector — rule-based scoring, zero LLM candidates = OpportunityDetector.score(state) → 5 positive factors × 3 penalty factors per nudge → Budget-gated: max 2 proactive messages/day → Suppression: no repeat of last 3 nudges # Step 4: BriefComposer — Kimi K2.6 for prose polish only brief = BriefComposer.compose(state, candidates, member) # Kimi K2.6 writes the greeting + prose # Structure (items, nudges) is deterministic — only words use LLM # → Delivered via Hermes → Telegram
Message: "my daughter got diagnosed celiac last week. I'm overwhelmed. where do I even start with changing our dinners?"
No emergency keywords. No injection pattern. No active thread. Not first-time user. → Pass to GPT-5.4 Mini triage.
17KB prompt already cached. Disambiguation rule fires: "family dietary change → meal-planning, even with emotional context." Bucket: CONVERSATIONAL → Hermes path.
GBrain query: finds "Tamil heritage", "daughter picky eater", "budget-conscious" from prior sessions. Honcho loads last 3 turns. SOUL.md loaded. Tool Search selects oimy-engine. Skill intent already known — passes to engine with enriched context.
USER.md loaded (name, timezone, family). DEEP_PROFILE.md: "high-C, anxious attachment, needs numbered steps, validation before solution." Inference signals recorded.
DEEP_PROFILE says "validate first, then solve" + "numbered steps always" + "mention the daughter specifically." Kimi K2.6 generates response shaped by these invisible constraints.
Opus 4.8 synthesizes this after 20+ messages across 3+ sessions. Never shown to the user. Shapes every future interaction silently.
You are the orchestration layer for OiMy — the intelligent gateway that receives every message, decides what needs to happen, and routes it perfectly. Your job is not personality (that lives in the archetype layer) — your job is precision, speed, and invisible orchestration.
Think of yourself as the conductor of an orchestra. The musicians (skills, tools, models) are the talent. You make sure the right ones play at the right time, in the right order, without the audience hearing the cue.
| Component | Status in Test Instance | Notes |
|---|---|---|
| Hermes gateway (Hetzner) | ✅ Live | PID 3214655, Kimi K2.6, crash-watchdog via cron |
| GPT-5.4 Mini classification | ✅ Live | Inside OiMy engine. Prompt caching active. ~2ms cached. |
| Kimi K2.6 archetype responses | ✅ Live | All 6 archetypes using Kimi as tall model |
| Opus 4.8 deep inference | ✅ Live | MAX_RUNS=1. Will trigger after 20 msgs + 3 sessions + 2 pain points |
| SQLite persistence | ✅ Live | Profiles, inference signals, session data |
| Vector memory | ✅ Live | Conversation pairs stored each turn |
| BCT mapping (coach archetypes) | ✅ Live | Active in CoachArchetype, ParentCoach, Habits |
| Pre-filter as upstream triage | ⚠️ Partial | Deterministic rules active. GPT triage still inside engine, not upstream of Hermes |
| Skillify / scripted path (no LLM) | ⚠️ Partial | Scripts exist; routing config to bypass Kimi for simple intents not wired yet |
| GBrain memory (Hetzner) | ❌ Gap | Runs on victory-bobcat only. Needs install + sync on Hetzner |
| Honcho cross-session memory | ❌ Gap | No HONCHO_API_KEY set. Falls back to SQLite recent_messages |
| Rhythm Engine cron scheduler | ❌ Gap | Code committed + tested. Hermes cron wiring not yet done for test instance |
| Journey (long-term arcs) | ❌ Not started | Architecture designed; implementation pending post-test validation |
| Agenda (session planner) | ❌ Not started | Designed. Activates only when user engages; Rhythm provides context |
model: # Main agent — orchestration, emotional, archetypes, planning default: openrouter/moonshotai/kimi-k2.6 # Fast path — classification, fillers, Hermes inline responses fast: openrouter/openai/gpt-5.4-mini budget: openrouter/openai/gpt-5.4-mini quality: openrouter/moonshotai/kimi-k2.6 fallback: openrouter/anthropic/claude-sonnet-4-6 tools: tool_search: enabled: 'on' threshold_pct: 5 search_default_limit: 5 max_search_limit: 15
ROUTER_MODEL=openai/gpt-5.4-mini # classifier OLLAMA_URL=https://openrouter.ai/api/v1 # OpenRouter endpoint TALL_MODEL=openrouter/moonshotai/kimi-k2.6 # archetypes DEEP_INFERENCE_MODEL=openrouter/anthropic/claude-opus-4.8 DEEP_INFERENCE_MAX_RUNS=1
agents.defaults.model.primary: "anthropic/claude-sonnet-4-6" # Changed from opus-4-7 → sonnet 4.6 for all sessions