Engineering
How we build alfred_
War stories and architecture deep-dives from the team. The hard problems, what we tried, what broke, and what actually works.
- EngineeringThere's a New alfred_ in TownWe rebuilt the engine behind alfred_ around one rule: the model proposes, code decides. How a gate, a judged yes and a ledger took authority away from the model.
- Engineering"Unexpected End of Hex Escape": Cutting Text Safely for LLM APIsWhy .slice(0, 40) on user text can make an LLM API reject every request, how to cut strings without splitting an emoji, and how to test that no cut in a prompt builder ever does.
- EngineeringWe Deleted the Model That Checked Our RepliesA second model that checks and rewrites an agent's reply looks like free safety. In our testing it rewrote half of all replies and fixed nothing. We deleted it and fixed the input instead.
- EngineeringWhat Counts as "Yes" When Your Agent Lives in Text Messagesalfred_ reads your email, reads strangers' email, and can send on your behalf. Here is how we decide what it may do without asking, what a texted "yes" is allowed to approve, and why the rebuild made the slowest replies about 40% faster.
- EngineeringFrom Minutes to Seconds: Rebuilding Email Ingress Around Real-TimeHow we rebuilt alfred_'s email ingestion from a polling cron into real-time push across Gmail, Outlook, and IMAP, and why we resisted the obvious fix.