Write the eval runner before the agent: evals-first architecture with Ports and mock adapters

hwchase17 · x · 2026-11-15

Shared by LangChain's Harrison Chase: when building an AI agent, write the eval runner first. A team building a LangChain deep agent for vendor invoice queries in procure-to-pay workflows defines "correct" upfront, re-scores every skill/model/tool change on the same golden dataset, and routes all system calls behind Python Protocol "Ports" plugged into mock adapters — so evals are repeatable and the agent can't tell it's talking to mocks.

Original post →

More from coding & agent

coding & agent channel →