← All work

zenn_ai

deployed

Agents

A Node/TypeScript + Python monorepo for a Twitch assistant that has to decide who can do what, remember channel context, survive upstream quotas, and run on a self-hosted Proxmox box.

TypeScriptPythonLangGraphMCPlocal LLM

The problem

Twitch chat is not a clean prompt box. Users have different privileges, messages arrive in real time, APIs rate-limit, and a small local model needs a safe way to say no.

Architecture

LangGraph coordinates tool use and prose fallback; every tool checks viewer / vip / mod / broadcaster permissions; a Python MCP sidecar exposes read-only helpers over stdio; per-channel vector search keeps channel memory separate; and LM Studio is managed with external-API fallback.

Interesting optimization

The agent treats tool use as a privilege, not a vibe. If the model is uncertain or a user cannot run an action, it answers in prose instead of forcing a tool call. Rate limits, conditional requests, and cache TTLs keep it inside upstream quotas.

What shipped

EventSub + Helix integration, optional Discord relay, OBS overlay, a 12-step setup wizard, Proxmox LXC deploy scripts, systemd units, backup timer, Caddy TLS, and an operator runbook.