>esc
↑↓ move↵ open[ ] prev / next pageT modeP palette

AI · MCP

Agents, from
the interface out

An agent is a loop: the model asks for a tool, the app runs it, the result goes back, until the model says it's done. The engineering is in making that loop visible, safe and fast for a person.

Fig. 06 — one tool-using turn
UserAgent UIModelMCP clientMCP server
  1. 01 “Which transactions failed today, and why?”from User to Agent UI
  2. 02 messages + 2 tool definitionsfrom Agent UI to Model
  3. 03 stop_reason: tool_use · transactions.searchfrom Model to Agent UI
  4. 04 run toolfrom Agent UI to MCP client
  5. 05 tools/call {status: failed, date: today}from MCP client to MCP server
  6. 06 12 recordsfrom MCP server to MCP client
  7. 07 tool_result (matching id)from Agent UI to Model
  8. 08 stop_reason: end_turnfrom Model to Agent UI
  9. 09 streamed summary, tool call visiblefrom Agent UI to User
request response

Where I focus

3 layers
Interface

Agent UIs people can trust

Streaming output, every tool call visible, approve-or-reject for risky actions, and an interrupt that really stops the loop.

Protocol

MCP servers with real contracts

Small, well-described tools with strict input schemas. The same discipline I bring to component APIs, applied to what a model can call.

Runtime

Loop control

Explicit branching on stop_reason, tool results returned with matching ids and errors, and iteration caps so a confused agent fails loudly.

Written up in more depth: Multi-agent orchestration ↗ · Agentic loops ↗ · All writing →

>