Wiki · concept

One working reference example beats documentation for agent-assisted builds

When building with emerging APIs (voice AI, real-time models, new SDKs), coding agents hallucinate the details. They invent parameters that do not exist, use outdated SDK methods, and confidently describe behavior that changed three versions ago. The pattern that fixes this: get the official documentation, build one working end-to-end reference example by hand, then point the coding agent at both. Once a single reference exists where the pipeline actually functions, the agent stops guessing and starts following.

This generalizes beyond voice AI to any emerging stack. The agent’s training data lags the API by months; your working reference bridges the gap. The reference does not need to be polished, just correct. Structured outputs (see: Structure in structure out for LLM calls) and specs (see: spec before code for better agent output) both serve this purpose: they constrain the agent to a known-good pattern before it starts generating. The reference is the spec made executable.