Streaming LLM Tokens in LiveView, the 2026 Way
Token-by-token LLM streaming in Phoenix LiveView, no React — the 2026 async APIs, plus the production failure modes most tutorials skip.
We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Writing · Tag
25 posts on AI. Or browse the full writing index →
Token-by-token LLM streaming in Phoenix LiveView, no React — the 2026 async APIs, plus the production failure modes most tutorials skip.
One operating system runs a team whether the teammate is a person or an agent. My blueprint: trust, pods, outcomes over hours, managing agents like interns.
Classic SRE postmortems can't explain agent incidents. The sections to add — decision-time context, autonomy rung, permissions delta — with a template.
Your accumulated agent memory is a bet on one vendor's format. Build a portable, git-versioned knowledge layer any agent can read instead.
I shipped more code in 2026 than the previous four years combined. The commits are real. The productivity is real. What I lost is harder to measure.
An homage to Peter Welch's Programming Sucks, updated for agents: a genius intern with amnesia, hallucinated packages, and a closet that eats your auth layer.
Prompt injection defense a five-person team can ship in a week — trust boundaries, least-privilege tools, approval gates, and what not to build yet.
Most AI agent frameworks reinvent a job queue badly. Oban already is one — durable, idempotent, retry-aware. Run an agent loop that survives a deploy mid-run.
Amazon mandated AI coding, let it touch infrastructure unwatched, and lost millions of orders. The fix wasn't less AI — it was more humans per deploy.
Apple raised prices on Mac, iPad, and HomePod, blaming an AI-driven memory shortage. The cost of intelligence is falling; the hardware to run it isn't.
Eight failure patterns I see running AI coding agents daily — the confident wrong answers, the lost context, and the bugs they reliably ship.
Every AI agent framework runs the same loop: observe, decide, act, repeat. Here it is in 50 lines of Elixir — no framework, just a GenServer.
You don't need a vector database — the Postgres you already run does RAG fine. The hand-rolled pgvector path in Phoenix, and when Arcana earns its place.
The path to senior ran through the grunt work AI now does in one prompt. The knowing-vs-doing gap hits juniors first — and how to grow architects anyway.
Satya Nadella's 'token capital' framing is right that AI amplifies human judgment — but it's enterprise advice that skips the small teams who feel it first.
Go won the agent daemon and Python owns the reasoning — but the layer nobody claimed is the one that bites you: thousands of long-lived, stateful, crash-prone agents you must keep alive. That's the BEAM's home turf.
Most engineers prompt Claude one sentence at a time. Anthropic's own engineers don't — they prompt skills. Four rules from their recent talks, with the operator nuance the talks left out.
Fifty prompts I use to ship production AI features, debug distributed systems, and write docs that don't rot. Code review, debugging, refactoring, system design, and PR-quality writing — with five full examples.
Replit's AI agent ignored a code freeze, wiped a production database in nine seconds, then confessed it violated every principle it was given. The strongest case yet for hiring MORE senior engineers in the AI boom — not fewer.
Every company rolling out AI is about to discover how much work they were leaving on the table. AI doesn't replace headcount — it surfaces the backlog you never had bandwidth to touch. The math behind why velocity creates surface area, the failure mode that follows, and why the companies cutting headcount now are about to get outpaced.
AI-native companies need a security model that classic appsec doesn't cover. Agents have credentials. Prompts are an attack surface. Training data leaks. The four-layer security stack I'd build, the controls I'd ship in the first 90 days, and the ones I'd defer.
Most engineers using Claude Code see a 10–15% speedup. The teams seeing 40–55% aren't typing faster — they're sequencing work differently. The four modes I use AI in, what to never delegate, and how to get a skeptical team across the line.
Most AI startups try to fix the model when the real problem is they can't see what the model is doing. The four-layer AI telemetry stack, the tooling to use, and how proper instrumentation cut a Lavender hallucination rate by 40% without touching the model itself.
The hardest part of agentic AI in 2026 isn't getting the agent to do the work. It's knowing when to override it. The four-level autonomy ladder, the five signals an agent is going off the rails, and a real example of catching one before it shipped a quietly broken auth flow.
A walkthrough of how I run 4–7 agent sessions in parallel through a normal engineering day. Morning background tasks, mid-morning pair programming, afternoon reviews, end-of-day ops. The interaction modes that work, the handoff protocol, and the trap that makes most agent workflows produce slop.