HILLINDIGO / WRITING

The First Engineering Rule for AI Agents

Before pursuing autonomy, make boundaries, state and failure observable.

An agent that can call more tools and run for longer is not necessarily more reliable. In an engineering environment, the first question is not “what else can it do?” but “when it behaves unexpectedly, can we reconstruct what happened?”

Start with observability

Record at least four things: the user goal, model decisions, tool inputs and outputs, and the final state. Together they form a task trace. Without it, debugging becomes guesswork.

type AgentTrace = {
  goal: string;
  steps: Array<{ tool: string; input: unknown; output: unknown }>;
  status: 'completed' | 'failed' | 'needs_input';
};

Give failure a precise meaning

“Not completed” may mean a tool timed out, permission was missing, input was incomplete, or the model chose the wrong path. These states should not collapse into one vague error.

Open autonomy gradually

Begin with workflows that can be replayed, interrupted and confirmed. Expand autonomous decision-making only when the corresponding observation and control mechanisms exist.

Engineering does not remove uncertainty. It makes uncertainty discoverable, understandable and manageable.

DISCUSSION

Comments & additions

Inline comments are not enabled yet, but GitHub Discussions is open for conversation.