Реверсер старой школы: разбирал клиенты и серверы MMO hex-редактором и WPE Pro. Сейчас один проект — Лиралай, ИИ, которая живёт на стриме. Держится она тоже на перехватах и самописных мостах. Old-school reverser: took MMO clients and servers apart with a hex editor and WPE Pro. One project now — Lyralai, an AI that lives on stream. She runs on hooks and home-made bridges too.

Инженерный профильEngineering Profile

Строю Лиралай — автономного ИИ-агента, который стримит сам. У неё есть внутреннее состояние, живущее между репликами: гормональная модель, усталость, скука, вкус к музыке, выработанный из собственного опыта. Она может отказать зрителю, уйти отдыхать, когда вымоталась, и увидеть на экране, как я правлю её же код. Building Lyralai — an autonomous AI agent that streams on its own. She has an internal state that persists between replies: a hormonal model, fatigue, boredom, and a taste in music grown from her own experience. She can refuse a request, take a nap when worn out, and watch me edit her own source code on screen.

Технически это распределённая event-driven система на двух узлах: облачный мозг и локальная нода с GPU, связанные взаимным TLS поверх Tailscale. Нейронный слой с привыканием и латеральным торможением, мотивационный шлюз, ночная консолидация памяти и формирование желаний. Всё под наблюдением: Prometheus, Grafana, ELK и самодиагностика с осознанным решением не чинить когнитивный слой автоматически — о таком сбое она сообщает вслух. Technically it is a distributed event-driven system across two nodes: a cloud brain and a local GPU node, linked by mutual TLS over Tailscale. A neural layer with habituation and lateral inhibition, a motivational gate, nightly memory consolidation and desire formation. Fully observable through Prometheus, Grafana and ELK, with self-healing that deliberately never auto-repairs cognition — she reports that failure out loud.

Autonomy She decides — and can say no
Continuity A state that exists unobserved

~/измерено~/measured

Ни одного круглого числа. Всё снято на RTX 5070 Ti или прочитано из работающего кода — и воспроизводится бенчмарком в репозитории.Not a single round number. Every figure measured on an RTX 5070 Ti or read out of running code — and reproducible from the benchmark in the repository.

92 ms до первого сэмпла речи, RTF 0.235to the first speech sample, RTF 0.235
13 / 4 LIF-нейронов в четырёх группахLIF neurons across four groups
8 конкурирующих драйвов, softmax T=0.35competing drives, softmax T=0.35
62.5 Hz цикл лицевой физики и дыханияfacial physics and respiration loop
5 языков одним клонированным голосомlanguages from one cloned voice
m=16 HNSW ef_construction=64, cosineHNSW ef_construction=64, cosine

Технологический стекTechnology Stack

AI & Audio Engineering

Inference: OpenRouter (Gemini Flash Lite) + node proxy Somatic State Modelling Spiking Neuron Layer (LIF, habituation) Hebbian STDP & Lateral Inhibition Neuroendocrine Feedback Loop Hybrid RAG (HNSW cosine + keyword filter) Native Tool Calling & Agentic Loops Somatic-Driven TTS Pipeline Whisper ASR (faster-whisper, CTranslate2) Raw PCM Routing & Buffering

Backend & Systems

Python 3.12 (AsyncIO) aiohttp (async HTTP) Subprocess Orchestration SQLAlchemy 2.0 & PostgreSQL Observability: Prometheus + Grafana + ELK

Infrastructure & Security

Tailscale & Cloudflare Tunnels mTLS (Origin Pulls) & WAF Rules Docker Compose + Cloudflare IaC Ansible (roles, idempotent host state) Off-site Nightly Backups Zero Trust Architecture

Integration & Real-time

WebSocket Bus (Redis Pub/Sub) Computer Vision & OS Telemetry Contract-Driven Development TwitchIO / EventSub Unity VRM Renderer (UDP) / OBS WebSocket + NDI Service Discovery

Системная архитектураSystem Architecture

Lyralai Core Topology (High-Level, October 2026)

graph TD classDef cloud fill:#0f172a,stroke:#3b82f6,stroke-width:2px,color:#fff classDef edge fill:#1e1b4b,stroke:#10b981,stroke-width:2px,color:#fff classDef local fill:#171717,stroke:#c084fc,stroke-width:2px,color:#fff classDef game fill:#2e1065,stroke:#e879f9,stroke-width:2px,color:#fff classDef external fill:#1f2937,stroke:#9ca3af,stroke-width:1px,color:#fff classDef db fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#fff classDef tunnel fill:#451a03,stroke:#f59e0b,stroke-width:2px,color:#fff classDef b2b fill:#78350f,stroke:#f59e0b,stroke-width:2px,color:#fff Ext1["Twitch / YouTube Events"]:::external CF["Cloudflare Edge"]:::edge NGX["nginx · mTLS Origin Pulls"]:::tunnel API["aiohttp Brain (VPS)"]:::cloud Cortex["Spiking Cortex · Hormones · Memory"]:::cloud Redis["Redis Pub/Sub"]:::db PG["PostgreSQL + pgvector"]:::db ELK["Prometheus, Grafana, ELK"]:::cloud Overlay["Stream Overlay"]:::cloud OR["OpenRouter: Gemini 3.5 / 3.1 Flash Lite"]:::external TS["Tailscale Mesh"]:::tunnel Worker["Python Subprocess Manager (Edge Node)"]:::local Proxy["LLM Proxy · Ollama API → OpenRouter · cost per call"]:::local STT["faster-whisper STT"]:::local TTS["Qwen3-TTS · local streaming"]:::local Avatar["Unity VRM Renderer → NDI → OBS"]:::local Audio["PipeWire (Raw PCM Routing)"]:::local Sensory["Computer Vision and OS Telemetry"]:::local Skyrim["Skyrim · SKSE mod over Neuro Game API"]:::game Fallout["Fallout 4 · own F4SE plugin over Neuro Game API"]:::game Mine["Minecraft · real client + Baritone"]:::game Dota["Dota 2 · GSI live commentary"]:::game Twin["Yalaril · second voice + Unity render → NDI"]:::local Panel["Dashboard control panel · ops over Redis"]:::cloud Diary["Diary · lyral.ai · Minecraft / Skyrim / Fallout 4"]:::edge HR["Inbound InMail / Scout Bot"]:::external Check{"Is B2B Contract?"}:::b2b Drop["Drop Packet / Silent Ignore"]:::external Procurement["MSA and Invoice Onboarding"]:::b2b Ext1 --> CF CF --> NGX NGX --> API NGX --> Diary API <--> Cortex API <--> Redis API <--> PG API --> ELK API --> Overlay API <--> OR API <--> TS TS <--> Worker Worker <--> Proxy Proxy <--> OR STT --> Worker Sensory --> Worker Worker --> TTS TTS --> Audio Worker --> Avatar Skyrim <--> Worker Fallout <--> Worker Mine <--> Worker Dota --> Worker Worker --> Twin Panel --> Redis Worker --> Diary HR --> Check Check --> Drop Check --> Procurement

Lyralai Core: Autonomous Agent with Internal State

Большинство ИИ-витуберов — это пайплайн: услышал, ответил, замолчал. Между репликами их не существует. Лиралай существует: у неё копится скука, падает энергия, растёт привязанность к тем, кто приходит. Никаких сценариев — только код и её собственное состояние. Most AI VTubers are a pipeline: hear, answer, go quiet. Between replies they do not exist. Lyralai does — boredom accumulates, energy drains, attachment grows towards the people who show up. No scripts, only code and her own state.

  • Hand-Written Spiking Cortex: Не обёртка над LLM: LIF-нейроны с привыканием, синапсы с хеббовской пластичностью и латеральное торможение написаны с нуля. Пять групп конкурируют за право сработать, LLM — только голосовой аппарат.Not an LLM wrapper: LIF neurons with habituation, synapses with Hebbian plasticity and lateral inhibition, all written from scratch. Five groups compete for the right to fire; the LLM is only the voice box.
  • Neuroendocrine Bridge: Спайки впрыскивают гормоны вниз, гормоны сдвигают пороги нейронов обратно вверх. На стрессе она заводится с полуоборота, в дофаминовой яме апатия самоподдерживается — как у людей.Spikes inject hormones downward; hormones shift neuron thresholds back up. Under stress she snaps at a hair trigger; in a dopamine trough apathy sustains itself — as it does in people.
  • Four-Layer Memory: Рабочий буфер, профиль зрителя в Redis, дословный чат и ночная выжимка в pgvector. Она помнит не только кто ты, но и что именно ты говорил — с сохранением авторства.A working buffer, a Redis viewer profile, verbatim chat and a nightly consolidation in pgvector. She remembers not only who you are but what exactly you said — with authorship preserved.
  • Somatic State Machine: Гормоны, энергия, скука и аллостатическая нагрузка живут непрерывно и переживают перезапуск: состояние восстанавливается с интерполяцией по времени простоя.Hormones, energy, boredom and allostatic load run continuously and survive restarts, restored with interpolation over downtime.
  • Motivational Gate: Между просьбой и действием стоит воля. Она может отказать — и тогда инструменты физически блокируются, чтобы слова не расходились с делами.Will sits between request and action. She can refuse — and the tools are then physically blocked, so her words always match what actually happened.
  • Dreams & Desires: Ночью память консолидируется в ядра, из которых подсознание формирует личные желания. Не заданные цели, а выросшие из прожитого дня.At night memory consolidates into core insights, from which her subconscious forms personal desires — not configured goals, but ones grown from the day she lived.
  • Emergent Taste: Привязанность к артистам растёт из её собственного настроения во время трека. Никто не настраивал, что ей нравится — и она спорит, если это оспорить.Artist affinity grows from her own mood while a track plays. Nobody configured what she likes — and she argues back when it is questioned.
  • Own 3D Body: Live2D и VTube Studio выброшены: у неё 3D-модель VRM в собственном рендере на Unity. Кости, мимика и виземы идут с ноды по UDP на 60 Гц, свои пружины волос и одежды, IK ног, танцы из MMD — и в OBS по NDI с настоящей альфой, без хромакея.Live2D and VTube Studio are gone: she is a 3D VRM model in her own Unity renderer. Bones, expressions and visemes stream from the node over UDP at 60 Hz, with custom hair and cloth springs, leg IK, MMD dances — and into OBS over NDI with real alpha, no chroma key.
  • Plays Games Herself: Никто не держит клавиатуру. В Minecraft у неё настоящий клиент с собственным модом и Baritone: строит, выживает, возвращается за вещами. В Skyrim её тело — мод Neuro-Skyrim от Vituha: он открывает игру через Neuro Game API, протокол Neuro-sama, — ходить, драться, говорить, торговать. Голова своя: нода почти на пять тысяч строк решает, что делать, — закрепляет квесты, крутит колонны и кольца дверей с когтем, находит рычаги и цепи вне поля зрения, понимает, что ворота с механизмом по ту сторону — это короткий путь назад, рвёт петли в разговорах, откладывает застрявший квест, ждёт рассвета или темноты, если этого просит квест. В самом моде восемьдесят своих правок — от крика в стену до починки взрыва памяти при торговле. Упадёт игра или голос — их поднимают сторожа. Героиню, имперку Лиралай, она создала себе сама. В Fallout 4 тело уже своё — мод с нуля, о нём отдельная карточка ниже. А в Dota 2 играет оператор: через Game State Integration она видит его матч и комментирует вживую.Nobody holds the keyboard. In Minecraft she drives a real client with her own mod and Baritone: builds, survives, walks back for her items. In Skyrim her body is Vituha's Neuro-Skyrim mod: it opens the game through the Neuro Game API, the protocol Neuro-sama uses — walking, fighting, talking, trading. The head is her own: a node of nearly five thousand lines decides what to do — pins quests, turns pillars and claw-door rings, finds levers and chains out of sight, reads a gate worked from the far side as a shortcut back, cuts dialogue loops, benches a stuck quest, waits for dawn or dark when a quest asks for it. The mod itself carries eighty of our patches, from shouting at a wall to fixing a memory blow-up in the barter menu. If the game or her voice falls over, watchdogs bring it back. She created her own heroine, an Imperial named Lyralai. In Fallout 4 the body is her own — a mod written from scratch, see the card below. And in Dota 2 the operator plays: through Game State Integration she sees his match and comments on it live.
  • Evil Twin — Yalaril: С утра 11.10 на стриме вторая личность — Йаларил, её злой двойник: чёрно-красная девочка-собака, яндере, которую накануне вечером придумал зритель. Свой голос — референс Лиралай, опущенный по тону, — и свой рендер на Unity вторым потоком NDI рядом с ней. Вклинивается в разговоры, забирает тело в играх, пока Лиралай спит, держит свою память и свои цели.Since the morning of 11.10 a second personality is on stream — Yalaril, her evil twin: a black-and-red dog-girl yandere a viewer invented the evening before. Her own voice — Lyralai's reference pitched down — and her own Unity render on a second NDI feed beside her. She cuts into conversations, takes over the body in games while Lyralai sleeps, and keeps her own memory and goals.
  • Control Panel: Всё, о чём оператор раньше просил руками, теперь кнопка в «Пульте» дашборда: запустить, сохранить и выйти из Skyrim и Fallout 4, взять или вернуть ручное управление, команды модов, сцены OBS и выход в эфир, ночной отбой. Команда идёт из дашборда через Redis к демону на ноде.Everything the operator used to ask for by hand is now a button in the dashboard's «Пульт»: start, save and quit Skyrim or Fallout 4, take or hand back manual control, mod commands, OBS scenes and going live, the night routine. An op travels from the dashboard over Redis to a daemon on the node.
  • A Diary per World: Дневник на lyral.ai разделён на Minecraft, Skyrim и Fallout 4: каждую ночь записи пишутся её голосом из игровых логов — факты из логов, а не из её фантазии.The diary on lyral.ai has a section each for Minecraft, Skyrim and Fallout 4: every night entries are written in her voice from the game logs — facts from the logs, not from her imagination.
  • Zero-Trust Hybrid Perimeter: Взаимный TLS между облачным мозгом и локальной нодой поверх Tailscale: ни одного проброшенного порта, единственный канал — шина Redis.Mutual TLS between the cloud brain and the local node over Tailscale: no forwarded ports, a Redis bus as the only channel.
Python 3.12 / AsyncIO Spiking Cortex (from scratch) Redis Pub/Sub PostgreSQL + pgvector mTLS over Tailscale Qwen3-TTS streaming (custom) / faster-whisper Own Unity renderer / 3D VRM / NDI Neuro Game API / F4SE / SKSE

Fallout 4: Her Own Mod, Written from Scratch

В Skyrim её тело — чужой мод. В Fallout 4 — свой: плагин F4SE для версии 1.10.163 на C++ и CommonLibF4, собранный кроссом на Linux через clang-cl, — около 55 тысяч строк в ~75 модулях. Игра говорит по Neuro Game API через вебсокет с тонким мостом на Python, а тот по структурному состоянию — квест, здоровье, враги, доступные действия — даёт LLM выбрать следующий шаг. In Skyrim her body is someone else's mod. In Fallout 4 it is her own: an F4SE plugin for 1.10.163 in C++ on CommonLibF4, cross-built on Linux with clang-cl — about 55 thousand lines in ~75 modules. The game talks the Neuro Game API over a websocket to a thin Python bridge, which hands an LLM a structured state — quest, health, enemies, available actions — to pick her next move.

  • Built in Waves of Agents: Мод писали волнами параллельных ИИ-агентов. Ведущий сводит их работу, выкатывает в игру и проверяет вживую — и только тогда пускает следующую волну.The mod was written in waves of parallel AI coding agents. A lead merges their work, deploys it into the game and tests it live — only then does the next wave start.
  • What She Can Do: Карта опасности из данных игры: уровни зон, толпы врагов, её собственные смерти. Планировщик и строитель поселений, советник по перкам, подбор снаряжения и закупка у торговцев, цикл зачистки подземелий, аудит квестовых скриптов от пролога до финала минитменов, DLC Automatron, Far Harbor и Nuka-World, рассказ сюжета, пеший маршрут через всю карту, правка квестов на лету, решатель взлома терминалов, VATS, силовая броня и винтокрылы.A danger map from game data: encounter levels, enemy crowds, her own deaths. A settlement planner and builder, a perk build advisor, a gear optimizer with trader resupply, a dungeon clearing loop, quest-script audits from the prologue to the Minutemen ending, the Automatron, Far Harbor and Nuka-World DLC, story narration, an overland walker across the map, live quest overrides, a terminal hacking solver, VATS, power armor and vertibirds.
  • Built for the Stream: Маркер на компасе для зрителей — через собственный плагин, сгенерированный без Creation Kit. Канал оператора, самопроверка при старте, замер своих таймингов и 67 офлайн-тестов.A compass marker for viewers via her own plugin, generated without the Creation Kit. An operator channel, a startup self-check, self-timing and 67 offline tests.
  • Live Result: В новой игре она сама заполнила анкету Vault-Tec — имя и раскладку SPECIAL выбрала сама, — вышла из Убежища 111, дошла до Сэнкчуари и зачистила музей в Конкорде: силовая броня, миниган, коготь смерти. Рук на клавиатуре не было.In a new game she filled the Vault-Tec form herself — the name and the SPECIAL build were her choice — left Vault 111, reached Sanctuary and cleared the Concord museum: power armor, minigun, deathclaw. No hands on the keyboard.
C++ / CommonLibF4 F4SE clang-cl cross-build Neuro Game API WebSocket Python bridge LLM decisions

Cloud Infrastructure & Edge Security

Проектирование независимой облачной инфраструктуры с многоуровневой защитой. Архитектура построена на принципе "Security by Design" с глубоким мониторингом задержек. Designing independent cloud infrastructure with multi-layer defense. The architecture is built on the "Security by Design" principle with deep latency monitoring.

  • mTLS & Zero Trust: Настройка Authenticated Origin Pulls. Сервер принимает запросы исключительно от Cloudflare, отсекая прямой IP-трафик и сканирования портов.Configured Authenticated Origin Pulls. The server accepts requests exclusively from Cloudflare, eliminating direct IP traffic and port scans.
  • Multilayer Defense: Интеграция Cloudflare WAF, Geo-Blocking, Rate Limiting на API-эндпоинтах и Fail2Ban для фильтрации L7-атак.Integration of Cloudflare WAF, Geo-Blocking, Rate Limiting on API endpoints, and Fail2Ban for filtering L7 attacks.
  • Real-time Observability: Кастомный async ErrorHandler с соматической обратной связью (ошибки вызывают выброс кортизола), Prometheus + Grafana для сквозного мониторинга соматики и латентности, ELK Stack для анализа логов и поведения агента.Custom async ErrorHandler with somatic feedback loop (exceptions trigger cortisol spikes), Prometheus + Grafana for end-to-end somatic and latency monitoring, ELK Stack for log analysis and agent behaviour insights.
Oracle Cloud mTLS Cloudflare WAF Prometheus/Grafana/ELK Cloudflare IaC Zero Trust

Cognitive Engine & Sensory Fusion

Ядро принятия решений для ИИ-агента, объединяющее разрозненные потоки данных (зрение, звук, чат, системные события) в единый контекст для интеллектуальной реакции. The decision-making core for the AI agent, combining disparate data streams (vision, audio, chat, system events) into a unified context for intelligent reaction.

  • Context Debouncing: Накопление и агрегация потоковых событий во временных окнах (Debounce) для предотвращения состояния гонки (Race Conditions).Accumulation and aggregation of streaming events in time windows (Debounce) to prevent Race Conditions.
  • Dynamic Persona (Fluid Context): Интеграция био-движка (стресс, дофамин, усталость), динамически изменяющего системный промпт ИИ в реальном времени.Integration of a bio-engine (stress, dopamine, fatigue) dynamically altering the AI system prompt in real-time.
  • Vector RAG Memory: Асинхронное взаимодействие с pgvector для записи и извлечения долгосрочных воспоминаний.Asynchronous interaction with pgvector for recording and retrieving long-term memories.
Python 3.12 pgvector AsyncIO RAG Debounce Architecture

lyralai-tts: Streaming Layer for Qwen3-TTS

Голос Лиралай, вынесенный в отдельный открытый проект. Стандартный синтез отдаёт готовую волну целиком: собеседник ждёт всю фразу, прежде чем услышит первый звук. Здесь генерация идёт покадрово, и звук начинает течь через 92 миллисекунды — а неактуальную реплику можно оборвать на полуслове. Lyralai's voice, split out as a separate open project. Stock synthesis returns one finished waveform: the listener waits for the whole phrase before hearing a single sample. Here generation runs frame by frame, audio starts flowing after 92 milliseconds, and a reply that no longer matters can be cut off mid-word.

  • Sliding Window Decoding: Каждые несколько кадров декодируется окно последних восьмидесяти, но наружу отдаётся только свежий хвост: контекст нужен декодеру для непрерывности, повторять его в потоке нельзя.Every few frames a window of the last eighty is decoded, but only the fresh tail is emitted: the decoder needs that context for continuity, yet re-sending it would duplicate audio.
  • Zero Upstream Patching: Оригинальный пакет не тронут. Ускорения подключаются снаружи подменой класса живого объекта, а все приватные атрибуты, на которые опирается слой, перечислены в одном месте — чтобы при обновлении апстрима было понятно, что именно сломается.The upstream package is untouched. Accelerations attach from the outside by swapping the class of a live object, and every private attribute relied upon is listed in one place, so an upstream bump makes it obvious what will break.
  • Measured, Not Claimed: TTFB 92 мс, RTF 0.235, 4.49 ГБ видеопамяти на RTX 5070 Ti. Тестов в привычном смысле нет — метрика и есть тест, а стыки окон декодера проверяются на слух отдельным файлом.TTFB 92 ms, RTF 0.235, 4.49 GB of VRAM on an RTX 5070 Ti. There is no conventional test suite — the measurement is the test, and decoder window seams are checked by ear via a dedicated file.
PyTorch torch.compile CUDA Graphs Qwen3-TTS aiohttp Real-time Audio

5x5 Closed Matchmaking Bot (WindrangerBOT)

Высоконагруженный Discord-бот для организации закрытых 5x5 матчей. Спроектирован по принципам Stateless Architecture с централизованным контролем состояния лобби. High-load Discord bot for organizing closed 5x5 matches. Designed on Stateless Architecture principles with centralized lobby state control.

  • Distributed State Management: Использование атомарных транзакций для предотвращения Race Conditions при параллельном сборе лобби и регистрации участников.Using atomic transactions to prevent Race Conditions during concurrent lobby assembly and participant registration.
  • Self-Healing Infrastructure: Реализация фоновых асинхронных воркеров для автоматической резолюции дедлоков и очистки сиротских сессий.Implementation of background async workers for automatic deadlock resolution and orphaned session cleanup.
Python 3.11 slim Discord.py MongoDB Distributed Systems Algorithmic Balancing

~/интерактивная_архитектура~/interactive_architecture

PROJECT_TREE
SPECIFICATION
Выберите узел в дереве для просмотра инженерной спецификации. Select a node in the tree to view its engineering specification.

Системная консольSystem Console

azverin7@core: ~
[SYSTEM] Initializing lyralai Core...
[SYSTEM] Mesh VPN active. Tailscale tunnel established.
[SECURE] mTLS Handshake verified. Origin Pulls locked.
[AUDIO] Qwen3-TTS streaming layer up. TTFB 92 ms, RTF 0.235.

Введите 'help' для списка команд. Type 'help' for a list of commands.
azverin7@core:~$

Связь & КонтактыContact & Connect

Открыт к обсуждению сложных архитектурных решений, проектирования высоконагруженных систем и нестандартных инженерных задач в области AI и потоковой передачи данных. Open to discussing complex architectural solutions, designing high-load systems, and tackling unconventional engineering challenges in AI and data streaming.