Why Senior Engineers Struggle to Build AI Agents

AI Engineergo watch the original →

Building agents requires shifting from deterministic software patterns to non-deterministic, context-heavy workflows where errors are treated as inputs and evals replace unit tests.

Shifting from Deterministic Control to Dispatching

Traditional software engineering relies on deterministic control, where developers act as traffic controllers defining exact execution paths. Building agents requires shifting to a dispatcher role, where the developer defines the goal while the agent determines the specific steps to achieve it. This transition requires abandoning the attempt to force LLMs into rigid, multi-step workflows.

Adapting Engineering Practices for Agents

  • Treat text as state: Move away from boolean flags and rigid data structures. Use semantic meaning to handle user preferences and dynamic context, allowing the agent to adjust behavior based on natural language input rather than predefined state machines.
  • Treat errors as inputs: Do not treat failures as triggers for full process restarts. Because agents can run for extended periods, design systems to ingest errors as feedback, allowing the agent to recover or adjust its approach without losing existing context or wasting compute.
  • Replace unit tests with evals: Since agent outputs are non-deterministic, standard unit tests are insufficient. Implement evaluation frameworks that measure success rates across multiple runs, using techniques like LLM-as-a-judge or human expert review to qualify outcomes.
  • Build agent-ready APIs: Do not assume the agent shares the developer's implicit knowledge of the codebase. Design tools and APIs with explicit, self-documenting function schemas and detailed docstrings, as the agent only interacts with the provided interface definitions rather than the underlying implementation.

Design for Iteration

Adopt a "build to delete" mindset. Because model capabilities evolve rapidly, the specific implementation of an agent will likely be discarded and rebuilt multiple times. Focus on building reliable evaluation loops rather than perfecting static code paths.

  • #ai
  • #dev-tooling

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.