Forum · Coding

Are people building AI agents skipping basic software engineering?

Asked on Reddit · rewritten without usernames ·

Many agent projects seem to treat the model as the whole system and forget the usual engineering work: tests, error handling, logging. Is that a real pattern, and which basics matter most once an agent leaves the demo stage?

It is a real pattern, and it has a simple cause: a demo only has to work once, while a product has to keep working. The model call is usually the smallest part of an agent that holds up in production. The rest is ordinary software: input checks, retries, timeouts, tests and logs.

Tests come first. You cannot unit-test what the model will say, but you can test everything around it: that tool calls get valid arguments, that bad tool output is caught, that the agent stops when a step fails. Writing those tests before the code keeps the agent's behaviour pinned down as you change prompts and models.

Error handling comes next. Tools time out, APIs return errors and the model sometimes returns something you cannot parse. Decide for each case whether to retry, fall back or stop and tell the user, instead of letting the agent improvise.

Last is visibility. Log every model call and tool call with its inputs, outputs, time and cost, so that when a user reports a bad result you can see exactly which step went wrong. Without that, debugging an agent is guesswork.

Listings mentioned

  • Test-Driven Development (TDD) · skill by obra
    Writes the test before the implementation, which works well for the code that wraps a model call.
  • Error handling patterns · skill by wshobson
    Covers retries, error propagation and graceful degradation for the parts of an agent that will fail.
  • Observability and instrumentation · skill by addyosmani
    Adds logging, metrics and tracing so you can see what the agent did in production.

Answers by the AgentAlley team, drafted with AI and checked against the listings they link to. Not a real-person reply from the original thread.

More in Coding