A free ebook, as a PDF and an EPUB

Production coding agents: a harness engineering guide

Build the harness around the model: a streaming loop, permission-checked tools, a shell with limits, context that survives long sessions, and evals that turn production ready into a number.

The PDF opens in a new tab. Your details go to learnwithparam only. This does not subscribe you to the newsletter.

Look insidePages from the PDF, as they print.

  1. Page 4: Four principles fix the places where prototypes break.
    Page 4: Four principles fix the places where prototypes break.
  2. Page 5: The loop streams text, dispatches tool calls and stops on the stop reason.
    Page 5: The loop streams text, dispatches tool calls and stops on the stop reason.
  3. Page 10: The permission check sorts every call into read, write, network or shell.
    Page 10: The permission check sorts every call into read, write, network or shell.
  4. Page 12: The shell tool runs with no shell, a clean environment, a timeout and resource caps.
    Page 12: The shell tool runs with no shell, a clean environment, a timeout and resource caps.
  5. Page 16: Compaction counts tokens, cuts at an assistant turn and summarizes the rest.
    Page 16: Compaction counts tokens, cuts at an assistant turn and summarizes the rest.
  6. Page 22: The grader records success, safety, cost and latency for every trial.
    Page 22: The grader records success, safety, cost and latency for every trial.

What the ebook covers

  1. 1

    What harness engineering means

    The model reasons and decides. The harness executes, constrains and connects. Most prototypes break in the harness, not the model.

  2. 2

    The streaming agent loop

    The loop streams the model, hands every tool call to the dispatcher and stops on the stop reason or a turn cap. It never reads the text to decide.

  3. 3

    Permission-governed tools and a sandboxed shell

    Each tool gets a typed schema, each call is a privilege request, and the shell runs sandboxed.

  4. 4

    Context, compaction and memory tiers

    A long session fills the window with tool output and old turns. Treat context as a budget: compact before it fills, keep project rules in a file and load procedures only when needed.

  5. 5

    Evaluate the agent, then ship it

    Shipping a coding agent without an eval is shipping on hope. Golden tasks score success, safety, cost and latency over several trials, and a checklist gates the release.

  6. 6

    The page to keep and the questions people ask

    Every layer of the harness on one page, then short answers to what engineers search about production coding agents.

See the lab this ebook comes fromAgentic AI System Design for Engineers & PMs: An architecture for one real workflow at your company that you can take to a design review: roles, models, context, tools, approvals, failure plan and budget.