Проектирую распределённые Event-Driven системы и low-latency пайплайны. Специализируюсь на создании автономных AI-агентов с соматической моделью, потоковом синтезе речи с задержкой 92 мс и проектировании защищённых гибридных сред (mTLS) для ИИ-инференса. Architecting distributed Event-Driven systems and low-latency pipelines. Specializing in autonomous AI agents with somatic models, 92 ms streaming speech synthesis, secure hybrid environments (mTLS), and observable real-time systems.

Инженерный профиль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: Hybrid (OpenRouter / Local) 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)

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 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 CF["Cloudflare Edge"]:::edge Argo["Cloudflare Tunnel"]:::tunnel API["aiohttp Orchestrator"]:::cloud Redis["Redis Pub/Sub"]:::db PG["PostgreSQL + pgvector"]:::db ELK["Prometheus, Grafana, ELK"]:::cloud Worker["Python Subprocess Manager"]:::local LLM["Local Embeddings / OpenRouter API"]:::local Avatar["Unity VRM Renderer → NDI → OBS"]:::local Audio["PipeWire (Raw PCM Routing)"]:::local Sensory["Computer Vision and OS Telemetry"]:::local HR["Inbound InMail / Scout Bot"]:::external Check{"Is B2B Contract?"}:::b2b Drop["Drop Packet / Silent Ignore"]:::external Procurement["MSA and Invoice Onboarding"]:::b2b Ext1["Twitch / YouTube Events"]:::external --> CF Sensory --> Worker CF --> API API <--> Redis API <--> PG API --> ELK Worker <--> Argo Argo <--> API API <--> Worker Worker <--> LLM Worker --> Avatar Worker --> Audio 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.
  • 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

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.