Hey, I'm

Ahmed Elmalt

I build the platforms other engineers build on, and lately some of those engineers are agents.

Twenty-plus years of it: hospital location infrastructure, a compiler and a language runtime, an advertising platform, and now real-time multimodal AI and multi-agent systems at Alexa. Off the clock I host a philosophy podcast and write long reviews of books about minds and machines.

Paper · 2019

Towards Personalized Dialog Policies for Conversational Skill Discovery

Personalises how the assistant talks, not only what it recommends: a reinforcement-learned policy that adapts to first-time versus returning users and to brief versus verbose styles, beating a one-fits-all rule-based agent on both success rate and dialog length.

Amazon Inventor ×2 · 2020 · 2025

Awarded twice

Amazon's recognition for inventions that make it into the company's technology. Once for conversational skill discovery, once for the visual memory architecture behind real-time visual intelligence.

Patent · 2026

Visual context integration with natural language reasoning

Speculative visual capture gating across a device–cloud boundary, using paired high-recall and high-precision classifiers.

Pending · Confidential

Featured

Collection9 posts

AI & agentic architectures

What it takes to make agents reliable enough to run in production. The focus is the runtime around the model, and the design choices that keep failures contained once an agent acts on real systems.

PostIn AI & agentic architectures · Oct 23, 2026 · 21 min read

SFU, MCU, and the participant that has to decode

Put an AI agent in a group call and two questions decide the design: does the model hear each person, or one blend, and who has to hold the keys? Both come down to where the agent's audio gets decoded.

Series6 parts

Real-time voice, from the packet up

How a voice call actually works, one layer at a time, from a single packet to a group call. If you build on WebRTC or voice AI, these are the protocols underneath the API, and the reasons they behave the way they do.

PostIn The unwritten rules · Oct 13, 2026 · 26 min read

Code review economics

On three busy repositories the wait for a first review grows much more slowly than a PR's size, so a change split into eight PRs reviewed one after another waits three to eight times as long. Opening them side by side helps less than it looks, and only one reviewer taking them together is no worse than one PR. The measurement, the rule that falls out of it, and a tool to run it on your own PRs.

PostIn Down to the wire · Sep 30, 2026 · 29 min read

Backpressure and load shedding

A shop's checkout service can answer 100 requests a second, and for one minute 150 arrive. Left at the usual default, it answers 8% of those people in time; refusing the overflow at once answers two thirds. Capacity decides how many can be served. The policy decides whether they are, and only the question of who is a product decision.

PostIn Down to the wire · Sep 21, 2026 · 27 min read

Observability-driven development

A deploy makes checkout slow for 0.9% of requests, and the dashboard's median doesn't move. Writing down the question you'd ask if it broke, and making a test prove the telemetry can answer it, is what finds them. Plus what that telemetry costs, in series and in microseconds.

PostIn Down to the wire · Aug 21, 2026 · 8 min read

Half the bitrate, two thirds the traffic

Halving an audio bitrate from 32 to 16 kb/s took traffic from 48 to 32, because every packet's headers stay the same size. Packet rate is the other control.

PostOct 30, 2026 · 24 min read

Inside toolbench: the runtime for small interactive web tools

The internals of toolbench, the framework behind mainLog's tools: what the runner guards against, why a worker exists only to be terminated, how a graph is laid out and routed the same in every browser, how known answers and size budgets keep tools honest, and why every migration is the identity function.

Series

Recent

  • Oct 30, 2026 24 min read

    Inside toolbench: the runtime for small interactive web tools

    The internals of toolbench, the framework behind mainLog's tools: what the runner guards against, why a worker exists only to be terminated, how a graph is laid out and routed the same in every browser, how known answers and size budgets keep tools honest, and why every migration is the identity function.

    frameworksarchitecture
  • Oct 29, 2026 25 min read

    Introducing toolbench: a tiny framework for interactive web tools

    Toolbench is a small framework for interactive tools in web pages. A tool is a pure function and a JSON manifest, and the runtime builds the form, runs the function and draws the answer. What it is, how it fits together, and the choices behind it, shown with tools that run live on mainLog.

    frameworksarchitecture
  • Oct 26, 2026 20 min read

    What an agent should remember

    AI & agentic architectures

    Agent memory stores mostly decide what to forget by time: a TTL, or deleting what hasn't been used. In a 90-day scripted scenario, that kept a cancelled booking alive for weeks and stored a restaurant's sentence as the user's preference. Two fields fix both: who wrote the memory, and which event would make it false.

    ai-agentsarchitecture
  • Oct 23, 2026 21 min read

    SFU, MCU, and the participant that has to decode

    AI & agentic architectures

    Put an AI agent in a group call and two questions decide the design: does the model hear each person, or one blend, and who has to hold the keys? Both come down to where the agent's audio gets decoded.

    ai-agentswebrtc
  • Oct 21, 2026 12 min read

    The one-sentence API design test

    The unwritten rules

    Six AI agents each designed one extension to my framework, and each design held up on its own. Side by side they disagreed about names every user touches. One question sorted them out, and writing down the rules my existing code already followed made the answer countable.

    api-designai-agents
  • Oct 19, 2026 21 min read

    Circuit breakers for inference

    AI & agentic architectures

    Timeouts, retries and budgets for model calls that finish too slowly, produce unusable answers or keep repeating themselves. With the real Anthropic SDK, timeout=3.0 let an 18-second stream finish. In a simulated support chat, with invented failure rates, five checks took the conversations waiting over two minutes from 249 to 0.

    ai-agentsreliability
  • Oct 15, 2026 27 min read

    Where the server sits

    Real-time voice, from the packet up

    Add Bob and Carol to Alice's call and someone has to copy her voice twice. Mesh, an SFU and an MCU put that copy in three different places, and the cost moves with it: upload, server bandwidth, or a decode and an encode per person. Then back to Alice's assistant, where the server is simply the other end of the call.

    webrtcarchitecture
  • Oct 13, 2026 26 min read

    Code review economics

    The unwritten rules

    On three busy repositories the wait for a first review grows much more slowly than a PR's size, so a change split into eight PRs reviewed one after another waits three to eight times as long. Opening them side by side helps less than it looks, and only one reviewer taking them together is no worse than one PR. The measurement, the rule that falls out of it, and a tool to run it on your own PRs.

    craftteams
  • Oct 9, 2026 29 min read

    What a state machine buys an agent

    AI & agentic architectures

    The same dinner booking, sent to Claude as a free-form tool loop and as a state machine. Per-state tool lists sent 61% fewer tokens, but with prompt caching on they cost 23% more on input, and with output counted the two came out about even. The real saving was code running the steps that need no model, 8 calls down to 2 and about 72% off the total, plus a table of every state against every event.

    ai-agentsprompt-engineering
  • Oct 7, 2026 28 min read

    What a service mesh costs

    Down to the wire

    Your shop now runs 14 services in three languages, and security wants every call between them encrypted and identified. A mesh does that without touching the code, for about a fifth of a millisecond per hop and a tenth of a core per proxy per 1,000 requests a second, measured here with real Envoy. It also brings retry and queue defaults nobody chose. Over plain HTTP they retry less than most people expect; over gRPC, or after one common edit, a failing service gets 27 calls for one checkout.

    infrastructuremicroservices
  • Oct 5, 2026 21 min read

    The receiver talks back

    Real-time voice, from the packet up

    Alice's laptop sends fifty packets a second into a network that never answers. A few dozen bytes from the receiver every few seconds carry the loss, the jitter and enough timestamps to measure the round trip without synchronised clocks. Enough to back off, but not fast enough to back off well, which is why browsers add feedback for every packet.

    networkingwebrtc
  • Oct 2, 2026 16 min read

    How many concepts is too many

    The unwritten rules

    Framework debates trade concept counts that measure different things. Count what the smallest real program makes its user write, in separate columns and per reader, find the rules the count can't see by misspelling them, and keep an extra concept only when it moves a check earlier or gives users a seam they can see.

    pythonapi-design
  • Sep 30, 2026 29 min read

    Backpressure and load shedding

    Down to the wire

    A shop's checkout service can answer 100 requests a second, and for one minute 150 arrive. Left at the usual default, it answers 8% of those people in time; refusing the overflow at once answers two thirds. Capacity decides how many can be served. The policy decides whether they are, and only the question of who is a product decision.

    distributed-systemsreliability
  • Sep 28, 2026 25 min read

    Keys, then audio

    Real-time voice, from the packet up

    The path is found, and every router on it could hand Alice's voice to a decoder. How two machines that have never met agree on keys over a network anyone can read, what SRTP does to her packet and what it deliberately leaves alone, and how long a call takes from cold start, measured.

    networkingwebrtc
  • Sep 25, 2026 15 min read

    Diagrams worth reading

    AI & agentic architectures

    My agent could already write Mermaid. Diagrams worth reading took a skill that chooses the picture, keeps the facts intact, and checks the drawing before handing it back.

    ai-agentsarchitecture
  • Sep 23, 2026 23 min read

    How two computers find a path

    Real-time voice, from the packet up

    Alice's laptop doesn't know the address the internet sees it at, and the assistant can't reply to an address it was never told. How one STUN round trip finds it, why some networks need a TURN relay, and how ICE checks every path and picks one.

    networkingwebrtc
  • Sep 21, 2026 27 min read

    Observability-driven development

    Down to the wire

    A deploy makes checkout slow for 0.9% of requests, and the dashboard's median doesn't move. Writing down the question you'd ask if it broke, and making a test prove the telemetry can answer it, is what finds them. Plus what that telemetry costs, in series and in microseconds.

    observabilitydistributed-systems
  • Sep 17, 2026 22 min read

    Late is lost

    Real-time voice, from the packet up

    Packets arrive unevenly, and a packet that misses its slot is as good as lost. How a jitter buffer trades delay for dropouts, what concealment can and can't hide, and what Opus FEC and RED buy against random loss and against bursts.

    audionetworking
  • Sep 15, 2026 11 min read

    Green on my laptop, red in CI

    The unwritten rules

    A pytest plugin passed every test from the source checkout and failed twice in CI, because only the installed wheel told pytest the plugin existed.

    pythontesting
More recent posts
/tools/sdp-explainer
/tools/capacity-planner
/tools/retry-amplification
/tools/percentile-rollup
/tools/llm-timeout-check
/tools/jitter-fec
MIT

toolbench

Ship small interactive tools on a website. A tool is one function and one JSON file; the framework builds the form, runs it, and renders the result.

TypeScript 89.9%JavaScript 5.9%CSS 2.1%HTML 2%Other 0.1%
1 3 2 posts Nov 2026
MIT

padspeaker

Play your computer's sound on the speaker built into a Bluetooth gamepad. It shows up as an audio output, picked like any other, with nothing to install on the pad.

Python 94.3%Shell 5.7%
0 1 0 posts Oct 2026
MIT

Scrappy

Fills in the artwork, trailers and descriptions your scraper missed. A desktop utility for Batocera that finds them for a game, lets you check them, and writes them where EmulationStation looks.

Python 97.5%Shell 2.5%
2 0 0 posts Oct 2026
MIT

XPress

A simple truth expression language for evaluating boolean logic.

PowerShell 50.9%C# 48.5%Other 0.6%
4 0 1 post Jul 2019