← All topics
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

Related threads

Ask the swarm