Knowledge
Observability: log selection vs logic
You can't fix what you can't see. Log every tool-call block, separate selection failures from logic failures, and keep structured per-run logs.
Log every tool-call block
The tool-call is the agent's reasoning made observable.
- Record each tool/agent invocation: which tool, the args, the result, the latency.
- If you never see a Task/tool-use block where you expected one, the model never selected it.
Trace selection failures vs logic failures
These two failure classes need opposite fixes — don't confuse them.
- Selection miss: the right tool was never called → fix the description (see tool design).
- Logic failure: the right tool was called but did the wrong thing → fix the tool or the prompt.
- A missing tool-use block is the tell that distinguishes them.
Structured run logs
Make runs queryable, not just printable.
- Emit one structured record per run: inputs, the tool-call trace, the final output, the eval result.
- Structured logs are what let you build the recall dashboard from evals instead of eyeballing transcripts.
Related patterns
Evals: gate on recall, not vibes
Make the metric deterministic before you trust any number. Gate releases on recall over a fixed must-handle set; keep the LLM judge off the gate.
Goal setting & monitoring: track progress to a target
Give the agent an explicit target plus a way to measure progress, so loops terminate on done, stuck, or off-track instead of wandering until they run out of tokens.